Binutils builds broken with -Werror
Nick Clifton
nickc@redhat.com
Tue Mar 22 17:08:00 GMT 2005
Hi Richard,
>>+ # 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)
>>+ $(GENERATED_OFILES):
>>+ $(COMPILE) -c `basename $@ .o`.c -Wno-error
> I don't think you should hard-code -Wno-error like this. Isn't binutils
> supposed to buildable with non-gcc compilers? (And it does build with
> MIPSpro FWIW, or at least it did recently.)
Poo. Well we can rely upon using a GNU-like make program, right ? So
how about this version then ?
Cheers
Nick
Index: binutils/Makefile.am
===================================================================
RCS file: /cvs/src/src/binutils/Makefile.am,v
retrieving revision 1.55
diff -c -3 -p -r1.55 Makefile.am
*** binutils/Makefile.am 22 Feb 2005 12:57:26 -0000 1.55
--- binutils/Makefile.am 22 Mar 2005 16:32:05 -0000
*************** GENERATED_CFILES = \
*** 101,106 ****
--- 101,114 ----
arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
defparse.c deflex.c nlmheader.c rcparse.c rclex.c
+ # 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 = $(subst Werror,Wno-error,$(COMPILE))
+ $(GENERATED_OFILES):
+ $(NO_WERROR_COMPILE) -c `basename $@ .o`.c
+
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
More information about the Binutils
mailing list