aboutsummaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
authorWolfgang Denk2005-10-04 22:38:24 +0200
committerWolfgang Denk2005-10-04 22:38:24 +0200
commit1820d4c73b78ebe5d08921b0b6249c6f72e45215 (patch)
treea09e00683cd1636369c05556a94f14643a78f7e4 /config.mk
parent9a8d82fd3c7822effe3226f97f9ef1f643498c89 (diff)
Make sure only supported compiler options are used
Import "cc-option" shell function from kernel and use it to get the correct ARM GCC options for individual CPUs Patch by Peter Pearse, 30 Jun 2005
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/config.mk b/config.mk
index ff830917468..0f104398c27 100644
--- a/config.mk
+++ b/config.mk
@@ -86,6 +86,12 @@ HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
HOSTSTRIP = strip
#########################################################################
+#
+# Option checker (courtesy linux kernel) to ensure
+# only supported compiler options are used
+#
+cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
+ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
#
# Include the make variables (CC, etc...)