We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 864

Summary: SDL 1.2.4 fails to build on Mac OS X 10.5/x84_64
Product: SDL Reporter: Max Horn <max>
Component: *don't know*Assignee: Sam Lantinga <slouken>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.14   
Hardware: x86_64   
OS: Mac OS X 10.5 (Intel)   

Description Max Horn 2009-10-20 15:53:16 UTC
Just got a bug report by a user of my Fink package for SDL reporting that SDL 1.2.14 does not build on on Mac OS X 10.5/x84_64.

Looking at it, it seems that in revision 4860 a change was made that was meant to fix building on 32bit (and which partially reverted a change made before to fix building on 64bit) seems to be the cause. Specifically, this one:

  <http://www.libsdl.org/cgi/viewvc.cgi/trunk/SDL/src/cpuinfo/SDL_cpuinfo.c?r1=4847&r2=4860>


This is the build error:

/bin/sh ./libtool --mode=compile gcc-4.0 -g -O2 -I/sw64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/cpuinfo/SDL_cpuinfo.c -o build/SDL_cpuinfo.lo
libtool: compile:  gcc-4.0 -g -O2 -I/sw64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/cpuinfo/SDL_cpuinfo.c -fno-common -DPIC -o build/.libs/SDL_cpuinfo.o
./src/cpuinfo/SDL_cpuinfo.c: In function 'SDL_GetCPUFeatures':
./src/cpuinfo/SDL_cpuinfo.c:167: error: PIC register '%rbx' clobbered in 'asm'
./src/cpuinfo/SDL_cpuinfo.c:167: error: PIC register '%rbx' clobbered in 'asm'
./src/cpuinfo/SDL_cpuinfo.c:236: error: PIC register '%rbx' clobbered in 'asm'
./src/cpuinfo/SDL_cpuinfo.c:236: error: PIC register '%rbx' clobbered in 'asm'
./src/cpuinfo/SDL_cpuinfo.c:236: error: PIC register '%rbx' clobbered in 'asm'
./src/cpuinfo/SDL_cpuinfo.c:167: error: PIC register '%rbx' clobbered in 'asm'
./src/cpuinfo/SDL_cpuinfo.c:167: error: PIC register '%rbx' clobbered in 'asm'
make: *** [build/SDL_cpuinfo.lo] Error 1
### execution of ./configure failed, exit code 2
Comment 1 Sam Lantinga 2009-10-20 21:45:08 UTC
Interesting, it appears to work fine in GCC 4.2, perhaps it's a bug that's since been fixed?
Comment 2 Max Horn 2009-10-20 23:53:39 UTC
Sam, I can confirm that it works with GCC 4.2. As such, I guess this can be considered "false alarm" resp. "bug in compiler".

Closing this, then :).
Comment 3 Sam Lantinga 2009-10-21 07:34:05 UTC
Thanks!