Re: kbuild + kconfig: Updates

From: Sam Ravnborg
Date: Mon Aug 16 2004 - 15:31:11 EST


On Tue, Aug 17, 2004 at 12:20:05AM +0200, Sam Ravnborg wrote:
> >
> > Uhh... It ends up running sparse *twice* and still runs gcc on every
> > file.

This one should be better.

On the sparse topic. Do you see anything against
introducing CHECKFLAGS?
CHECKFLAGS would be assigned the sparse specific flags in
arch/*/Makefile.

I see no reason to introduce EXTRA_CHECKFLAGS, CHECKFLAGS_$(F*)
as known from CFLAGS, AFLAGS. But I like the split into CHECKFLAGS.
That should allow me to do:
make CHECK=my_hacked_sparse C=2

Sam


===== scripts/Makefile.build 1.47 vs edited =====
--- 1.47/scripts/Makefile.build 2004-08-15 21:54:06 +02:00
+++ edited/scripts/Makefile.build 2004-08-17 00:23:52 +02:00
@@ -83,8 +83,13 @@

# Linus' kernel sanity checking tool
ifneq ($(KBUILD_CHECKSRC),0)
-quiet_cmd_checksrc = CHECK $<
- cmd_checksrc = $(CHECK) $(c_flags) $< ;
+ ifeq ($(KBUILD_CHECKSRC),2)
+ quiet_cmd_force_checksrc = CHECK $<
+ cmd_force_checksrc = $(CHECK) $(c_flags) $< ;
+ else
+ quiet_cmd_checksrc = CHECK $<
+ cmd_checksrc = $(CHECK) $(c_flags) $< ;
+ endif
endif


@@ -182,11 +187,13 @@
# Built-in and composite module parts

%.o: %.c FORCE
+ $(call cmd,force_checksrc)
$(call if_changed_rule,cc_o_c)

# Single-part modules are special since we need to mark them in $(MODVERDIR)

$(single-used-m): %.o: %.c FORCE
+ $(call cmd,force_checksrc)
$(call if_changed_rule,cc_o_c)
@{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/