This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Binutils builds broken with -Werror
Hi Andreas,
NO_WERROR_COMPILE = $(COMPILE:Werror=Wno-error)
do the desired trick?
Yes it will. But is this construct also GNU Make specific ?
It's POSIX.
Cool - in which case I guess we have to choose between this fix and a
patch to the configure files. I prefer patching Makefile.am since I
have always had difficulty getting configure files to work.
Any objections to this patch then ?
+ # Disable -Werror, if it has been enabled, when building generated C
source
+ # files since old versions of bison & yacc will produce working code which
+ # contain compile time warnings.
+ GENERATED_OFILES := $(GENERATED_CFILES:.c=.o)
+ NO_WERROR_COMPILE = $(COMPILE:Werror=Wno-error)
+ $(GENERATED_OFILES):
+ $(NO_WERROR_COMPILE) -c `basename $@ .o`.c
Cheers
Nick