diff options
-rw-r--r-- | mk/vars.mk | 6 | ||||
-rw-r--r-- | toolchain/gcc/Makefile | 4 |
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 |