summaryrefslogtreecommitdiffstats
path: root/toolchain/external-toolchain
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-07-05 18:59:02 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-07-06 08:00:22 +0200
commit2bf32a3307b8d184396a02056b454ec98beeda4c (patch)
tree1b94c8618daef136e3e8b14696fc0929b21f1672 /toolchain/external-toolchain
parent086e4b7475c3ee3e256fc8b850553ed0502bf3d7 (diff)
downloadbuildroot-novena-2bf32a3307b8d184396a02056b454ec98beeda4c.tar.gz
buildroot-novena-2bf32a3307b8d184396a02056b454ec98beeda4c.zip
external-toolchain: handle libstdc++/libgcc_s for BR toolchains
Most toolchains have their libraries either in /lib or /usr/lib relative to their ARCH_SYSROOT_DIR. Buildroot toolchains, however, have basic libraries in /lib, and libstdc++/libgcc_s in /usr/<target-name>/lib(64). Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain/external-toolchain')
-rw-r--r--toolchain/external-toolchain/ext-tool.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index 39961843e..1c84893f9 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -42,6 +42,11 @@
# directory to the target directory. Also optionaly strips the
# library.
#
+# Most toolchains have their libraries either in /lib or /usr/lib
+# relative to their ARCH_SYSROOT_DIR. Buildroot toolchains, however,
+# have basic libraries in /lib, and libstdc++/libgcc_s in
+# /usr/<target-name>/lib(64).
+#
# $1: arch specific sysroot directory
# $2: library name
# $3: destination directory
@@ -52,7 +57,11 @@ copy_toolchain_lib_root = \
LIB="$(strip $2)"; \
STRIP="$(strip $4)"; \
\
- LIBS=`(cd $${ARCH_SYSROOT_DIR}; find . -path "./lib/$${LIB}.*" -o -path "./usr/lib/$${LIB}.*")` ; \
+ LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
+ find -L . -path "./lib/$${LIB}.*" -o \
+ -path "./usr/lib/$${LIB}.*" -o \
+ -path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
+ )` ; \
for FILE in $${LIBS} ; do \
LIB=`basename $${FILE}`; \
LIBDIR=`dirname $${FILE}` ; \