Fix treelang

Andreas Jaeger aj@suse.de
Thu Jun 12 15:26:00 GMT 2003


With Neil's option changes treelang fails to build:
stage1/xgcc -Bstage1/ -B/opt/gcc/3.4-devel/i686-suse-linux-gnu/bin/ -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wmissing-prototypes -Wmissing-declarations -Werror -fno-common   -DHAVE_CONFIG_H    -I. -Itreelang -I/cvs/gcc/gcc -I/cvs/gcc/gcc/treelang -I/cvs/gcc/gcc/config -I/cvs/gcc/gcc/../include treelang/t-options.c -o treelang/t-options.o
stage1/xgcc -Bstage1/ -B/opt/gcc/3.4-devel/i686-suse-linux-gnu/bin/   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Werror -fno-common   -DHAVE_CONFIG_H  -o tree1 \
treelang/tree1.o treelang/treetree.o treelang/lex.o treelang/parse.o \
c-convert.o c-typeck.o c-common.o c-cppbuiltin.o c-decl.o attribs.o \
 main.o libbackend.a ../libiberty/libiberty.a    ../libiberty/libiberty.a  ../libiberty/libiberty.a treelang/t-options.o
treelang/t-options.o(.rodata+0x0): multiple definition of `cl_options_count'
treelang/treetree.o(.bss+0x8):/cvs/gcc/gcc/treelang/treetree.c:157: first defined here
treelang/t-options.o(.rodata+0x20): multiple definition of `cl_options'
treelang/treetree.o(.bss+0x0):/cvs/gcc/gcc/treelang/treetree.c:157: first defined here
/usr/bin/ld: Warning: size of symbol `cl_options' changed from 8 to 40 in treelang/t-options.o
collect2: ld returned 1 exit status

I've committed the appended patch as obvious after testing on
i686-linux-gnu,

Andreas

2003-06-12  Andreas Jaeger  <aj@suse.de>

	* treetree.c: Remove cl_options-count and cl_options.

============================================================
Index: gcc/treelang/treetree.c
--- gcc/treelang/treetree.c	11 Jun 2003 22:21:10 -0000	1.25
+++ gcc/treelang/treetree.c	12 Jun 2003 15:15:15 -0000
@@ -75,8 +75,6 @@
 #include "treetree.h"
 #include "opts.h"
 
-const unsigned int cl_options_count;
-const struct cl_option cl_options[1];
 extern int option_main;
 extern char **file_names;
 

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj



More information about the Gcc-patches mailing list