aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Kbuild.include
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r--scripts/Kbuild.include28
1 files changed, 0 insertions, 28 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 6cf6a8b83b97..4b943f4d2226 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -260,39 +260,11 @@ if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \
260 @set -e; \ 260 @set -e; \
261 $(cmd_and_fixdep), @:) 261 $(cmd_and_fixdep), @:)
262 262
263ifndef CONFIG_TRIM_UNUSED_KSYMS
264
265cmd_and_fixdep = \ 263cmd_and_fixdep = \
266 $(echo-cmd) $(cmd_$(1)); \ 264 $(echo-cmd) $(cmd_$(1)); \
267 scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\ 265 scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\
268 rm -f $(depfile); 266 rm -f $(depfile);
269 267
270else
271
272# Filter out exported kernel symbol names from the preprocessor output.
273# See also __KSYM_DEPS__ in include/linux/export.h.
274# We disable the depfile generation here, so as not to overwrite the existing
275# depfile while fixdep is parsing it.
276flags_nodeps = $(filter-out -Wp$(comma)-M%, $($(1)))
277ksym_dep_filter = \
278 case "$(1)" in \
279 cc_*_c|cpp_i_c) \
280 $(CPP) $(call flags_nodeps,c_flags) -D__KSYM_DEPS__ $< ;; \
281 as_*_S|cpp_s_S) \
282 $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \
283 boot*|build*|cpp_its_S|*cpp_lds_S|dtc|host*|vdso*) : ;; \
284 *) echo "Don't know how to preprocess $(1)" >&2; false ;; \
285 esac | tr ";" "\n" | sed -n 's/^.*=== __KSYM_\(.*\) ===.*$$/_\1/p'
286
287cmd_and_fixdep = \
288 $(echo-cmd) $(cmd_$(1)); \
289 $(ksym_dep_filter) | \
290 scripts/basic/fixdep -e $(depfile) $@ '$(make-cmd)' \
291 > $(dot-target).cmd; \
292 rm -f $(depfile);
293
294endif
295
296# Usage: $(call if_changed_rule,foo) 268# Usage: $(call if_changed_rule,foo)
297# Will check if $(cmd_foo) or any of the prerequisites changed, 269# Will check if $(cmd_foo) or any of the prerequisites changed,
298# and if so will execute $(rule_foo). 270# and if so will execute $(rule_foo).