From fb56c53e3938c6a2911b4bb22b82219aa5943dce Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 29 Mar 2009 18:32:18 +0000 Subject: Another external toolchain fix Change the definition of TARGET_LDFLAGS to use --sysroot $(STAGING_DIR) instead of -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib. It fixes the following failure while trying to build mtd-utils : /usr/local/xtools/arm-unknown-linux-uclibcgnueabi/bin/arm-unknown-linux-uclibcgnueabi-gcc -L/home/thomas/local/buildroot-output/build_arm/staging_dir/lib -L/home/thomas/local/buildroot-output/build_arm/staging_dir/usr/lib -o /home/thomas/local/buildroot-output/build_arm/mtd_orig/flash_eraseall /home/thomas/local/buildroot-output/build_arm/mtd_orig/crc32.o /home/thomas/local/buildroot-output/build_arm/mtd_orig/flash_eraseall.o /usr/local/xtools/arm-unknown-linux-uclibcgnueabi/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.3.2/../../../../arm-unknown-linux-uclibcgnueabi/bin/ld: cannot find /lib/libc.so.0 collect2: ld returned 1 exit status make[1]: *** [/home/thomas/local/buildroot-output/build_arm/mtd_orig/flash_eraseall] Error 1 At the same time, simplify the definition of TARGET_CFLAGS, because the -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include are no longer necessary since we sysroot the toolchain in $(SYSROOT_DIR). This patch has no effect on non-external toolchain builds. Signed-off-by: Thomas Petazzoni --- package/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package/Makefile.in') diff --git a/package/Makefile.in b/package/Makefile.in index 5a44e3856..2605639c9 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -93,9 +93,9 @@ 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 --sysroot $(STAGING_DIR)/ +TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) --sysroot $(STAGING_DIR)/ TARGET_CXXFLAGS=$(TARGET_CFLAGS) -TARGET_LDFLAGS=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib +TARGET_LDFLAGS=--sysroot $(STAGING_DIR)/ endif ######################################################################### #ifeq ($(BR2_ROOTFS_SUFFIX),) -- cgit v1.2.3