[Buildroot] Copying extra libs into image using external toolchain

Cameron Hutchison lists at xdna.net
Mon Feb 8 06:34:42 UTC 2010


Cameron Hutchison <lists at xdna.net> writes:

>Alternatively, I could put all the libraries
>in /lib and just forget about /usr/lib (I prefer to on embedded systems,
>but that's probably not a commonly accepted idea).

Here's a patch that does just that and nothing else. It's much smaller
and might be more useful to others:

diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index 1f5aa19..e39979f 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -45,8 +45,8 @@ copy_toolchain_lib_root = \
 	DST="$(strip $3)"; \
 	STRIP="$(strip $4)"; \
  \
-	LIB_DIR="$${SYSROOT_DIR}/lib" ; \
-	for FILE in `find $${LIB_DIR} -maxdepth 1 -name "$${LIB}.*"`; do \
+	for FILE in `find $${SYSROOT_DIR} -name "$${LIB}.*"`; do \
+		LIB_DIR=`dirname $${FILE}`; \
 		LIB=`basename $${FILE}`; \
 		while test \! -z "$${LIB}"; do \
 			rm -fr $(TARGET_DIR)$${DST}/$${LIB}; \


More information about the buildroot mailing list