summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2008-12-13 16:15:50 +0000
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2008-12-13 16:15:50 +0000
commit978d8dc53e997203c7244c9cb599247c68e1c72e (patch)
tree9f4eb8a611b5a862732e9e1169b78c7b07e0f958 /toolchain
parent0dc552c13453e11ca7bb6b05694b31d32da67c6f (diff)
Another external toolchain support solution
* In toolchain/external-toolchain/ext-tool.mk, copy the contents of the sysroot directory to the staging dir. * In package/Makefile.in, add a --sysroot CFLAGS pointing to the staging dir * Remove the CFLAGS and LDFLAGS definition from TARGET_CONFIGURE_OPTS. I haven't investigated exactly why, but with these options, DirectFB fails to build because it cannot find PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, even if DirectFB's Makefile properly sets -D_GNU_SOURCE. I have already sent this patch on December, 2nd to the mailing-list, but got no feedback. So let's commit and see what happens :-) Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/external-toolchain/ext-tool.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index a9ca1f4a9..8ff4722f3 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -44,6 +44,11 @@ copy_toolchain_lib_root = \
\
echo -n
+copy_toolchain_sysroot = \
+ SYSROOT_DIR=`$(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--with-sysroot" | cut -f2 -d=`; \
+ cp -a $${SYSROOT_DIR}/* $(STAGING_DIR)/ ; \
+ find $(STAGING_DIR) -type d | xargs chmod 755
+
uclibc: dependencies $(TARGET_DIR)/lib/$(strip $(subst ",, $(BR2_TOOLCHAIN_EXTERNAL_LIB_C)))
$(TARGET_DIR)/lib/$(strip $(subst ",, $(BR2_TOOLCHAIN_EXTERNAL_LIB_C))):
@@ -54,3 +59,4 @@ $(TARGET_DIR)/lib/$(strip $(subst ",, $(BR2_TOOLCHAIN_EXTERNAL_LIB_C))):
for libs in $(strip $(subst ",, $(BR2_TOOLCHAIN_EXTERNAL_LIBS))); do \
$(call copy_toolchain_lib_root, $$libs, /lib, $(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
done
+ $(call copy_toolchain_sysroot) \ No newline at end of file