diff options
-rw-r--r-- | scripts/Kbuild.include | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 064f477dfdca..be1c9d65eaf4 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -228,12 +228,13 @@ cc-if-fullversion = $(shell [ $(cc-fullversion) $(1) $(2) ] && echo $(3) || echo | |||
228 | # cc-ldoption | 228 | # cc-ldoption |
229 | # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) | 229 | # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) |
230 | cc-ldoption = $(call try-run-cached,\ | 230 | cc-ldoption = $(call try-run-cached,\ |
231 | $(CC) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) | 231 | $(CC) $(1) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) |
232 | 232 | ||
233 | # ld-option | 233 | # ld-option |
234 | # Usage: LDFLAGS += $(call ld-option, -X) | 234 | # Usage: LDFLAGS += $(call ld-option, -X) |
235 | ld-option = $(call try-run-cached,\ | 235 | ld-option = $(call try-run-cached,\ |
236 | $(CC) -x c /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) | 236 | $(CC) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -x c /dev/null -c -o "$$TMPO"; \ |
237 | $(LD) $(LDFLAGS) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) | ||
237 | 238 | ||
238 | # ar-option | 239 | # ar-option |
239 | # Usage: KBUILD_ARFLAGS := $(call ar-option,D) | 240 | # Usage: KBUILD_ARFLAGS := $(call ar-option,D) |