This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: -Werror change caught something unexpected, handle it

Bootstraps with BSD make have been failing on FreeBSD 5 with bison
1.35 installed with this message:

../stage1/xgcc -B../stage1/ -B/home/ljrittle/tmp-ref5/install-ref5/i386-unknown-freebsd5.0/bin/ -c -DIN_GCC -DLOCALEDIR=\"/home/ljrittle/tmp-ref5/install-ref5/share/locale\" -DLOCALE_ALIAS_PATH=\"/home/ljrittle/tmp-ref5/install-ref5/share/locale\"  -DLIBDIR=\"/home/ljrittle/tmp-ref5/install-ref5/lib\" -DHAVE_CONFIG_H -I.. -I. -I/home/ljrittle/tmp-ref5/outside-cvs-src/gcc/gcc/intl -I/home/ljrittle/tmp-ref5/outside-cvs-src/gcc/gcc  -I/home/ljrittle/tmp-ref5/outside-cvs-src/gcc/gcc/config -I/home/ljrittle/tmp-ref5/outside-cvs-src/gcc/gcc/../include  -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -fno-common -Werror   plural.c -o plural.o
/usr/local/share/bison/bison.simple: In function `gettextparse__':
/usr/local/share/bison/bison.simple:379: warning: traditional C rejects ISO C style function definitions
*** Error code 1

There appear to be two unrelated issues:

(1) When BSD make is used instead of GNU make, gcc/intl/plural.c is
    regenerated in objdir even though date stamps on gcc/intl/plural.y
    and gcc/intl/plural.c are properly ordered.

(2) -Werror is catching something in bison.simple (1.35) over which
    gcc itself has no control.

It last bootstrapped 20030120 into libjava (where it has failed due to
GNU makeisms since it was originally pulled into the primary CVS
tree).  The -Werror stuff was enabled on 20030121.  Fixing (1) should
hide (2) again.  However, the following patch is the most reasonable
self-contained thing to do since we treat gcc/intl as an import and we
are not inclined to fix issues related to supporting multiple bison
versions with such imported code bases (this is the "party line" AFAIK).

Rebuilt gcc/intl/Makefile in already bootstrapped tree then tested
`make clean all' with every make to which I have access.  No make
implementation now attempts to rebuild plural.c in objdir.

Although it seems obvious to me, approval for mainline please?


	(in gcc/intl:)
	* (.y.c): Only enable production rule when

Index: gcc/intl/
RCS file: /cvs/gcc/gcc/gcc/intl/,v
retrieving revision 1.6
diff -c -r1.6
*** gcc/intl/	10 Dec 2001 12:04:22 -0000	1.6
--- gcc/intl/	20 Feb 2003 01:27:53 -0000
*** 95,103 ****
  	$(LIBTOOL) --mode=compile $(COMPILE) $<
! 	$(YACC) $(YFLAGS) --output $@ $<
! 	rm -f $*.h
  	sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
--- 95,106 ----
  	$(LIBTOOL) --mode=compile $(COMPILE) $<
+ # Unless maintaining, suppress (a) smart makes who think they know how to
+ # automake Yacc files and (b) makes who handle VPATH search of generated
+ # files differently than GNU make.
! @MAINT@	$(YACC) $(YFLAGS) --output $@ $<
! @MAINT@	rm -f $*.h
  	sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]