diff options
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r-- | scripts/Makefile.build | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index e8e7d27cfc9a..3cb445cc7432 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -140,6 +140,15 @@ cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $< | |||
140 | %.i: %.c FORCE | 140 | %.i: %.c FORCE |
141 | $(call if_changed_dep,cc_i_c) | 141 | $(call if_changed_dep,cc_i_c) |
142 | 142 | ||
143 | quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ | ||
144 | cmd_cc_symtypes_c = \ | ||
145 | $(CPP) -D__GENKSYMS__ $(c_flags) $< \ | ||
146 | | $(GENKSYMS) -T $@ >/dev/null; \ | ||
147 | test -s $@ || rm -f $@ | ||
148 | |||
149 | %.symtypes : %.c FORCE | ||
150 | $(call if_changed_dep,cc_symtypes_c) | ||
151 | |||
143 | # C (.c) files | 152 | # C (.c) files |
144 | # The C file is compiled and updated dependency information is generated. | 153 | # The C file is compiled and updated dependency information is generated. |
145 | # (See cmd_cc_o_c + relevant part of rule_cc_o_c) | 154 | # (See cmd_cc_o_c + relevant part of rule_cc_o_c) |
@@ -166,7 +175,8 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< | |||
166 | cmd_modversions = \ | 175 | cmd_modversions = \ |
167 | if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ | 176 | if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ |
168 | $(CPP) -D__GENKSYMS__ $(c_flags) $< \ | 177 | $(CPP) -D__GENKSYMS__ $(c_flags) $< \ |
169 | | $(GENKSYMS) -a $(ARCH) \ | 178 | | $(GENKSYMS) $(if $(KBUILD_SYMTYPES), \ |
179 | -T $(@D)/$(@F:.o=.symtypes)) -a $(ARCH) \ | ||
170 | > $(@D)/.tmp_$(@F:.o=.ver); \ | 180 | > $(@D)/.tmp_$(@F:.o=.ver); \ |
171 | \ | 181 | \ |
172 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ | 182 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ |