tags 330521 + unreproducible
thanks

Michal =?UTF-8?Q?=C4=8Ciha=C5=99?= writes:
> Package: gcc-4.0
> Version: 4.0.1-9
> Severity: normal
> 
> Hi
> 
> while compiling with different parameters order you get different
> results:
> 
> $ gcc -g -L/usr/X11R6/lib/ -lGL -lglut -lGLU -pthread -Wall configure.c -o 
> configure.bin 
> configure.c: In function \xE2\x80\x98main\xE2\x80\x99:
> configure.c:11: warning: assignment discards qualifiers from pointer target 
> type
> $ ./configure.bin 
> $ gcc -g configure.c -L/usr/X11R6/lib/ -lGL -lglut -lGLU -pthread -Wall -o 
> configure.bin 
> configure.c: In function \xE2\x80\x98main\xE2\x80\x99:
> configure.c:11: warning: assignment discards qualifiers from pointer target 
> type
> $ ./configure.bin 
> Segmentation fault
> 
> Note that only source filename has moved from end to beginning and
> program runs differently (segfault is a code problem). This is taken
> from configure of Raydium engine [1], problematic file attached to bug
> report.
> 
> 1. http://raydium.cqfd-corp.org/
> 
> Preprocessed files (*.i) and assembly (*.s) are same in both cases, 
> only difference is how collect2 is called, once (in failing case)
> resulting object is before GL libs, second time after then. But order 
> should not matter, or am I wrong?

I cannot reproduce the segfault on amd64.

In general the order does matter, so you should pass the libraries
after object files, and order the libraries so that undefined
references in a library can be resolved by libraries following the
referencing library on the command line.

Reply via email to