diff options
| author | Stefan Schmidt <stefan@datenfreihafen.org> | 2019-03-19 16:25:37 +0100 |
|---|---|---|
| committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2019-03-19 16:25:37 +0100 |
| commit | 86008304dc2ad41a274cdacb585c641ec6bbb558 (patch) | |
| tree | 7d8fdd6d9cbba05cebb7d36c4309ea2bb48e0af0 /scripts/Kbuild.include | |
| parent | ieee802154: hwsim: propagate genlmsg_reply return code (diff) | |
| parent | Documentation: networking: Update netdev-FAQ regarding patches (diff) | |
| download | linux-86008304dc2ad41a274cdacb585c641ec6bbb558.tar.gz linux-86008304dc2ad41a274cdacb585c641ec6bbb558.zip | |
Merge remote-tracking branch 'net/master'
Diffstat (limited to 'scripts/Kbuild.include')
| -rw-r--r-- | scripts/Kbuild.include | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 30816037036e..7484b9d8272f 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -24,6 +24,10 @@ depfile = $(subst $(comma),_,$(dot-target).d) basetarget = $(basename $(notdir $@)) ### +# real prerequisites without phony targets +real-prereqs = $(filter-out $(PHONY), $^) + +### # Escape single quote for use in echo statements escsq = $(subst $(squote),'\$(squote)',$1) @@ -67,14 +71,10 @@ endef # cc-cross-prefix # Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-) -# Return first prefix where a prefix$(CC) is found in PATH. -# If no $(CC) found in PATH with listed prefixes return nothing -cc-cross-prefix = \ - $(word 1, $(foreach c,$(1), \ - $(shell set -e; \ - if (which $(strip $(c))$(CC)) > /dev/null 2>&1 ; then \ - echo $(c); \ - fi))) +# Return first <prefix> where a <prefix>gcc is found in PATH. +# If no gcc found in PATH with listed prefixes return nothing +cc-cross-prefix = $(firstword $(foreach c, $(filter-out -%, $(1)), \ + $(if $(shell which $(c)gcc), $(c)))) # output directory for tests below TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) @@ -134,12 +134,9 @@ cc-option-yn = $(call try-run,\ cc-disable-warning = $(call try-run,\ $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) -# cc-version -cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) - # cc-ifversion # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) -cc-ifversion = $(shell [ $(cc-version) $(1) $(2) ] && echo $(3) || echo $(4)) +cc-ifversion = $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $(2)000 ] && echo $(3) || echo $(4)) # cc-ldoption # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) |
