diff options
author | Don Zickus <dzickus@redhat.com> | 2010-05-24 17:07:24 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-06-04 06:46:48 -0400 |
commit | e26d6b834cc4a68adeb82abbdce7205df7599118 (patch) | |
tree | a3f8ac014062c0eb394fa47f16226a4a8bf9e326 /scripts/Makefile.build | |
parent | 64ffc9ff424c65adcffe7d590018cc75e2d5d42a (diff) |
Makefile.build: make KBUILD_SYMTYPES work again
commit 37a8d9f67f18de1e2cbc7387311ce22d4dbff518 tried to combine some
duplicate code and accidentally broke how KBUILD_SYMTYPES worked
This fixes the code to match the original intention by the author who
originally added the code I believe.
The fixes include:
- removing extra whitespaces in the if-statements
- moving the if-statement from around the -r to the -T
- adding a second arg to cmd_gensymtypes to simplify the options passed
to genksyms.
Tested by instrumenting genksyms and seeing what options were passed in
during a make, KBUILD_SYMTYPES make, and when a foo.symref was created.
Everything compiled and looked ok.
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r-- | scripts/Makefile.build | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index e4deb73e9a84..390aae4bb222 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -156,14 +156,14 @@ $(obj)/%.i: $(src)/%.c FORCE | |||
156 | 156 | ||
157 | cmd_gensymtypes = \ | 157 | cmd_gensymtypes = \ |
158 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ | 158 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ |
159 | $(GENKSYMS) -T $@ -a $(ARCH) \ | 159 | $(GENKSYMS) $(if $(1), -T $(2)) -a $(ARCH) \ |
160 | $(if $(KBUILD_PRESERVE),-p) \ | 160 | $(if $(KBUILD_PRESERVE),-p) \ |
161 | $(if $(1),-r $(firstword $(wildcard $(@:.symtypes=.symref) /dev/null))) | 161 | -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) |
162 | 162 | ||
163 | quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ | 163 | quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ |
164 | cmd_cc_symtypes_c = \ | 164 | cmd_cc_symtypes_c = \ |
165 | set -e; \ | 165 | set -e; \ |
166 | $(call cmd_gensymtypes, true) >/dev/null; \ | 166 | $(call cmd_gensymtypes,true,$@) >/dev/null; \ |
167 | test -s $@ || rm -f $@ | 167 | test -s $@ || rm -f $@ |
168 | 168 | ||
169 | $(obj)/%.symtypes : $(src)/%.c FORCE | 169 | $(obj)/%.symtypes : $(src)/%.c FORCE |
@@ -192,16 +192,16 @@ else | |||
192 | # the actual value of the checksum generated by genksyms | 192 | # the actual value of the checksum generated by genksyms |
193 | 193 | ||
194 | cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< | 194 | cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< |
195 | cmd_modversions = \ | 195 | cmd_modversions = \ |
196 | if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ | 196 | if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ |
197 | $(call cmd_gensymtypes, $(KBUILD_SYMTYPES)) \ | 197 | $(call cmd_gensymtypes,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ |
198 | > $(@D)/.tmp_$(@F:.o=.ver); \ | 198 | > $(@D)/.tmp_$(@F:.o=.ver); \ |
199 | \ | 199 | \ |
200 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ | 200 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ |
201 | -T $(@D)/.tmp_$(@F:.o=.ver); \ | 201 | -T $(@D)/.tmp_$(@F:.o=.ver); \ |
202 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ | 202 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ |
203 | else \ | 203 | else \ |
204 | mv -f $(@D)/.tmp_$(@F) $@; \ | 204 | mv -f $(@D)/.tmp_$(@F) $@; \ |
205 | fi; | 205 | fi; |
206 | endif | 206 | endif |
207 | 207 | ||