summaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2012-03-16 05:27:47 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-05-15 08:31:26 +0200
commit19a695f84bb15e1a9203121f9dd4d1787d9a7757 (patch)
treec5c32491342110417489913912e6e105d89399e4 /config.mk
parent20c6312913f7f2f86e0266320fbef3236382b7aa (diff)
downloadu-boot-imx-19a695f84bb15e1a9203121f9dd4d1787d9a7757.zip
u-boot-imx-19a695f84bb15e1a9203121f9dd4d1787d9a7757.tar.gz
u-boot-imx-19a695f84bb15e1a9203121f9dd4d1787d9a7757.tar.bz2
tools, config.mk: Add gcc-version.sh, cc-version test from Linux
Added from Linux - commit fde7d9049e55ab85a390be7f415d74c9f62dd0f9 Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/config.mk b/config.mk
index fa33e62..c239f23 100644
--- a/config.mk
+++ b/config.mk
@@ -104,7 +104,7 @@ HOSTCFLAGS += -pedantic
#########################################################################
#
-# Option checker (courtesy linux kernel) to ensure
+# Option checker, gcc version (courtesy linux kernel) to ensure
# only supported compiler options are used
#
CC_OPTIONS_CACHE_FILE := $(OBJTREE)/include/generated/cc_options.mk
@@ -125,6 +125,10 @@ cc-option = $(strip $(if $(findstring $1,$(CC_OPTIONS)),$1,\
$(if $(call cc-option-sys,$1),$1,$2)))
endif
+# cc-version
+# Usage gcc-ver := $(call cc-version)
+cc-version = $(shell $(SHELL) $(SRCTREE)/tools/gcc-version.sh $(CC))
+
#
# Include the make variables (CC, etc...)
#