summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-07-06 07:27:02 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-07-06 07:27:02 +0200
commit517bdcccb47d4ea4582aa64df35f7f9aef34bc70 (patch)
tree4dcfefc87a1cdd8920a778daa2f53095f227b65f
parentad91f62a75c2f0e58f57dbe25d702ac6da9b239c (diff)
x32: fix toolchain buiding
-rw-r--r--mk/vars.mk6
-rw-r--r--toolchain/gcc/Makefile4
2 files changed, 8 insertions, 2 deletions
diff --git a/mk/vars.mk b/mk/vars.mk
index 340261824..fd637af62 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -104,6 +104,12 @@ TARGET_CC:= clang --target=${GNU_TARGET_NAME} --sysroot=$(STAGING_TARGET_DIR)
TARGET_CXX:= clang++ --target=${GNU_TARGET_NAME} --sysroot=$(STAGING_TARGET_DIR)
endif
+# for x86_64 x32 ABI we need to extend TARGET_CC/TARGET_CXX
+ifeq ($(ADK_TARGET_ABI_X32),y)
+TARGET_CC+= $(ADK_TARGET_ABI_CFLAGS)
+TARGET_CXX+= $(ADK_TARGET_ABI_CFLAGS)
+endif
+
TARGET_LD:= ${TARGET_COMPILER_PREFIX}ld
ifneq ($(ADK_TARGET_USE_LTO),)
TARGET_AR:= ${TARGET_COMPILER_PREFIX}gcc-ar
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 78f4a025b..fb205606a 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -164,9 +164,9 @@ endif
ifeq ($(ADK_TARGET_ARCH_X86_64),y)
ifneq ($(ADK_TARGET_ABI_X32),)
-GCC_FINAL_CONFOPTS+= --with-abi=x32
+GCC_CONFOPTS+= --with-abi=x32 --enable-multilib
else
-GCC_FINAL_CONFOPTS+= --disable-biarch --disable-multilib
+GCC_CONFOPTS+= --disable-biarch --disable-multilib
endif
endif