diff options
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r-- | scripts/Makefile.build | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 468fbc9016c7..d21f0eac2e52 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -153,12 +153,18 @@ $(obj)/%.i: $(src)/%.c FORCE | |||
153 | 153 | ||
154 | quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ | 154 | quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ |
155 | cmd_cc_symtypes_c = \ | 155 | cmd_cc_symtypes_c = \ |
156 | set -e; \ | ||
156 | $(CPP) -D__GENKSYMS__ $(c_flags) $< \ | 157 | $(CPP) -D__GENKSYMS__ $(c_flags) $< \ |
157 | | $(GENKSYMS) -T $@ >/dev/null; \ | 158 | | $(GENKSYMS) -T $@ \ |
159 | -r $(firstword $(wildcard \ | ||
160 | $(@:.symtypes=.symref) /dev/null)) \ | ||
161 | $(if $(KBUILD_PRESERVE),-p) \ | ||
162 | -a $(ARCH) \ | ||
163 | >/dev/null; \ | ||
158 | test -s $@ || rm -f $@ | 164 | test -s $@ || rm -f $@ |
159 | 165 | ||
160 | $(obj)/%.symtypes : $(src)/%.c FORCE | 166 | $(obj)/%.symtypes : $(src)/%.c FORCE |
161 | $(call if_changed_dep,cc_symtypes_c) | 167 | $(call cmd,cc_symtypes_c) |
162 | 168 | ||
163 | # C (.c) files | 169 | # C (.c) files |
164 | # The C file is compiled and updated dependency information is generated. | 170 | # The C file is compiled and updated dependency information is generated. |
@@ -187,7 +193,11 @@ cmd_modversions = \ | |||
187 | if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ | 193 | if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ |
188 | $(CPP) -D__GENKSYMS__ $(c_flags) $< \ | 194 | $(CPP) -D__GENKSYMS__ $(c_flags) $< \ |
189 | | $(GENKSYMS) $(if $(KBUILD_SYMTYPES), \ | 195 | | $(GENKSYMS) $(if $(KBUILD_SYMTYPES), \ |
190 | -T $(@D)/$(@F:.o=.symtypes)) -a $(ARCH) \ | 196 | -T $(@:.o=.symtypes)) \ |
197 | -r $(firstword $(wildcard \ | ||
198 | $(@:.o=.symref) /dev/null)) \ | ||
199 | $(if $(KBUILD_PRESERVE),-p) \ | ||
200 | -a $(ARCH) \ | ||
191 | > $(@D)/.tmp_$(@F:.o=.ver); \ | 201 | > $(@D)/.tmp_$(@F:.o=.ver); \ |
192 | \ | 202 | \ |
193 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ | 203 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ |