diff options
| author | Jean Delvare <jdelvare@suse.de> | 2012-10-02 10:42:36 -0400 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2012-10-03 03:03:24 -0400 |
| commit | b1e0d8b70fa31821ebca3965f2ef8619d7c5e316 (patch) | |
| tree | 4df17a3e10de030701ccf0868da1a94c1063b07d /scripts/Kbuild.include | |
| parent | fe04ddf7c2910362f3817c8156e41cbd6c0ee35d (diff) | |
kbuild: Fix gcc -x syntax
The correct syntax for gcc -x is "gcc -x assembler", not
"gcc -xassembler". Even though the latter happens to work, the former
is what is documented in the manual page and thus what gcc wrappers
such as icecream do expect.
This isn't a cosmetic change. The missing space prevents icecream from
recognizing compilation tasks it can't handle, leading to silent kernel
miscompilations.
Besides me, credits go to Michael Matz and Dirk Mueller for
investigating the miscompilation issue and tracking it down to this
incorrect -x parameter syntax.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: stable@vger.kernel.org
Cc: Bernhard Walle <bernhard@bwalle.de>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/Kbuild.include')
| -rw-r--r-- | scripts/Kbuild.include | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 6a3ee981931d..8bb8d3a9f01c 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) |
