Skip to contentSkip to conversation

2.6.18-rc1 build error (YACC): followup

DISCUSSION Bob Tracy 3 participants 7 messages Jul 7, 2006 – Jul 10, 2006

lore
Share & tools
lore

Bob Tracy

author
#0 lore raw
Quoted 6 lines · I wrote:

$YACC now seems to be undefined when I do a "make bzImage" and the build process gets to drivers/scsi/aic7xxx/aicasm (with the aic7xxx driver configured as a built-in). As a workaround, it's possible to "cd" into the indicated directory and run "make" directly. Once the default build completes, restarting "make bzImage" from the kernel source root continues as expected.

Found it. The main "Makefile" has "MAKEFLAGS += -rR" uncommented as of 2.6.18-rc1. The deleted comment about "possibly random breakage" that used to be just above that line pretty much says it all :-).

Signature · 4 lines
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
[email protected]
-----------------------------------------------------------------------
#1 lore raw
Quoted 11 lines · Bob Tracy
Quoted 6 lines · I wrote:

$YACC now seems to be undefined when I do a "make bzImage" and the build process gets to drivers/scsi/aic7xxx/aicasm (with the aic7xxx driver configured as a built-in). As a workaround, it's possible to "cd" into the indicated directory and run "make" directly. Once the default build completes, restarting "make bzImage" from the kernel source root continues as expected.

Found it. The main "Makefile" has "MAKEFLAGS += -rR" uncommented as of 2.6.18-rc1. The deleted comment about "possibly random breakage" that used to be just above that line pretty much says it all :-).

Translated: aic7xxx must supply its own definition of YACC or we should put it in the top-level Makefile.

kbuild no longer rely on the predefined variables in make.

Sam

#2 lore raw
In reply to Bob Tracy
Quoted 11 lines · Bob Tracy
Quoted 6 lines · I wrote:

$YACC now seems to be undefined when I do a "make bzImage" and the build process gets to drivers/scsi/aic7xxx/aicasm (with the aic7xxx driver configured as a built-in). As a workaround, it's possible to "cd" into the indicated directory and run "make" directly. Once the default build completes, restarting "make bzImage" from the kernel source root continues as expected.

Found it. The main "Makefile" has "MAKEFLAGS += -rR" uncommented as of 2.6.18-rc1. The deleted comment about "possibly random breakage" that used to be just above that line pretty much says it all :-).

I have now applied a patch where YACC= bison is dined in aicasm/Makefile.
There are no other $(YACC) users in the kernel - the others specify bison direct.

Sam

#3 lore raw
Quoted 8 lines · Sam Ravnborg
Quoted 7 lines · Bob Tracy
Quoted 6 lines · I wrote:

$YACC now seems to be undefined when I do a "make bzImage" and the build process gets to drivers/scsi/aic7xxx/aicasm (with the aic7xxx driver configured as a built-in). As a workaround, it's possible to "cd" into the indicated directory and run "make" directly. Once the default build completes, restarting "make bzImage" from the kernel source root continues as expected.

Quoted 8 lines
Quoted 3 lines

Found it. The main "Makefile" has "MAKEFLAGS += -rR" uncommented as of 2.6.18-rc1. The deleted comment about "possibly random breakage" that used to be just above that line pretty much says it all :-).

I have now applied a patch where YACC= bison is dined in aicasm/Makefile.
There are no other $(YACC) users in the kernel - the others specify bison direct.

I propose the following as a global yacc rule; already used in usr/dash in the klibc tree, and which seems to work for both bison and BSD yacc:

quiet_cmd_yacc = YACC $@

      cmd_yacc = $(YACC) -d -o $@ $<

$(obj)/%.c %(obj)/%.h: $(src)/%.y

        $(call cmd,yacc)

Note that bison seems to make smaller code than yacc, so I definiteily think we should default to bison over yacc.

-hpa

#4 lore raw
Quoted 8 lines · H. Peter Anvin

I propose the following as a global yacc rule; already used in usr/dash in the klibc tree, and which seems to work for both bison and BSD yacc:

quiet_cmd_yacc = YACC $@

      cmd_yacc = $(YACC) -d -o $@ $<

$(obj)/%.c %(obj)/%.h: $(src)/%.y

        $(call cmd,yacc)

klibc and the kernel does not share any rules today.
And yacc is so special that it's not worth it only for yacc to start doing this.

In todays kernel build yacc is never used. For the few cases were output of yacc is needed the kernel include _shipped files. For dash we should maybe consider the same?

Sam

#5 lore raw
Quoted 8 lines · Sam Ravnborg
Quoted 7 lines · H. Peter Anvin

I propose the following as a global yacc rule; already used in usr/dash in the klibc tree, and which seems to work for both bison and BSD yacc:

quiet_cmd_yacc = YACC $@

      cmd_yacc = $(YACC) -d -o $@ $<

$(obj)/%.c %(obj)/%.h: $(src)/%.y

        $(call cmd,yacc)
Quoted 8 lines

klibc and the kernel does not share any rules today.
And yacc is so special that it's not worth it only for yacc to start doing this.

In todays kernel build yacc is never used. For the few cases were output of yacc is needed the kernel include _shipped files. For dash we should maybe consider the same?

Personally I consider that pretty silly. yacc/bison is a standard, portable utility, and it isn't even architecture-dependent so there is no porting effort.

-hpa

author
#6 lore raw
Quoted 14 lines · H. Peter Anvin
Quoted 13 lines · Sam Ravnborg
Quoted 8 lines · H. Peter Anvin

I propose the following as a global yacc rule; already used in usr/dash in the klibc tree, and which seems to work for both bison and BSD yacc:

quiet_cmd_yacc = YACC $@

      cmd_yacc = $(YACC) -d -o $@ $<

$(obj)/%.c %(obj)/%.h: $(src)/%.y

        $(call cmd,yacc)

klibc and the kernel does not share any rules today.
And yacc is so special that it's not worth it only for yacc to start doing this.

Quoted 8 lines
Quoted 4 lines

In todays kernel build yacc is never used. For the few cases were output of yacc is needed the kernel include _shipped files. For dash we should maybe consider the same?

Personally I consider that pretty silly. yacc/bison is a standard, portable utility, and it isn't even architecture-dependent so there is no porting effort.

While the correct fix is being contemplated, LEX also needs defining in the same aic7xxx/aicasm Makefile context.

Signature · 4 lines
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
[email protected]
-----------------------------------------------------------------------