Binutils builds broken with -Werror

Nick Clifton nickc@redhat.com
Wed Mar 23 14:41:00 GMT 2005


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



More information about the Binutils mailing list