summaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-04-05 12:36:23 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-04-05 12:36:23 +0000
commitf335e5894fc9cd8087ba8d48e33708fe70630229 (patch)
treec0d1bb56aebfc49715e3763b24a9f1a736963411 /toolchain
parentec3eb8fd19347eda580a2be599be36e454987ac2 (diff)
toolchain: allow choosing the MIPS64 user-land ABI
Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36205 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/Config.in27
-rw-r--r--toolchain/Makefile1
-rw-r--r--toolchain/gcc/common.mk3
3 files changed, 30 insertions, 1 deletions
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 8677b87e7..e32364095 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -130,6 +130,25 @@ menuconfig EXTRA_TARGET_ARCH
both powerpc and powerpc64 binaries, you'll need to
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"
depends TOOLCHAINOPTS
@@ -218,3 +237,11 @@ config TARGET_SUFFIX
default "uclibc" if USE_UCLIBC && !(arm || armeb)
default "muslgnueabi" 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"
diff --git a/toolchain/Makefile b/toolchain/Makefile
index 763381a83..581d2b3c6 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -64,6 +64,7 @@ ifneq ($(ARCH),)
mkdir -p "$$dir"; \
cd "$$dir"; \
ln -nsf lib lib64; \
+ ln -nsf lib lib32; \
mkdir -p stamp lib usr/include usr/lib ; \
); done
@grep GCC_VERSION $@ >/dev/null 2>&1 || $(INSTALL_DATA) $(TOPDIR)/toolchain/info.mk $@
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index 8305aa9fc..c6b961735 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -113,7 +113,8 @@ GCC_CONFIGURE:= \
--with-host-libstdcxx=-lstdc++ \
$(SOFT_FLOAT_CONFIG_OPTION) \
$(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-mpfr=$(TOPDIR)/staging_dir/host \
--disable-decimal-float