Subject: egcs optimization strangeness
To: None <current-users@NetBSD.ORG>
From: Thorsten Frueauf <>
List: current-users
Date: 04/25/1998 00:41:19

I tried to compile pkgsrc/games/xjig with NetBSD/i386 current (23.4.98)
using egcs. I got the following error while linking:

gcc -O5 -I/usr/X11R6/include -o xjig xjig.o objects.o stack.o imgbuff.o
puzzle.o                       real.o vec2.o vec2list.o mat2.o
           color_mapper.o gif_image.o gifx_image.o -O2
-fno-strength-reduce      -L/usr/X11R6/lib -lXext -lX11 -lm
objects.o: Definition of symbol `___CTOR_LIST__' (multiply defined)
vec2.o: Definition of symbol `___CTOR_LIST__' (multiply defined)

The problem is the -O5 optimation (this were .C files btw). If I compile
everything with -O2, all compiles/links well. So I can just patch
the -O5 default to -O2 - but this seems to be a problem with egcs, which
should get ironed out...


   Name  : Thorsten Frueauf            Milano@irc cri@onaliM       //
   E-Mail: oder     \X/