This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Re: Binutils builds broken with -Werror


Hi Daniel,

We need to either disable -Werror for generated files, or accomodate
different versions of flex/bison more flexibly.  I recommend the former...

*sigh* Yes you are right. What do you think of the following patch ? It works for me, but my makefile-fu is not the greatest so there might be a better way of expressing what we want.


This patch is for the binutils subdirectory. I have a similar patch for the ld subdirectory and a simpler one for the gas subdirectory as that only has one generated source file. If there are no objections to this method then I will apply the patches tomorrow.

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	21 Mar 2005 08:27:56 -0000
*************** GENERATED_CFILES = \
*** 101,106 ****
--- 101,113 ----
  	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)
+ $(GENERATED_OFILES):
+ $(COMPILE) -c `basename $@ .o`.c -Wno-error
+
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c



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