summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-07-23 11:37:25 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-07-23 11:37:25 +0000
commit58002d40e98abdff50a154fc75816bc8d148f749 (patch)
tree3e8cb918cf202040433d70f4a75062cad764c80e
parentf8cc31c604c2b61bfc422afe8c10110cca3e0e42 (diff)
downloadbuildroot-novena-58002d40e98abdff50a154fc75816bc8d148f749.tar.gz
buildroot-novena-58002d40e98abdff50a154fc75816bc8d148f749.zip
- iff the cross-compiler supports certain mtune,march,mabi flags then use them for the packages.
This should make it obvious if the wrong compiler is used to build the target.
-rw-r--r--package/Makefile.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index fc2ce7229..0384dfa0c 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -34,6 +34,22 @@ TARGET_CFLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT)
#TARGET_LDFLAGS=-Wl,$(BR2_SYSROOT)
endif
+CC_TARGET_TUNE_:=$(strip $(subst ",,BR2_GCC_TARGET_TUNE))
+#"))
+CC_TARGET_ARCH_:=$(strip $(subst ",,BR2_GCC_TARGET_ARCH))
+#"))
+CC_TARGET_ABI_:=$(strip $(subst ",,BR2_GCC_TARGET_ABI))
+#"))
+ifneq ($(CC_TARGET_TUNE_),)
+TARGET_CFLAGS+=-mtune=$(CC_TARGET_TUNE_)
+endif
+ifneq ($(CC_TARGET_ARCH_),)
+TARGET_CFLAGS+=-march=$(CC_TARGET_ARCH_)
+endif
+ifneq ($(CC_TARGET_ABI_),)
+TARGET_CFLAGS+=-mabi=$(CC_TARGET_ABI_)
+endif
+
ifneq ($(BR2_PREFER_STATIC_LIB),y)
ifeq ($(BR2_x86_64),y)
TARGET_CFLAGS+=-fPIC -DPIC