[Buildroot] [PATCH 26/30] toolchain/toolchain-external: move uClibc specific logic into a separate file

Romain Naour romain.naour at gmail.com
Sun Oct 23 20:48:27 UTC 2016


Use pkg-toolchain-external-uclibc.mk for the definition of the
TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO function, which create some symbolic
links in TARGET_DIR.

Signed-off-by: Romain Naour <romain.naour at gmail.com>
---
 .../toolchain-external/pkg-toolchain-external-uclibc.mk    | 13 +++++++++++++
 toolchain/toolchain-external/toolchain-external.mk         | 14 --------------
 2 files changed, 13 insertions(+), 14 deletions(-)
 create mode 100644 toolchain/toolchain-external/pkg-toolchain-external-uclibc.mk

diff --git a/toolchain/toolchain-external/pkg-toolchain-external-uclibc.mk b/toolchain/toolchain-external/pkg-toolchain-external-uclibc.mk
new file mode 100644
index 0000000..02d7076
--- /dev/null
+++ b/toolchain/toolchain-external/pkg-toolchain-external-uclibc.mk
@@ -0,0 +1,13 @@
+# 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
+	$(Q)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
+	$(Q)if test -e $(TARGET_DIR)/lib/ld64-uClibc.so.1; then \
+		ln -sf ld64-uClibc.so.1 $(TARGET_DIR)/lib/ld64-uClibc.so.0 ; \
+	fi
+endef
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index f56f049..cb63dd2 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -470,20 +470,6 @@ define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT
 endef
 endif
 
-# 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
-	$(Q)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
-	$(Q)if test -e $(TARGET_DIR)/lib/ld64-uClibc.so.1; then \
-		ln -sf ld64-uClibc.so.1 $(TARGET_DIR)/lib/ld64-uClibc.so.0 ; \
-	fi
-endef
-
 TOOLCHAIN_EXTERNAL_BUILD_CMDS = $(TOOLCHAIN_BUILD_WRAPPER)
 
 define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS
-- 
2.5.5




More information about the buildroot mailing list