Browse Source

remove lowercase ABI symbols. tested with x86/mips64 variants

Waldemar Brodkorb 9 years ago
parent
commit
9dbe643b99

+ 1 - 1
Config.in

@@ -110,11 +110,11 @@ config ADK_VENDOR
 	  Vendor string is used for toolchain.
 
 source "target/config/Config.in.endian"
-source "target/config/Config.in.abi"
 source "target/config/Config.in.fpu"
 source "target/config/Config.in.float"
 source "target/config/Config.in.binfmt"
 source "target/config/Config.in.libc"
+source "target/config/Config.in.abi"
 source "target/config/Config.in.binutils"
 source "target/config/Config.in.gcc"
 source "target/config/Config.in.gdb"

+ 2 - 6
target/config/Config.in.abi.choice

@@ -7,28 +7,24 @@ depends on ADK_TARGET_ARCH_MIPS64
 
 config ADK_TARGET_ABI_N32
 	bool "N32 ABI"
-	select ADK_n32
 
 config ADK_TARGET_ABI_N64
 	bool "N64 ABI"
-	select ADK_n64
 
 config ADK_TARGET_ABI_O32
 	bool "O32 ABI"
-	select ADK_o32
 
 endchoice
 
 choice
 prompt "ABI"
-depends on ADK_TARGET_ARCH_X86_64
+depends on ADK_TARGET_ARCH_X86_64 && \
+	(ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_MUSL)
 
 config ADK_TARGET_ABI_64
 	bool "64 Bit ABI"
-	select ADK_64
 
 config ADK_TARGET_ABI_X32
 	bool "x32 ABI"
-	select ADK_x32
 
 endchoice

+ 20 - 40
target/config/Config.in.abi.default

@@ -1,59 +1,39 @@
 # This file is part of the OpenADK project. OpenADK is copyrighted
 # material, please see the LICENCE file in the top-level directory.
 
-config ADK_o32
-	bool
-
-config ADK_n32
-	bool
-
-config ADK_n64
-	bool
-
-config ADK_32
-	bool
-
-config ADK_64
-	bool
-
-config ADK_x32
-	bool
-
 config ADK_TARGET_ABI
 	string
-	default "n32" if ADK_n32
-	default "n64" if ADK_n64
-	default "32" if ADK_32
-	default "x32" if ADK_x32
+	default "n32" if ADK_TARGET_ABI_N32
+	default "n64" if ADK_TARGET_ABI_N64
+	default "32" if ADK_TARGET_ABI_32
+	default "x32" if ADK_TARGET_ABI_X32
 	default "eabihf" if ADK_TARGET_ARCH_ARM && ADK_TARGET_HARD_FLOAT
 	default "eabi" if ADK_TARGET_ARCH_ARM
 
 config ADK_TARGET_MIPS_ABI
 	depends on ADK_TARGET_ARCH_MIPS64
 	string
-	default "32" if ADK_o32
-	default "n32" if ADK_n32
-	default "64" if ADK_n64
+	default "32" if ADK_TARGET_ABI_O32
+	default "n32" if ADK_TARGET_ABI_N32
+	default "64" if ADK_TARGET_ABI_N64
 
 config ADK_TARGET_LIBC_PATH
 	string
-	default "lib" if ADK_32
-	default "lib32" if ADK_n32
-	default "libx32" if ADK_x32
-	default "lib64" if ADK_n64 \
-				|| ADK_64 \
-				|| ADK_TARGET_ARCH_AARCH64 \
-				|| ADK_TARGET_ARCH_SPARC64 \
-				|| ADK_TARGET_ARCH_PPC64 \
-				|| ADK_TARGET_ARCH_X86_64
+	default "lib32" if ADK_TARGET_ABI_N32
+	default "libx32" if ADK_TARGET_ABI_X32
+	default "lib64" if ADK_TARGET_ABI_64 || ADK_TARGET_ABI_N64 \
+			|| ADK_TARGET_ARCH_AARCH64 \
+			|| ADK_TARGET_ARCH_SPARC64 \
+			|| ADK_TARGET_ARCH_PPC64 \
+			|| ADK_TARGET_ARCH_X86_64
 	default "lib"
 
 config ADK_TARGET_ABI_CFLAGS
 	string
