[Openal] OS X openal -mtune flag problem
James Tomaschke
james at infosemi.com
Thu Jun 9 11:36:54 PDT 2005
petter wrote:
>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.
>
>
Hi Petter,
-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
problems.
Also, compiling 32 versus 64-bit code.
Read the section "libstdc++ dylib and C++ ABI stability" from:
http://developer.apple.com/releasenotes/DeveloperTools/GCC4.html
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
sides.
HTH
Cheers,
/james
>
>kind regards
>
>Petter Flink
>
>
--
James Tomaschke
Snr. Software Engineer
InfoSemiconductor, Inc.
More information about the Openal
mailing list