diff options
Diffstat (limited to 'scripts/Kbuild.include')
| -rw-r--r-- | scripts/Kbuild.include | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 6a3ee981931d..978416dd31ca 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -98,24 +98,24 @@ try-run = $(shell set -e; \ | |||
| 98 | # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) | 98 | # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) |
| 99 | 99 | ||
| 100 | as-option = $(call try-run,\ | 100 | as-option = $(call try-run,\ |
| 101 | $(CC) $(KBUILD_CFLAGS) $(1) -c -xassembler /dev/null -o "$$TMP",$(1),$(2)) | 101 | $(CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(1),$(2)) |
| 102 | 102 | ||
| 103 | # as-instr | 103 | # as-instr |
| 104 | # Usage: cflags-y += $(call as-instr,instr,option1,option2) | 104 | # Usage: cflags-y += $(call as-instr,instr,option1,option2) |
| 105 | 105 | ||
| 106 | as-instr = $(call try-run,\ | 106 | as-instr = $(call try-run,\ |
| 107 | printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3)) | 107 | printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3)) |
| 108 | 108 | ||
| 109 | # cc-option | 109 | # cc-option |
| 110 | # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) | 110 | # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) |
| 111 | 111 | ||
| 112 | cc-option = $(call try-run,\ | 112 | cc-option = $(call try-run,\ |
| 113 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2)) | 113 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) |
| 114 | 114 | ||
| 115 | # cc-option-yn | 115 | # cc-option-yn |
| 116 | # Usage: flag := $(call cc-option-yn,-march=winchip-c6) | 116 | # Usage: flag := $(call cc-option-yn,-march=winchip-c6) |
| 117 | cc-option-yn = $(call try-run,\ | 117 | cc-option-yn = $(call try-run,\ |
| 118 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n) | 118 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) |
| 119 | 119 | ||
| 120 | # cc-option-align | 120 | # cc-option-align |
| 121 | # Prefix align with either -falign or -malign | 121 | # Prefix align with either -falign or -malign |
| @@ -125,7 +125,7 @@ cc-option-align = $(subst -functions=0,,\ | |||
| 125 | # cc-disable-warning | 125 | # cc-disable-warning |
| 126 | # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) | 126 | # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) |
| 127 | cc-disable-warning = $(call try-run,\ | 127 | cc-disable-warning = $(call try-run,\ |
| 128 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -xc /dev/null -o "$$TMP",-Wno-$(strip $(1))) | 128 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) |
| 129 | 129 | ||
| 130 | # cc-version | 130 | # cc-version |
| 131 | # Usage gcc-ver := $(call cc-version) | 131 | # Usage gcc-ver := $(call cc-version) |
| @@ -143,7 +143,7 @@ cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) | |||
| 143 | # cc-ldoption | 143 | # cc-ldoption |
| 144 | # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) | 144 | # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) |
| 145 | cc-ldoption = $(call try-run,\ | 145 | cc-ldoption = $(call try-run,\ |
| 146 | $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2)) | 146 | $(CC) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) |
| 147 | 147 | ||
| 148 | # ld-option | 148 | # ld-option |
| 149 | # Usage: LDFLAGS += $(call ld-option, -X) | 149 | # Usage: LDFLAGS += $(call ld-option, -X) |
| @@ -209,7 +209,7 @@ endif | |||
| 209 | # >$< substitution to preserve $ when reloading .cmd file | 209 | # >$< substitution to preserve $ when reloading .cmd file |
| 210 | # note: when using inline perl scripts [perl -e '...$$t=1;...'] | 210 | # note: when using inline perl scripts [perl -e '...$$t=1;...'] |
| 211 | # in $(cmd_xxx) double $$ your perl vars | 211 | # in $(cmd_xxx) double $$ your perl vars |
| 212 | make-cmd = $(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1))))) | 212 | make-cmd = $(subst \\,\\\\,$(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1)))))) |
| 213 | 213 | ||
| 214 | # Find any prerequisites that is newer than target or that does not exist. | 214 | # Find any prerequisites that is newer than target or that does not exist. |
| 215 | # PHONY targets skipped in both cases. | 215 | # PHONY targets skipped in both cases. |