-	default "-mabi=32" if ADK_o32
-	default "-mabi=n32" if ADK_n32
-	default "-mabi=64" if ADK_n64
-	default "-m32" if ADK_32
-	default "-mx32" if ADK_x32
-	default "-m64" if ADK_64
+	default "-mabi=32" if ADK_TARGET_ABI_O32
+	default "-mabi=n32" if ADK_TARGET_ABI_N32
+	default "-mabi=64" if ADK_TARGET_ABI_N64
+	default "-m32" if ADK_TARGET_ABI_32
+	default "-mx32" if ADK_TARGET_ABI_X32
+	default "-m64" if ADK_TARGET_ABI_64
 

+ 2 - 4
target/config/Config.in.libc.choice

@@ -14,8 +14,7 @@ config ADK_TARGET_LIB_UCLIBC_NG
 		   !ADK_TARGET_ARCH_NIOS2 && \
 		   !ADK_TARGET_ARCH_SPARC64 && \
 		   !ADK_TARGET_ARCH_PPC64 && \
-		   !ADK_TARGET_ARCH_TILE && \
-		   !ADK_x32
+		   !ADK_TARGET_ARCH_TILE
 	help
 	  http://uclibc-ng.org
 
@@ -57,8 +56,7 @@ config ADK_TARGET_LIB_UCLIBC
 		   !ADK_TARGET_ARCH_NIOS2 && \
 		   !ADK_TARGET_ARCH_SPARC64 && \
 		   !ADK_TARGET_ARCH_PPC64 && \
-		   !ADK_TARGET_ARCH_TILE && \
-		   !ADK_x32
+		   !ADK_TARGET_ARCH_TILE
 	help
  	  http://uclibc.org
 

+ 14 - 14
target/config/Config.in.libc.default

@@ -38,24 +38,24 @@ config ADK_TARGET_SUFFIX
 	string
 	default "gnueabihf" if ADK_TARGET_LIB_GLIBC && ADK_TARGET_ARCH_ARM && ADK_TARGET_HARD_FLOAT
 	default "gnueabi" if ADK_TARGET_LIB_GLIBC && ADK_TARGET_ARCH_ARM
-	default "gnuabi64" if ADK_TARGET_LIB_GLIBC && ADK_n64
-	default "gnuabin32" if ADK_TARGET_LIB_GLIBC && ADK_n32
-	default "gnuabi32" if ADK_TARGET_LIB_GLIBC && ADK_o32
-	default "gnu32" if ADK_TARGET_LIB_GLIBC && ADK_32 && ADK_LINUX_64
-	default "gnux32" if ADK_TARGET_LIB_GLIBC && ADK_x32 && ADK_LINUX_64
+	default "gnuabi64" if ADK_TARGET_LIB_GLIBC && ADK_TARGET_ABI_N64
+	default "gnuabin32" if ADK_TARGET_LIB_GLIBC && ADK_TARGET_ABI_N32
+	default "gnuabi32" if ADK_TARGET_LIB_GLIBC && ADK_TARGET_ABI_O64
+	default "gnu32" if ADK_TARGET_LIB_GLIBC && ADK_TARGET_ABI_32 && ADK_LINUX_64
+	default "gnux32" if ADK_TARGET_LIB_GLIBC && ADK_TARGET_ABI_X32 && ADK_LINUX_64
 	default "gnu" if ADK_TARGET_LIB_GLIBC
 	default "uclibceabihf" if (ADK_TARGET_LIB_UCLIBC || ADK_TARGET_LIB_UCLIBC_NG) && ADK_TARGET_ARCH_ARM && ADK_TARGET_HARD_FLOAT
 	default "uclibceabi" if (ADK_TARGET_LIB_UCLIBC || ADK_TARGET_LIB_UCLIBC_NG) && ADK_TARGET_ARCH_ARM
