summaryrefslogtreecommitdiff
path: root/toolchain/eglibc
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/eglibc')
-rw-r--r--toolchain/eglibc/Makefile15
-rw-r--r--toolchain/eglibc/Makefile.multilib31
2 files changed, 43 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