aboutsummaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-13 12:56:14 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-14 10:07:55 +0200
commit34f95bf9dbb0a2698d425975d83a92fa5e7ca0aa (patch)
tree714ff5c6c7a83d92450d65068e48a9a5a38d03e3 /toolchain
parent3318a5a798a37bd2b55feb619f8d0a90b9c7ddd2 (diff)
downloadbuildroot-34f95bf9dbb0a2698d425975d83a92fa5e7ca0aa.tar.gz
buildroot-34f95bf9dbb0a2698d425975d83a92fa5e7ca0aa.tar.bz2
toolchain-external: fix support of uClibc-ng toolchains
The uClibc-ng dynamic loader is called ld-uClibc.so.1, but gcc is not patched specifically for uClibc-ng, so it continues to generate binaries that expect the dynamic loader to be named ld-uClibc.so.0, like with the original uClibc. Therefore, when a uClibc-ng toolchain is used as an external toolchain, we need to create an additional symbolic link to make uClibc-ng systems work properly. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/toolchain-external/toolchain-external.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index c8dd98f64d..fcb033ca2e 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -721,6 +721,17 @@ define TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT
fi
endef
+# uClibc-ng dynamic loader is called ld-uClibc.so.1, but gcc is not
+# patched specifically for uClibc-ng, so it continues to generate
+# binaries that expect the dynamic loader to be named ld-uClibc.so.0,
+# like with the original uClibc. Therefore, we create an additional
+# symbolic link to make uClibc-ng systems work properly.
+define TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO
+ if test -e $(TARGET_DIR)/lib/ld-uClibc.so.1; then \
+ ln -sf ld-uClibc.so.1 $(TARGET_DIR)/lib/ld-uClibc.so.0 ; \
+ fi
+endef
+
define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS
$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS)
$(TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER)
@@ -734,6 +745,7 @@ define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_CMDS
$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS)
$(TOOLCHAIN_EXTERNAL_INSTALL_BFIN_FDPIC)
$(TOOLCHAIN_EXTERNAL_INSTALL_BFIN_FLAT)
+ $(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO)
endef
$(eval $(generic-package))