tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: libmpeg2 fix for ppc

On Wed, Jun 22, 2022 at 12:27:50PM +0200, Havard Eidnes wrote:
> I don't think it's linked, only compiled with "cc -c".  And that
> succeeds if invoked with -maltivec.

Oh, yes - -maltivec makes gcc pre-define:

> cc -maltivec -dM -E - < /dev/null | fgrep ALTIVE
#define __ALTIVEC__ 1
#define __APPLE_ALTIVEC__ 1

and altivec.h says:

/* If __APPLE_ALTIVEC__ is defined, the compiler supports 'vector',
   'pixel' and 'bool' as context-sensitive AltiVec keywords (in 
   non-AltiVec contexts, they revert to their original meanings,
   if any), so we do not need to define them as macros.  Also,
   avoid defining them as macros for C++ with strict ANSI, as
   this is not compatible.  */

so 'vector' in the test code becomes a keyword and compilation works.

So that test checks for -maltivec support, and <altivec.h> existance/use
is kinda orthogonal.


Home | Main Index | Thread Index | Old Index