summaryrefslogtreecommitdiff
path: root/toolchain/eglibc
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/eglibc')
-rw-r--r--toolchain/eglibc/Makefile43
-rw-r--r--toolchain/eglibc/Makefile.inc2
-rw-r--r--toolchain/eglibc/Makefile.multilib3
3 files changed, 22 insertions, 26 deletions
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile
index 3529d9124..1f959944d 100644
--- a/toolchain/eglibc/Makefile
+++ b/toolchain/eglibc/Makefile
@@ -105,42 +105,20 @@ $(WRKBUILD)/.configured:
done
touch $@
-$(EGLIBC_BUILD_DIR_FINAL)/libc.so:
$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
for abi in $(TABI); do \
${EGLIBC_ENV} $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL)-$${abi/*:/} cross-compiling=yes all ;\
done
touch $@
-$(WRKBUILD)/.installed: $(EGLIBC_BUILD_DIR_FINAL)/libc.so
+$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
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)
+ # default libgcc searching for 64 bit libraries
${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
-ifeq ($(ADK_TARGET_ABI_32),y)
- ${EGLIBC_ENV} $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL)-32 install_root=$(STAGING_TARGET_DIR) install
-endif
-ifeq ($(ADK_TARGET_ABI_X32),y)
- ${EGLIBC_ENV} $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL)-x32 install_root=$(STAGING_TARGET_DIR) install
-endif
touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h
touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs-{32,x32,64}.h
- # for libgcc build we need C library files, 64 bit default
- mkdir -p $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2 ; \
- $(CP) $(STAGING_TARGET_DIR)-64/lib/* $(STAGING_TARGET_DIR)-64/usr/lib/* \
- $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2/; \
- rm $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2/libc.so ; \
for abi in $(TABI); do \
mkdir -p $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2/$${abi/*:/} ; \
$(CP) $(STAGING_TARGET_DIR)-$${abi/*:/}/lib/* $(STAGING_TARGET_DIR)-$${abi/*:/}/usr/lib/* \
@@ -187,4 +165,21 @@ $(WRKBUILD)/.installed: $(EGLIBC_BUILD_DIR_FINAL)/libc.so
touch $@
endif
+ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
+$(WRKBUILD)/.fixup:
+ifeq ($(ADK_TARGET_ABI_64),y)
+ ${CP} $(STAGING_TARGET_DIR)-64/lib/* $(STAGING_TARGET_DIR)/lib
+ ${CP} $(STAGING_TARGET_DIR)-64/usr/lib/* $(STAGING_TARGET_DIR)/usr/lib
+endif
+ifeq ($(ADK_TARGET_ABI_32),y)
+ ${CP} $(STAGING_TARGET_DIR)-32/lib/* $(STAGING_TARGET_DIR)/lib
+ ${CP} $(STAGING_TARGET_DIR)-32/usr/lib/* $(STAGING_TARGET_DIR)/usr/lib
+endif
+ifeq ($(ADK_TARGET_ABI_X32),y)
+ ${CP} $(STAGING_TARGET_DIR)-x32/lib/* $(STAGING_TARGET_DIR)/lib
+ ${CP} $(STAGING_TARGET_DIR)-x32/usr/lib/* $(STAGING_TARGET_DIR)/usr/lib
+endif
+ touch $@
+endif
+
include ${TOPDIR}/mk/toolchain.mk
diff --git a/toolchain/eglibc/Makefile.inc b/toolchain/eglibc/Makefile.inc
index 2541bb5e5..8214e2237 100644
--- a/toolchain/eglibc/Makefile.inc
+++ b/toolchain/eglibc/Makefile.inc
@@ -16,7 +16,6 @@ EGLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
--with-tls \
--enable-add-ons \
$(NLS)
-
EGLIBC_ENV:= PATH='${TARGET_PATH}' \
BUILD_CC=${CC_FOR_BUILD} \
GCC_HONOUR_COPTS=s \
@@ -31,4 +30,3 @@ EGLIBC_ENV:= PATH='${TARGET_PATH}' \
libc_cv_gnu99_inline=yes \
libc_cv_initfini_array=yes \
libc_cv_slibdir="/lib"
-
diff --git a/toolchain/eglibc/Makefile.multilib b/toolchain/eglibc/Makefile.multilib
index 517fbed26..6416bc006 100644
--- a/toolchain/eglibc/Makefile.multilib
+++ b/toolchain/eglibc/Makefile.multilib
@@ -1,3 +1,6 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
# multilib support
ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
TABI:=