-	default "uclibcabi64" if (ADK_TARGET_LIB_UCLIBC || ADK_TARGET_LIB_UCLIBC_NG) && ADK_n64
-	default "uclibcabin32" if (ADK_TARGET_LIB_UCLIBC || ADK_TARGET_LIB_UCLIBC_NG) && ADK_n32
-	default "uclibcabi32" if (ADK_TARGET_LIB_UCLIBC || ADK_TARGET_LIB_UCLIBC_NG) && ADK_o32
-	default "uclibc32" if (ADK_TARGET_LIB_UCLIBC || ADK_TARGET_LIB_UCLIBC_NG) && ADK_32 && ADK_LINUX_64
+	default "uclibcabi64" if (ADK_TARGET_LIB_UCLIBC || ADK_TARGET_LIB_UCLIBC_NG) && ADK_TARGET_ABI_N64
+	default "uclibcabin32" if (ADK_TARGET_LIB_UCLIBC || ADK_TARGET_LIB_UCLIBC_NG) && ADK_TARGET_ABI_N32
+	default "uclibcabi32" if (ADK_TARGET_LIB_UCLIBC || ADK_TARGET_LIB_UCLIBC_NG) && ADK_TARGET_ABI_O32
+	default "uclibc32" if (ADK_TARGET_LIB_UCLIBC || ADK_TARGET_LIB_UCLIBC_NG) && ADK_TARGET_ABI_32 && ADK_LINUX_64
 	default "uclibc" if ADK_TARGET_LIB_UCLIBC || ADK_TARGET_LIB_UCLIBC_NG
 	default "musleabihf" if ADK_TARGET_LIB_MUSL && ADK_TARGET_ARCH_ARM && ADK_TARGET_HARD_FLOAT
 	default "musleabi" if ADK_TARGET_LIB_MUSL && ADK_TARGET_ARCH_ARM
-	default "muslabi64" if ADK_TARGET_LIB_MUSL && ADK_n64
-	default "muslabin32" if ADK_TARGET_LIB_MUSL && ADK_n32
-	default "muslabi32" if ADK_TARGET_LIB_MUSL && ADK_o32
-	default "musl32" if ADK_TARGET_LIB_MUSL && ADK_32 && ADK_LINUX_64
-	default "muslx32" if ADK_TARGET_LIB_MUSL && ADK_x32 && ADK_LINUX_64
+	default "muslabi64" if ADK_TARGET_LIB_MUSL && ADK_TARGET_ABI_N64
+	default "muslabin32" if ADK_TARGET_LIB_MUSL && ADK_TARGET_ABI_N32
+	default "muslabi32" if ADK_TARGET_LIB_MUSL && ADK_TARGET_ABI_O32
+	default "musl32" if ADK_TARGET_LIB_MUSL && ADK_TARGET_ABI_32 && ADK_LINUX_64
+	default "muslx32" if ADK_TARGET_LIB_MUSL && ADK_TARGET_ABI_X32 && ADK_LINUX_64
 	default "musl" if ADK_TARGET_LIB_MUSL

+ 2 - 2
toolchain/gcc/Makefile

@@ -134,10 +134,10 @@ endif
 endif
 
 ifeq ($(ADK_TARGET_ARCH_X86_64),y)
-ifeq ($(ADK_x32),y)
+ifeq ($(ADK_TARGET_ABI_X32),y)
 GCC_FINAL_CONFOPTS+=	--with-abi=x32
 endif
-ifeq ($(ADK_64),y)
+ifeq ($(ADK_TARGET_ABI_64),y)
 GCC_FINAL_CONFOPTS+=	--disable-biarch --disable-multilib
 endif
 endif

+ 3 - 3
toolchain/uclibc-ng/Makefile

@@ -197,17 +197,17 @@ endif
 ifeq ($(ADK_TARGET_ARCH_MIPS64),y)
 	$(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS64\).*/\1=y/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32\).*/# \1 is not set/' ${WRKBUILD}/.config
-ifeq ($(ADK_n64),y)
+ifeq ($(ADK_TARGET_ABI_N64),y)
 	$(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/\1=y/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_N32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
 endif
-ifeq ($(ADK_n32),y)
+ifeq ($(ADK_TARGET_ABI_N32),y)
 	$(SED) 's/.*\(CONFIG_MIPS_N32_ABI\).*/\1=y/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
 endif
-ifeq ($(ADK_o32),y)
+ifeq ($(ADK_TARGET_ABI_O32),y)
 	$(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/\1=y/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_N32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config

+ 3 - 3
toolchain/uclibc/Makefile

@@ -137,17 +137,17 @@ endif
 endif
 # mips64
 ifeq ($(ADK_TARGET_ARCH_MIPS64),y)
-ifeq ($(ADK_n64),y)
+ifeq ($(ADK_TARGET_ABI_N64),y)
 	$(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/\1=y/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_N32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
 endif
-ifeq ($(ADK_n32),y)
+ifeq ($(ADK_TARGET_ABI_N32),y)
 	$(SED) 's/.*\(CONFIG_MIPS_N32_ABI\).*/\1=y/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
 endif
-ifeq ($(ADK_o32),y)
+ifeq ($(ADK_TARGET_ABI_O32),y)
 	$(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/\1=y/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_N32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config