[Openal] OS X openal -mtune flag problem
james at infosemi.com
Thu Jun 9 11:36:54 PDT 2005
>I've found out that if I compile the MacOS X openal source with: -mtune=G4
>when compiling for use at in UT2k4 on a G5 (in my example on 10.4.1)
>will result in a Buffer crash.
>But if I use: -mtune=G5 everything works nice in UT2k4 and no crash occur.
-mtune *should* simply apply a hint to the compiler but not limit any
code to run on said architecture.
-mcpu should be used to generate code specificly for specified architecture.
>According to xcode 2.1 this flag only applies to GCC 3.3 but Apple is
>now using 4.0
Apple's gcc 4.0 is *based* on gcc, but not developed by the FSF, so
expect some differences.
gcc 3.4.4 was released May 18, 2005.
>Is this a source problem or only simple a compiler handling error by me?
My guess would be an ABI incompatibility, that your -mtune=G4 may imply
an older ABI from what UT2k4 is using? However I do not own an Apple
machine to verify.
Also, if one optimization changes the stack alignment, it could cause
Also, compiling 32 versus 64-bit code.
Read the section "libstdc++ dylib and C++ ABI stability" from:
This should not be specific to UT2k4/AL. You might want to try some of
your own code which will make it easier to examine the assembly of the
program versus the assembly using objdump/gdb/gcc -S. When you come
across a crash the assembly can tell you what the ABI looks like on both
Snr. Software Engineer
More information about the Openal