[MacPorts] #34213: gcc-apple-4.2 should work around a buggy 10.4 header by turning on __APPLE_ALTIVEC__ with __ALTIVEC__ (was: gcc-apple-4.2 has problems to use Frameworks on PPC Tiger/Mac OS X 10.4.11)

MacPorts noreply at macports.org
Wed Apr 25 11:05:36 PDT 2012


#34213: gcc-apple-4.2 should work around a buggy 10.4 header by turning on
__APPLE_ALTIVEC__ with __ALTIVEC__
--------------------------------------+-------------------------------------
 Reporter:  Peter_Dyballa@…           |       Owner:  jeremyhu@…           
     Type:  defect                    |      Status:  assigned             
 Priority:  Normal                    |   Milestone:                       
Component:  ports                     |     Version:  2.0.4                
 Keywords:                            |        Port:  apple-gcc42          
--------------------------------------+-------------------------------------
Changes (by jeremyhu@…):

  * status:  new => assigned


Comment:

 The main bug is in in the header:

 {{{
 /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:115:
 error: expected specifier-qualifier-list before 'vector'
 }}}

 Tiger's header is incorrectly checking __VEC__ instead of
 __APPLE_ALTIVEC__ at that location.  This is fixed in Leopard's header.

 The second bug (which masks the first) is that gcc-4.0 is enabling support
 for __APPLE_ALTIVEC__ even when it doesn't advertise that support.  The
 preprocessor directives are consistent:

 {{{
 $ echo | /opt/local/bin/gcc-apple-4.2 -arch ppc -dM -E - | grep VEC

 $ echo | /opt/local/bin/gcc-apple-4.2 -arch ppc -dM -E - -faltivec | grep
 VEC
 #define __VEC__ 10206
 #define __ALTIVEC__ 1
 #define __APPLE_ALTIVEC__ 1

 $ echo | /opt/local/bin/gcc-apple-4.2 -arch ppc -dM -E - -mcpu=7450
 -mtune=7450 | grep VEC
 #define __VEC__ 10206
 #define __ALTIVEC__ 1

 ~ $ echo | /usr/bin/gcc-4.0 -arch ppc -dM -E - -faltivec | grep VEC
 #define __VEC__ 10206
 #define __ALTIVEC__ 1
 #define __APPLE_ALTIVEC__ 1

 ~ $ echo | /usr/bin/gcc-4.0 -arch ppc -dM -E - -mcpu=7450 -mtune=7450 |
 grep VEC
 #define __VEC__ 10206
 #define __ALTIVEC__ 1
 }}}

 For now, I suggest you work around this by using -faltivec

-- 
Ticket URL: <https://trac.macports.org/ticket/34213#comment:2>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list