summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2007-02-12 14:38:06 +0100
committerBernhard Reutner-Fischer2007-02-12 14:38:06 +0100
commit99cf7293f9eb943e00e2ebca6eee0e36eaa801bd (patch)
tree1ae33b5d2518286eafc5154cdecb2fd9ed0e3f97 /Makefile
parent- update patch for 0.0.14.1. Thanks to Alexander Rigbo. (diff)
downloadbuildroot-99cf7293f9eb943e00e2ebca6eee0e36eaa801bd.tar.gz
buildroot-99cf7293f9eb943e00e2ebca6eee0e36eaa801bd.tar.xz
buildroot-99cf7293f9eb943e00e2ebca6eee0e36eaa801bd.zip
- add cc-option and use it to check for stuff that is benefical for PREFER_IMA
- backport the libbackend.o gcov-iov.h dependency fixup from 4.2 to 4.0
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 80e314c6a..6cb05d30c 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,13 @@ endif
ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
+# cc-option
+# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
+# sets -march=winchip-c6 if supported else falls back to -march=i586
+# without checking the latter.
+cc-option = $(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
+ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
+
#############################################################
#
# The list of stuff to build for the target toolchain