aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Kbuild.include
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r--scripts/Kbuild.include12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index ed2773edfe71..be39cd1c74cf 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -118,6 +118,11 @@ cc-option-yn = $(call try-run,\
118cc-option-align = $(subst -functions=0,,\ 118cc-option-align = $(subst -functions=0,,\
119 $(call cc-option,-falign-functions=0,-malign-functions=0)) 119 $(call cc-option,-falign-functions=0,-malign-functions=0))
120 120
121# cc-disable-warning
122# Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
123cc-disable-warning = $(call try-run,\
124 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -xc /dev/null -o "$$TMP",-Wno-$(strip $(1)))
125
121# cc-version 126# cc-version
122# Usage gcc-ver := $(call cc-version) 127# Usage gcc-ver := $(call cc-version)
123cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) 128cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
@@ -141,6 +146,11 @@ cc-ldoption = $(call try-run,\
141ld-option = $(call try-run,\ 146ld-option = $(call try-run,\
142 $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) 147 $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
143 148
149# ar-option
150# Usage: KBUILD_ARFLAGS := $(call ar-option,D)
151# Important: no spaces around options
152ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2))
153
144###### 154######
145 155
146### 156###
@@ -187,6 +197,8 @@ ifneq ($(KBUILD_NOCMDDEP),1)
187# User may override this check using make KBUILD_NOCMDDEP=1 197# User may override this check using make KBUILD_NOCMDDEP=1
188arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ 198arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
189 $(filter-out $(cmd_$@), $(cmd_$(1))) ) 199 $(filter-out $(cmd_$@), $(cmd_$(1))) )
200else
201arg-check = $(if $(strip $(cmd_$@)),,1)
190endif 202endif
191 203
192# >'< substitution is for echo to work, 204# >'< substitution is for echo to work,