toolchain: allow choosing the MIPS64 user-land ABI
[openwrt/svn-archive/archive.git] / toolchain / Config.in
index 32de4b16473aa494cf9102eb251e8a0ddf18d720..e32364095bbe31ab78b6c8f8c698dd48a8cb1075 100644 (file)
@@ -50,6 +50,17 @@ menuconfig EXTERNAL_TOOLCHAIN
                default "/opt/cross/powerpc-unknown-linux-gnu"  if powerpc
                default "/opt/cross/x86_64-unknown-linux-gnu"   if x86_64
 
+       config TOOLCHAIN_LIBC
+               string
+               prompt "Toolchain libc"  if DEVEL
+               depends EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
+               default "uclibc"
+               help
+                 Specify the libc type used by the external toolchain. The given value us passed as -m
+                 flag to all gcc and g++ invocations. This is mainly intended for multilib toolchains
+                 which support glibc and uclibc at the same time. If no value is specified, no -m flag
+                 is passed.
+
        config TOOLCHAIN_BIN_PATH
                string
                prompt "Toolchain program path"  if DEVEL
@@ -119,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
 
@@ -207,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"