1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-16 12:14:01 +02:00

toolchain: allow choosing the MIPS64 user-land ABI

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 36205
This commit is contained in:
Florian Fainelli 2013-04-05 12:36:23 +00:00
parent 348cae15d2
commit e032922266
4 changed files with 35 additions and 1 deletions

View File

@ -73,6 +73,11 @@ endif
ifdef CONFIG_HAS_SPE_FPU ifdef CONFIG_HAS_SPE_FPU
TARGET_SUFFIX:=$(TARGET_SUFFIX)spe TARGET_SUFFIX:=$(TARGET_SUFFIX)spe
endif endif
ifdef CONFIG_MIPS64_ABI
ifneq ($(CONFIG_MIPS64_ABI_O32),y)
ARCH_SUFFIX:=$(ARCH_SUFFIX)_$(subst ",,$(CONFIG_MIPS64_ABI))
endif
endif
DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl) DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl)
BIN_DIR:=$(TOPDIR)/bin/$(BOARD) BIN_DIR:=$(TOPDIR)/bin/$(BOARD)

View File

@ -130,6 +130,25 @@ menuconfig EXTRA_TARGET_ARCH
both powerpc and powerpc64 binaries, you'll need to both powerpc and powerpc64 binaries, you'll need to
specify -m64 here. specify -m64 here.
choice
prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
default MIPS64_ABI_N64
help
MIPS64 supports 3 different user-land ABIs: o32 (legacy),
n32 and n64.
config MIPS64_ABI_N64
bool "n64"
config MIPS64_ABI_N32
bool "n32"
config MIPS64_ABI_O32
bool "o32"
endchoice
comment "Binary tools" comment "Binary tools"
depends TOOLCHAINOPTS depends TOOLCHAINOPTS
@ -218,3 +237,11 @@ config TARGET_SUFFIX
default "uclibc" if USE_UCLIBC && !(arm || armeb) default "uclibc" if USE_UCLIBC && !(arm || armeb)
default "muslgnueabi" if USE_MUSL && (arm || armeb) default "muslgnueabi" if USE_MUSL && (arm || armeb)
default "musl" if USE_MUSL && !(arm || armeb) default "musl" if USE_MUSL && !(arm || armeb)
config MIPS64_ABI
depends mips64 || mips64el
string
default "64" if MIPS64_ABI_N64
default "n32" if MIPS64_ABI_N32
default "32" if MIPS64_ABI_O32
default "64"

View File

@ -64,6 +64,7 @@ ifneq ($(ARCH),)
mkdir -p "$$dir"; \ mkdir -p "$$dir"; \
cd "$$dir"; \ cd "$$dir"; \
ln -nsf lib lib64; \ ln -nsf lib lib64; \
ln -nsf lib lib32; \
mkdir -p stamp lib usr/include usr/lib ; \ mkdir -p stamp lib usr/include usr/lib ; \
); done ); done
@grep GCC_VERSION $@ >/dev/null 2>&1 || $(INSTALL_DATA) $(TOPDIR)/toolchain/info.mk $@ @grep GCC_VERSION $@ >/dev/null 2>&1 || $(INSTALL_DATA) $(TOPDIR)/toolchain/info.mk $@

View File

@ -113,7 +113,8 @@ GCC_CONFIGURE:= \
--with-host-libstdcxx=-lstdc++ \ --with-host-libstdcxx=-lstdc++ \
$(SOFT_FLOAT_CONFIG_OPTION) \ $(SOFT_FLOAT_CONFIG_OPTION) \
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
$(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 --with-abi=64) \ $(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \
--with-abi=$(subst ",,$(CONFIG_MIPS64_ABI))) \
--with-gmp=$(TOPDIR)/staging_dir/host \ --with-gmp=$(TOPDIR)/staging_dir/host \
--with-mpfr=$(TOPDIR)/staging_dir/host \ --with-mpfr=$(TOPDIR)/staging_dir/host \
--disable-decimal-float --disable-decimal-float