[pacman-dev] makepkg.conf: problematic assumption for ppc

Alex kth5 at archlinuxppc.org
Wed Dec 6 08:15:57 EST 2006

Hey all,

the autotool stuff for pacman-lib writes a makepkg.conf with the 
following C/XXFLAGS when configured on ppc:

CFLAGS="-mcpu=750 -O2 -pipe"
CXXFLAGS="-mcpu=750 -O2 -pipe"

This is problematic! The past has shown us on archppc that -mcpu=750 
might cause problems on G4 AND earlier variants of the PowerPC such as 
the 604 (pre-G3). Instead we started to use:

export CFLAGS="-mtune=powerpc -O2 -pipe -mpowerpc-gfxopt -fPIC"
export CXXFLAGS="-mtune=powerpc -O2 -pipe -mpowerpc-gfxopt -fPIC"

of which "-mtune=powerpc" is the one which can be generalized, as 
opposed to "-mpowerpc-gfxopt" which will break compatibility to POWER 
which is the way I decided to go with archppc. -mtune is a relaxed 
optimization as you can see. It has proven to produce stable code on all 
PowerPCs we've seen so far.

Also, I'd like to suggest to add "-fPIC" as a ppc default as well. 
Relocation does not work the way it does on x86 PHP 5.1+ being the most 
prominent representative for the problem. Every single library it links 
against must be built with -fPIC in order to load extensions in php.ini. 
This is only one example.



More information about the pacman-dev mailing list