housekeeping, -Wno-error
Nick Clifton
nickc@redhat.com
Tue Apr 12 08:37:00 GMT 2005
Hi Alan,
>>Are we assuming that gcc is the only supported compiler for binutils?
> Good question. I hadn't even thought about that, just followed Nick's
> lead with -Wno-error in gas/. -W{no-,}error probably ought to only
> happen by default for gcc.
Actually I was waiting for Maciej's patch to fix this problem in the
configure files. In the meantime however I was about to apply a
Makefile based patch like this:
+ # 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
+
Which does not depend upon the host compiler being GCC. My bad for not
applying this patch sooner. Ideally the configure based solution would
be best since it could check for known good versions of bison/yacc/flex
etc and keep -Werror enabled for them.
Cheers
Nick
More information about the Binutils
mailing list