[Mono-devel-list] Building Mono with GCC and aggressive optimizations
Marcus
mathpup at mylinuxisp.com
Sat Feb 7 01:19:35 EST 2004
I realize that there is probably little point in trying to improve execution
speed of a JIT with aggressive C optimizations. However, many people
(possibly on the advice of various articles floating around) do set CFLAGS
for aggressive optimization, such as
-O3 -march=athlon-tbird -fomit-frame-pointer -mpreferred-stack-boundary=2
Tonight I discovered that the mono runtime segfaults when it tries to throw an
exception when compiled with flags like those above. I do not recall this
happening before, but I wanted to mention it in case anyone else notices
aberrant behavior.
Is it possible to include a note about this in the docs for mono? Or maybe
even a warning at ./configure time? Some packages like MPlayer display a
warning along the lines of "You specified some C-compiler flags using CFLAGS,
and I'll go ahead and build with those compiler flags, but if you have
problems, don't complain to us."
Point of interest: I'm using GCC 3.2.2:
-fomit-frame-pointer WORKS
-O2 -march=athlon-tbird WORKS
-O3 -march=athlon-tbird -fomit-frame-pointer -mpreferred-stack-boundary=2
FAILS
-O3 -march=athlon-tbird -fomit-frame-pointer FAILS
-O3 -fomit-frame-pointer -mpreferred-stack-boundary=2 FAILS
-O2 -march=athlon-tbird -fomit-frame-pointer -mpreferred-stack-boundary=2
FAILS
More information about the Mono-devel-list
mailing list