buildroot: allow specifying libc personality for external toolchains
[openwrt.git] / toolchain / Config.in
index 1c09983..8677b87 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
@@ -145,10 +156,14 @@ choice
        config USE_UCLIBC
                bool "Use uClibc"
 
+       config USE_MUSL
+               bool "Use musl"
+
 endchoice
 
 source "toolchain/eglibc/Config.in"
 source "toolchain/uClibc/Config.in"
+source "toolchain/musl/Config.in"
 
 comment "Debuggers"
        depends TOOLCHAINOPTS
@@ -181,20 +196,25 @@ source "toolchain/gcc/Config.version"
 
 source "toolchain/eglibc/Config.version"
 source "toolchain/uClibc/Config.version"
+source "toolchain/musl/Config.version"
 
 config LIBC
        string
        default "eglibc"  if USE_EGLIBC
        default "uClibc"  if USE_UCLIBC
+       default "musl"    if USE_MUSL
 
 config LIBC_VERSION
        string
        default EGLIBC_VERSION  if USE_EGLIBC
        default UCLIBC_VERSION  if USE_UCLIBC
+       default MUSL_VERSION    if USE_MUSL
 
 config TARGET_SUFFIX
        string
-       default "gnueabi"         if (USE_EGLIBC) && (arm || armeb)
-       default "gnu"             if (USE_EGLIBC) && !(arm || armeb)
+       default "gnueabi"         if USE_EGLIBC && (arm || armeb)
+       default "gnu"             if USE_EGLIBC && !(arm || armeb)
        default "uclibcgnueabi"   if USE_UCLIBC && (arm || armeb)
        default "uclibc"          if USE_UCLIBC && !(arm || armeb)
+       default "muslgnueabi"     if USE_MUSL && (arm || armeb)
+       default "musl"            if USE_MUSL && !(arm || armeb)