summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-07-05 18:58:55 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-07-06 07:55:59 +0200
commit07d15f907bfc8737abc69cfb11ce30c88e9bb5c2 (patch)
tree52ce65bc71387d7b30f3439587e1ae020cdaa07f /package
parent7192668cbf7c28976938bec2fe78fe7d265fd45a (diff)
ext-toolchain: Fix ARCH_SYSROOT detection
For the detection of the ARCH_SYSROOT_DIR (which contains the C library variant specific to the compiler flags), we used to pass only the -march argument instead of the full TARGET_CFLAGS. This was done because TARGET_CFLAGS contains --sysroot, and we don't want to tell here the compiler which sysroot to use, because we're specifically asking the compiler where the *normal* arch sysroot directory is. Unfortunately, there are some multilib variants that aren't decided only based on -march, but also on -msoft-float or other compiler flags. Therefore, we take the opposite approach: pass the full TARGET_CFLAGS, from which we have stripped the --sysroot option. For example, this allows a PowerPC CodeSourcery toolchain, on which we're using the soft-float multilib variant, to work properly as an external toolchain. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package')
-rw-r--r--package/Makefile.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index 92b57102c..5147dc851 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -88,9 +88,9 @@ TARGET_LDFLAGS+= $(BR2_SYSROOT)
#########################################################################
else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
-TARGET_CFLAGS+=--sysroot $(STAGING_DIR)/
+TARGET_CFLAGS+=--sysroot=$(STAGING_DIR)/
TARGET_CXXFLAGS=$(TARGET_CFLAGS)
-TARGET_LDFLAGS=--sysroot $(STAGING_DIR)/
+TARGET_LDFLAGS=--sysroot=$(STAGING_DIR)/
TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib
endif
#########################################################################