diff options
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/eglibc/Makefile | 6 | ||||
-rw-r--r-- | toolchain/eglibc/Makefile.multilib | 31 | ||||
-rw-r--r-- | toolchain/kernel-headers/Makefile | 13 |
3 files changed, 47 insertions, 3 deletions
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile index 9988ef5de..1f959944d 100644 --- a/toolchain/eglibc/Makefile +++ b/toolchain/eglibc/Makefile @@ -30,7 +30,7 @@ $(WRKBUILD)/.headers_configure: $(EGLIBC_BUILD_DIR_INITIAL)-$${abi/*:/}/option-groups.config; \ (cd $(EGLIBC_BUILD_DIR_INITIAL)-$${abi/*:/}; \ ${EGLIBC_ENV} \ - CC="${REAL_GNU_TARGET_NAME}-gcc -m$${abi/*:/}" \ + CC="${REAL_GNU_TARGET_NAME}-gcc ${TCFLAGS}$${abi/*:/}" \ $(WRKBUILD)/libc/configure \ --prefix=$(STAGING_TARGET_DIR)-$${abi/*:/}/usr \ --with-headers=$(STAGING_TARGET_DIR)-$${abi/*:/}/usr/include \ @@ -44,7 +44,7 @@ $(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure for abi in $(TABI); do \ (cd $(EGLIBC_BUILD_DIR_INITIAL)-$${abi/*:/}; \ ${EGLIBC_ENV} \ - CC="${REAL_GNU_TARGET_NAME}-gcc -m$${abi/*:/}" \ + CC="${REAL_GNU_TARGET_NAME}-gcc ${TCFLAGS}$${abi/*:/}" \ $(MAKE) install-headers install-bootstrap-headers=yes cross-compiling=yes \ ); \ touch $(STAGING_TARGET_DIR)-$${abi/*:/}/usr/include/gnu/stubs.h; \ @@ -94,7 +94,7 @@ $(WRKBUILD)/.configured: $(EGLIBC_BUILD_DIR_FINAL)-$${abi/*:/}/option-groups.config ;\ (cd $(EGLIBC_BUILD_DIR_FINAL)-$${abi/*:/}; \ ${EGLIBC_ENV} \ - CC="${REAL_GNU_TARGET_NAME}-gcc -m$${abi/*:/}" \ + CC="${REAL_GNU_TARGET_NAME}-gcc ${TCFLAGS}$${abi/*:/}" \ $(WRKBUILD)/libc/configure \ --prefix=/usr \ --enable-shared \ diff --git a/toolchain/eglibc/Makefile.multilib b/toolchain/eglibc/Makefile.multilib index 47cc0ff99..6416bc006 100644 --- a/toolchain/eglibc/Makefile.multilib +++ b/toolchain/eglibc/Makefile.multilib @@ -4,13 +4,44 @@ # multilib support ifeq ($(ADK_TARGET_WITH_MULTILIB),y) TABI:= +TCFLAGS:= ifeq ($(ADK_TARGET_MULTILIB_X86_X32),y) TABI+=x86_64-openadk-linux-gnu:x32 +TCFLAGS:=-m endif ifeq ($(ADK_TARGET_MULTILIB_X86_32),y) TABI+=i486-openadk-linux-gnu:32 +TCFLAGS:=-m endif ifeq ($(ADK_TARGET_MULTILIB_X86_64),y) TABI+=x86_64-openadk-linux-gnu:64 +TCFLAGS:=-m +endif +ifeq ($(ADK_TARGET_MULTILIB_MIPS_N32),y) +ifeq ($(ADK_KERNEL_CPU_LITTLE_ENDIAN),y) +TABI+=mips64el-openadk-linux-gnu:n32 +TCFLAGS:=-mabi= +else +TABI+=mips64-openadk-linux-gnu:n32 +TCFLAGS:=-mabi= +endif +endif +ifeq ($(ADK_TARGET_MULTILIB_MIPS_O32),y) +ifeq ($(ADK_KERNEL_CPU_LITTLE_ENDIAN),y) +TABI+=mips64el-openadk-linux-gnu:o32 +TCFLAGS:=-mabi= +else +TABI+=mips64-openadk-linux-gnu:o32 +TCFLAGS:=-mabi= +endif +endif +ifeq ($(ADK_TARGET_MULTILIB_MIPS_64),y) +ifeq ($(ADK_KERNEL_CPU_LITTLE_ENDIAN),y) +TABI+=mips64el-openadk-linux-gnu:64 +TCFLAGS:=-mabi= +else +TABI+=mips64-openadk-linux-gnu:64 +TCFLAGS:=-mabi= +endif endif endif diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile index e81fa87eb..8b364d760 100644 --- a/toolchain/kernel-headers/Makefile +++ b/toolchain/kernel-headers/Makefile @@ -11,6 +11,18 @@ $(WRKBUILD)/.headers: INSTALL_HDR_PATH=$(STAGING_DIR)/usr \ headers_install ifeq ($(ADK_TARGET_WITH_MULTILIB),y) +ifeq ($(ADK_LINUX_MIPS),y) + $(MAKE) -C $(WRKBUILD) HOSTCC=$(CC_FOR_BUILD) ARCH=mips V=1 \ + INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)-n32/usr \ + headers_install + $(MAKE) -C $(WRKBUILD) HOSTCC=$(CC_FOR_BUILD) ARCH=mips V=1 \ + INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)-64/usr \ + headers_install + $(MAKE) -C $(WRKBUILD) HOSTCC=$(CC_FOR_BUILD) ARCH=mips V=1 \ + INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)-o32/usr \ + headers_install +endif +ifeq ($(ADK_LINUX_X86_64),y) $(MAKE) -C $(WRKBUILD) HOSTCC=$(CC_FOR_BUILD) ARCH=x86 V=1 \ INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)-32/usr \ headers_install @@ -21,6 +33,7 @@ ifeq ($(ADK_TARGET_WITH_MULTILIB),y) INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)-64/usr \ headers_install endif +endif $(MAKE) -C $(WRKBUILD) HOSTCC=$(CC_FOR_BUILD) ARCH=$(ARCH) V=1 \ INSTALL_HDR_PATH=$(LINUX_HEADER_DIR) \ headers_install |