History

kbuild: remove support for single %.symtypes build rule

This rule is unnecessary because you can generate foo/bar.symtypes as a side effect using: $ make KBUILD_SYMTYPES=1 foo/bar.o While compiling *.o is slower than preprocessing, the impact is negligible. I prioritize keeping the code simpler.

Masahiro Yamada committed 2 years ago

Commit 91ca8be1 parent c2386ab2 files · +5 −19Browse files

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

Unified · Split

scripts/Makefile.build+4−18
@@ -108,19 +108,13 @@ $(obj)/%.i: $(obj)/%.c FORCE · 107 unmodified lines
108108 $(call if_changed_dep,cpp_i_c)
109109
110110 genksyms = $(objtree)/scripts/genksyms/genksyms \
111− $(if $(1), -T $(2)) \
112− $(if $(KBUILD_PRESERVE), -p) \
113− $(addprefix -r , $(wildcard $(2:.symtypes=.symref)))
111+ $(if $(KBUILD_SYMTYPES), -T $(@:.o=.symtypes)) \
112+ $(if $(KBUILD_PRESERVE), -p) \
113+ $(addprefix -r , $(wildcard $(@:.o=.symref)))
114114
115115 # These mirror gensymtypes_S and co below, keep them in synch.
116116 cmd_gensymtypes_c = $(CPP) -D__GENKSYMS__ $(c_flags) $< | $(genksyms)
117117
118−quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@
119− cmd_cc_symtypes_c = $(call cmd_gensymtypes_c,true,$@) >/dev/null
120−
121−$(obj)/%.symtypes : $(obj)/%.c FORCE
122− $(call cmd,cc_symtypes_c)
123−
124118 # LLVM assembly
125119 # Generate .ll files from .c
126120 quiet_cmd_cc_ll_c = CC $(quiet_modtag) $@
@@ -158,8 +152,7 @@ ifdef CONFIG_MODVERSIONS · 31 unmodified lines
158152
159153 gen_symversions = \
160154 if $(NM) $@ 2>/dev/null | grep -q ' __export_symbol_'; then \
161− $(call cmd_gensymtypes_$(1),$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
162− >> $(dot-target).cmd; \
155+ $(cmd_gensymtypes_$1) >> $(dot-target).cmd; \
163156 fi
164157
165158 cmd_gen_symversions_c = $(call gen_symversions,c)
@@ -323,13 +316,6 @@ cmd_gensymtypes_S = \ · 157 unmodified lines
323316 $(NM) $@ | sed -n 's/.* __export_symbol_\(.*\)/EXPORT_SYMBOL(\1);/p' ; } | \
324317 $(CPP) -D__GENKSYMS__ $(c_flags) -xc - | $(genksyms)
325318
326−quiet_cmd_cc_symtypes_S = SYM $(quiet_modtag) $@
327− cmd_cc_symtypes_S = $(call cmd_gensymtypes_S,true,$@) >/dev/null
328−
329−$(obj)/%.symtypes : $(obj)/%.S FORCE
330− $(call cmd,cc_symtypes_S)
331−
332−
333319 quiet_cmd_cpp_s_S = CPP $(quiet_modtag) $@
334320 cmd_cpp_s_S = $(CPP) $(a_flags) -o $@ $<
335321

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