Commit 0633cab8 authored by Kai Germaschewski's avatar Kai Germaschewski

Rules.make: Remove special rule for $(export-objs)

We can now remove the extra rule for $(export-objs) and instead
just use

$(export-objs): export_flags := -DEXPORT_SYMTAB

to set a variable $(export_flags) for targets listed in $(export-objs)
parent 9ce04433
...@@ -53,7 +53,9 @@ ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-)) ...@@ -53,7 +53,9 @@ ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-))
# Common rules # Common rules
# #
c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) # export_flags will be set to -DEXPORT_SYMBOL for objects in $(export-objs)
c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(export_flags)
cmd_cc_s_c = $(CC) $(c_flags) -S $< -o $@ cmd_cc_s_c = $(CC) $(c_flags) -S $< -o $@
...@@ -311,11 +313,8 @@ endif # CONFIG_MODVERSIONS ...@@ -311,11 +313,8 @@ endif # CONFIG_MODVERSIONS
ifneq "$(strip $(export-objs))" "" ifneq "$(strip $(export-objs))" ""
cmd_cc_o_c_export = $(CC) $(c_flags) -DEXPORT_SYMTAB -c -o $@ $<
$(export-objs): $(TOPDIR)/include/linux/modversions.h $(export-objs): $(TOPDIR)/include/linux/modversions.h
$(export-objs): %.o: %.c dummy $(export-objs): export_flags := -DEXPORT_SYMTAB
$(call if_changed,cmd_cc_o_c_export)
endif endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment