linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Yacc in 2.4.3 causes kernel compile to fail (aicasm_gram.y)
@ 2001-04-13  5:15 David E. Weekly
  2001-04-13 12:51 ` Alan Cox
  2001-04-13 19:38 ` H. Peter Anvin
  0 siblings, 2 replies; 3+ messages in thread
From: David E. Weekly @ 2001-04-13  5:15 UTC (permalink / raw)
  To: ML-linux-kernel

There is a singular Yacc file in 2.4.3:
linux/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y

This is the first time I remember seeing a Yacc file in the Linux kernel
source code, but I'm young and stupid.

Since the default Makefile mapping for .y files is to call yacc, and since I
have bison on my system instead, compiling the aic7xxx code into 2.4.3 broke
my build.

The Makefile system is expecting the YACC variable to be defined; a
straightforward workaround is then to define:

export YACC="`which bison` -y"

The -y option makes sure that bison outputs files in the same way that yacc
does (i.e., y.tab.c and not [filename].tab.c).

I would put in my two cents that the better way to do this is to add YACC to
the list of "make variables" in the root Makefile.

I'm guessing that anyone compiling the AIC 7xxx SCSI drivers who has bison
and hasn't configured a spoof "yacc" will run into this problem.

-david



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Yacc in 2.4.3 causes kernel compile to fail (aicasm_gram.y)
  2001-04-13  5:15 Yacc in 2.4.3 causes kernel compile to fail (aicasm_gram.y) David E. Weekly
@ 2001-04-13 12:51 ` Alan Cox
  2001-04-13 19:38 ` H. Peter Anvin
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2001-04-13 12:51 UTC (permalink / raw)
  To: David E. Weekly; +Cc: ML-linux-kernel

> The Makefile system is expecting the YACC variable to be defined; a
> straightforward workaround is then to define:
> 
> export YACC="`which bison` -y"

Umm

[root@irongate linux.ac]# which yacc
/usr/bin/yacc
/usr/bin/which: no bison in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/X11R6/bin)

so you would need to check for yacc first.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Yacc in 2.4.3 causes kernel compile to fail (aicasm_gram.y)
  2001-04-13  5:15 Yacc in 2.4.3 causes kernel compile to fail (aicasm_gram.y) David E. Weekly
  2001-04-13 12:51 ` Alan Cox
@ 2001-04-13 19:38 ` H. Peter Anvin
  1 sibling, 0 replies; 3+ messages in thread
From: H. Peter Anvin @ 2001-04-13 19:38 UTC (permalink / raw)
  To: linux-kernel

Followup to:  <061f01c0c3d8$c34e8870$5c044589@legato.com>
By author:    "David E. Weekly" <dweekly@legato.com>
In newsgroup: linux.dev.kernel
> 
> This is the first time I remember seeing a Yacc file in the Linux kernel
> source code, but I'm young and stupid.
> 
> Since the default Makefile mapping for .y files is to call yacc, and since I
> have bison on my system instead, compiling the aic7xxx code into 2.4.3 broke
> my build.
> 

It's a good idea if you have bison installed to have a /usr/bin/yacc
containing:

	#!/bin/sh -
	exec bison -y "$@"

I think there is a reasonably good expectation that the command "yacc"
should do what is expected, without needing any special hacks for
bison -- unless, of course, you're using bison special features.

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-13 19:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-13  5:15 Yacc in 2.4.3 causes kernel compile to fail (aicasm_gram.y) David E. Weekly
2001-04-13 12:51 ` Alan Cox
2001-04-13 19:38 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).