X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2FMakefile.build;h=277cfe0b71001e69bc67d3eda6407250d07d7ab8;hb=656ee82cc855027b2e994ad218519b09fa652cc1;hp=db38ef465a632dfd268826fc532a1a281773923b;hpb=551559e13af1ccd19d0525cb2b0f308905170647;p=linux-2.6 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index db38ef465a..277cfe0b71 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -27,12 +27,12 @@ ccflags-y := cppflags-y := ldflags-y := -# Read .config if it exist, otherwise ignore +# Read auto.conf if it exists, otherwise ignore -include include/config/auto.conf include scripts/Kbuild.include -# For backward compatibility check that these variables does not change +# For backward compatibility check that these variables do not change save-cflags := $(CFLAGS) # The filename Kbuild has precedence over Makefile @@ -55,7 +55,7 @@ hostprogs-y += $(host-progs) endif endif -# Do not include host rules unles needed +# Do not include host rules unless needed ifneq ($(hostprogs-y)$(hostprogs-m),) include scripts/Makefile.host endif @@ -103,6 +103,10 @@ ifneq ($(KBUILD_CHECKSRC),0) endif endif +# Do section mismatch analysis for each module/built-in.o +ifdef CONFIG_DEBUG_SECTION_MISMATCH + cmd_secanalysis = ; scripts/mod/modpost $@ +endif # Compile C sources (.c) # --------------------------------------------------------------------------- @@ -268,7 +272,8 @@ ifdef builtin-target quiet_cmd_link_o_target = LD $@ # If the list of objects to link is empty, just create an empty built-in.o cmd_link_o_target = $(if $(strip $(obj-y)),\ - $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^),\ + $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^) \ + $(cmd_secanalysis),\ rm -f $@; $(AR) rcs $@) $(builtin-target): $(obj-y) FORCE @@ -316,7 +321,7 @@ $($(subst $(obj)/,,$(@:.o=-objs))) \ $($(subst $(obj)/,,$(@:.o=-y)))), $^) quiet_cmd_link_multi-y = LD $@ -cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) +cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis) quiet_cmd_link_multi-m = LD [M] $@ cmd_link_multi-m = $(cmd_link_multi-y)