[SDL] compiling SDL-1.2.12 with CFLAGS="-mcpu=G4" fails

matt hull mattmatteh at mac.com
Sat Nov 17 00:51:13 PST 2007


i tried compiling sdl 1.2.12 with gcc version 4.0.1 (Apple Inc. build  
5465)

CFLAGS="-mcpu=G4" ./configure && make

and it fails with this :
----------------------
/bin/sh ./libtool --mode=compile gcc -mcpu=G4  -I./include - 
D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX - 
fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE - 
maltivec -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/macosx/ 
SDL_coreaudio.c  -o build/SDL_coreaudio.lo
  gcc -mcpu=G4 -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON - 
DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include - 
DXTHREADS -D_THREAD_SAFE -maltivec -force_cpusubtype_ALL -fpascal- 
strings -c ./src/audio/macosx/SDL_coreaudio.c  -fno-common -DPIC -o  
build/.libs/SDL_coreaudio.o
In file included from /System/Library/Frameworks/ 
CoreServices.framework/Frameworks/CarbonCore.framework/Headers/ 
DriverServices.h:32,
                  from /System/Library/Frameworks/ 
CoreServices.framework/Frameworks/CarbonCore.framework/Headers/ 
CarbonCore.h:125,
                  from /System/Library/Frameworks/ 
CoreServices.framework/Headers/CoreServices.h:21,
                  from /System/Library/Frameworks/AudioUnit.framework/ 
Headers/AUComponent.h:21,
                  from /System/Library/Frameworks/AudioUnit.framework/ 
Headers/AudioUnit.h:22,
                  from ./src/audio/macosx/SDL_coreaudio.c:24:
/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
CarbonCore.framework/Headers/MachineExceptions.h:115: error: syntax  
error before 'vector'
/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
CarbonCore.framework/Headers/MachineExceptions.h:120: error: syntax  
error before '}' token
/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
CarbonCore.framework/Headers/MachineExceptions.h:123: error: array  
type has incomplete element type
/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
CarbonCore.framework/Headers/MachineExceptions.h:124: error: field  
'VSCR' has incomplete type
make: *** [build/SDL_coreaudio.lo] Error 1
-------------------------

i have tried without the cflags and with --enable-altivec and it  
compiles.

then i tried on an older version of gcc, gcc version 4.0.1 (Apple  
Computer, Inc. build 5370) and it compiled fine

could anyone offer a suggestion to what changed?

thanks

matt


More information about the SDL mailing list