Skip to contentSkip to conversation

fix parallel builds for aic7xxx

PATCH In review John Cherry 3 participants 3 messages Aug 15, 2003 – Aug 16, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix parallel builds for aic7xxx

My compile regression scripts were getting random build failures for aic7xxx. The two makefiles could not handle parallel build. Occasionally they would succeed...timing dependent. The following two patches fix this.

Part 1 - drivers/scsi/aic7xxx/Makefile
Part 2 - drivers/scsi/aic7xxx/aicasm/Makefile

John

drivers/scsi/aic7xxx/Makefile +6 -2
@@ -58,7 +58,9 @@
 	-p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h
 
 ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
-$(aic7xxx-gen-y): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
+$(aic7xxx-gen-y): $(src)/aic7xxx.seq 
+
+$(src)/aic7xxx.seq: $(obj)/aicasm/aicasm $(src)/aic7xxx.reg
 	$(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \
 			      $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \
 			      $(src)/aic7xxx.seq
@@ -72,7 +74,9 @@
 	-p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h
 
 ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
-$(aic79xx-gen-y): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
+$(aic79xx-gen-y): $(src)/aic79xx.seq
+
+$(src)/aic79xx.seq: $(obj)/aicasm/aicasm $(src)/aic79xx.reg
 	$(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \
 			      $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
 			      $(src)/aic79xx.seq
drivers/scsi/aic7xxx/aicasm/Makefile +8 -4
@@ -49,14 +49,18 @@
 clean:
 	rm -f $(clean-files)
 
-aicasm_gram.c aicasm_gram.h: aicasm_gram.y
+aicasm_gram.c: aicasm_gram.h 
+	mv $(<:.h=).tab.c $(<:.h=.c)
+
+aicasm_gram.h: aicasm_gram.y
 	$(YACC) $(YFLAGS) -b $(<:.y=) $<
-	mv $(<:.y=).tab.c $(<:.y=.c)
 	mv $(<:.y=).tab.h $(<:.y=.h)
 
-aicasm_macro_gram.c aicasm_macro_gram.h: aicasm_macro_gram.y
+aicasm_macro_gram.c: aicasm_macro_gram.h
+	mv $(<:.h=).tab.c $(<:.h=.c)
+
+aicasm_macro_gram.h: aicasm_macro_gram.y
 	$(YACC) $(YFLAGS) -b $(<:.y=) -p mm $<
-	mv $(<:.y=).tab.c $(<:.y=.c)
 	mv $(<:.y=).tab.h $(<:.y=.h)
 
 aicasm_scan.c: aicasm_scan.l
#1 lore raw

While on the subject of aic7xxx Makefiles, they add the "-Werror" flag to CFLAGS in both lk 2.4.22-rc2 and lk 2.6.0-test3 .

This flag can be annoying if there is some messiness in include files somewhere. In my case some mis-applied patches in the ide headers cause otherwise harmless compiler warning. That is until my kernel build tries to build the aic7xxx driver.

As a side note drivers/scsi/aic7xxx/Makefile seems to be the only Makefile in lk 2.4.22-rc2 adding the "-Werror" flag. About a dozen Makefiles add it in lk 2.6.0-test3 (mainly in the alpha and sparc64 architecture trees).

Doug Gilbert

#2 lore raw
Quoted 8 lines · Douglas Gilbert

While on the subject of aic7xxx Makefiles, they add the "-Werror" flag to CFLAGS in both lk 2.4.22-rc2 and lk 2.6.0-test3 .

This flag can be annoying if there is some messiness in include files somewhere. In my case some mis-applied patches in the ide headers cause otherwise harmless compiler warning. That is until my kernel build tries to build the aic7xxx driver.

The incentive for the aic7xx maintainer is that he do detect if a warning happens before actually shipping a patch.
Same goes for alpha and sparc64, I recall both David and Richard wanted to achieve the same goal.

[Wondering if kbuild could do something smart here...]

During the 2.4 series Linus added -Werror to CFLAGS in the top-level makefile, simply to put more focus on warnings. If was only momentarily but a lot af patches showed up removing the source of the errors. The dense output from kbuild these days makes warnings much more visible, and if you follow John Cherry nice statistics you can see that the number of warnings generally decrease for each new kernel release.

Sam