diff options
-rw-r--r-- | package/Makefile.in | 4 | ||||
-rw-r--r-- | toolchain/external-toolchain/ext-tool.mk | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/package/Makefile.in b/package/Makefile.in index fe1d6ad9f..66a8f695d 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -89,7 +89,7 @@ TARGET_CXXFLAGS=$(TARGET_CFLAGS) # else it's an external toolchain ######################################################################### else -TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include +TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include --sysroot $(STAGING_DIR)/ TARGET_CXXFLAGS=$(TARGET_CFLAGS) TARGET_LDFLAGS=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib endif @@ -210,8 +210,6 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ AR="$(TARGET_AR)" \ AS="$(TARGET_AS)" \ LD="$(TARGET_LD)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ NM="$(TARGET_NM)" \ CC="$(TARGET_CC) $(TARGET_CFLAGS)" \ GCC="$(TARGET_CC) $(TARGET_CFLAGS)" \ 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 |