diff options
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/eglibc/Makefile | 15 | ||||
-rw-r--r-- | toolchain/eglibc/Makefile.multilib | 31 | ||||
-rw-r--r-- | toolchain/kernel-headers/Makefile | 13 |
3 files changed, 56 insertions, 3 deletions
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile index b165d1ba7..ec648d9af 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 \ @@ -116,6 +116,15 @@ $(WRKBUILD)/.installed: $(EGLIBC_BUILD_DIR_FINAL)/libc.so for abi in $(TABI); do \ ${EGLIBC_ENV} $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL)-$${abi/*:/} install_root=$(STAGING_TARGET_DIR)-$${abi/*:/} install ;\ done +ifeq ($(ADK_TARGET_ABI_N64),y) + ${EGLIBC_ENV} $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL)-64 install_root=$(STAGING_TARGET_DIR) install +endif +ifeq ($(ADK_TARGET_ABI_N32),y) + ${EGLIBC_ENV} $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL)-n32 install_root=$(STAGING_TARGET_DIR) install +endif +ifeq ($(ADK_TARGET_ABI_O32),y) + ${EGLIBC_ENV} $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL)-o32 install_root=$(STAGING_TARGET_DIR) install +endif ifeq ($(ADK_TARGET_ABI_64),y) ${EGLIBC_ENV} $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL)-64 install_root=$(STAGING_TARGET_DIR) install endif diff --git a/toolchain/eglibc/Makefile.multilib b/toolchain/eglibc/Makefile.multilib index 08be0a100..517fbed26 100644 --- a/toolchain/eglibc/Makefile.multilib +++ b/toolchain/eglibc/Makefile.multilib @@ -1,13 +1,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 |