Menu

#197 Altivec code fails to build on GCC 4.8.2

0.68
closed-postponed
nobody
None
5
2017-03-08
2013-10-20
No

mpg123's altivec code fails to build on GCC 4.8.2 (on OS X 10.4.11/G4). The same code works fine with GCC 4.0 and 4.2. Most of the errors are of the type "can't convert value to vector", for example:

synth_altivec.c: In function 'INT123_synth_1to1_altivec':
synth_altivec.c:309:3: error: can't convert value to a vector
vmax = (vector float)(32767.0f);
^

Build logs: https://gist.github.com/anonymous/7066873

Discussion

  • Thomas Orgis

    Thomas Orgis - 2013-10-21

    Our expert says this:

    > I guess it is a problem on OSX with non-Apple compiler (not a gcc version issue). Changing
    > #if(n)def __APPLE__
    > into
    > #if(n)def __APPLE_CC__
    > will work. This also applies to dct64_altivec.c.
    > -Taihei
    

    Can you confirm that? A simple

    sh$ perl -pi -e s:__APPLE__:__APPLE_CC__: src/libmpg123/*altivec.c
    

    should do the trick

     

    Last edit: Thomas Orgis 2013-10-21
  • Thomas Orgis

    Thomas Orgis - 2016-09-24

    Any test report on this one? It looks fairly simple, but I hesitate to import this change without any testing. Is there someone with a G5 Mac still around?

     
  • Misty De Meo

    Misty De Meo - 2016-09-24

    I can test this on a PowerBook G4 next week.

     
  • Thomas Orgis

    Thomas Orgis - 2017-03-08
    • status: open --> closed-postponed
     

Log in to post a comment.