aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Kbuild.include
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r--scripts/Kbuild.include10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 2180c88cfe89..bb19c1561f1e 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -77,14 +77,20 @@ cc-option-align = $(subst -functions=0,,\
77 77
78# cc-version 78# cc-version
79# Usage gcc-ver := $(call cc-version, $(CC)) 79# Usage gcc-ver := $(call cc-version, $(CC))
80cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \ 80cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
81 $(if $(1), $(1), $(CC)))
82 81
83# cc-ifversion 82# cc-ifversion
84# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) 83# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
85cc-ifversion = $(shell if [ $(call cc-version, $(CC)) $(1) $(2) ]; then \ 84cc-ifversion = $(shell if [ $(call cc-version, $(CC)) $(1) $(2) ]; then \
86 echo $(3); fi;) 85 echo $(3); fi;)
87 86
87# ld-option
88# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both)
89ld-option = $(shell if $(CC) $(1) \
90 -nostdlib -o ldtest$$$$.out -xc /dev/null \
91 > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi; \
92 rm -f ldtest$$$$.out)
93
88### 94###
89# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= 95# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
90# Usage: 96# Usage: