History

kbuild: fix ksym_dep_filter when multiple EXPORT_SYMBOL() on the same line

In kernel/cgroup.c there is: #define SUBSYS(_x) \ DEFINE_STATIC_KEY_TRUE(_x ## _cgrp_subsys_enabled_key); \ DEFINE_STATIC_KEY_TRUE(_x ## _cgrp_subsys_on_dfl_key); \ EXPORT_SYMBOL_GPL(_x ## _cgrp_subsys_enabled_key); \ EXPORT_SYMBOL_GPL(_x ## _cgrp_subsys_on_dfl_key); The expansion of this macro causes multiple EXPORT_SYMBOL_GPL() instances to appear on the same preprocessor line output, confusing the sed script expecting only one of them per line. Unfortunately this can't be fixed nicely in the sed script as sed's regexp can't do non greedy matching. Fix this by turning any semicolon into a line break before filtering.

Nicolas Pitre committed 10 years ago

Commit f110e0f1 parent e72e2df1 file · +1 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/Kbuild.include+1−1
@@ -281,7 +281,7 @@ ksym_dep_filter = \ · 280 unmodified lines
281281 $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \
282282 boot*|build*|*cpp_lds_S|dtc|host*|vdso*) : ;; \
283283 *) echo "Don't know how to preprocess $(1)" >&2; false ;; \
284− esac | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p'
284+ esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p'
285285
286286 cmd_and_fixdep = \
287287 $(echo-cmd) $(cmd_$(1)); \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t