Marco Manfredini reports:
Compiling the cairo release with gcc-4.0.1 and -O3 fails in pixman/src
$ gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I. -mmmx -msse -Winline --param
inline-unit-growth=10000 --param large-function-growth=10000 -O3
-march=athlon-xp -fomit-frame-pointer -MT libpixman_mmx_la-fbmmx.lo -MD -MP
-MF .deps/libpixman_mmx_la-fbmmx.Tpo -c fbmmx.c -o libpixman_mmx_la-fbmmx.o
/tmp/ccUfhV8U.s: Assembler messages:
/tmp/ccUfhV8U.s:783: Error: symbol `skip' is already defined
/tmp/ccUfhV8U.s:878: Error: symbol `skip2' is already defined
That's because gcc-4.0.1 is inlining more aggressively and duplicates the
assembly in detectCPUFeatures().
Created attachment 3091 [details] [review]
Patch I've applied to cairo/pixman
I've applied the attached patch to libpixman; Marco tested that
it fixed his problem. Billy - can you do the merge-to-xserver
While I have no problem with the change, it seems like the problem occurs when
fbHaveMMX is inlined into fbComposeSetupMMX, which seems odd. Are we bringing
any of this onto ourselves by compiling with these parameters:
-Winline --param inline-unit-growth=10000 --param large-function-growth=10000
Or, is this just -O3 being completely insane and bloating code?
I have applied the patch to xserver.
It may indeed be a bad interaction between our "inline big functions"
parameters and -O3's "inline even when not asked for" behavior. But I think
the change is correct in any case.