> I got this when compiling wine20001202 configured with CFLAGS set to
> '-mpentiumpro -march=i686 -O6'. When I removed '-O6' from
> CFLAGS it compiled
> without problems. I am using gcc 2.95.2 (debian version 2.95.2-18).
So your are trying to compile the _alpha_ version of a piece of software
with as many optimizations as possible? And you are supprised it breaks? :-)
Seriously, it could just as well be the compiler as something in Wine.
> //
> gcc -o winedbg winedbg.spec.o break.o db_disasm.o display.o editline.o
> expr.o hash.o info.o memory.o module.o msc.o registers.o
> source.o stabs.o
> stack.o types.o inedbg.o y.tab.o lex.yy.o
> -L../dlls -luser32 -lgdi32 -lkernel32 -lntdll -L.. -lwine
> -lwine_unicode -lncurses -lm -lutil -ldl
> winedbg.spec.o(.init+0x1): undefined reference to 'init'
> ../dlls/libuser32.so: undefined reference to 'fini'
> collect2: ld returned 1 exit status
> make: *** [winedbg] Error 1[
> //
I think there is a bug in the compiler, optimizations shouldn't
really effect linking.
In this case I see that init is only refered to in assembler code
which probabably makes gcc optimize it away.
The __attribute__((unused)) in winedbg.spec.c might confused it though.
Try removing it and see what happends.