[107865] trunk/base/src

Ryan Schmidt ryandesign at macports.org
Fri Jul 12 13:28:23 PDT 2013


On Jul 8, 2013, at 08:43, Clemens Lang wrote:

> If you have an idea how to build +universal
> for all architectures of the current system, I'm taking suggestions
> (that's the reason why I haven't commited this change before; it was
> lingering on my system for a couple of months now).

You mean: how to build MacPorts base universal? My MacPorts build script, which I've been using for years, does it this way:

ARCHFLAGS="-arch i386 -arch x86_64"
export CFLAGS="-Os $ARCHFLAGS"
export CPPFLAGS=""
export CXXFLAGS="$CFLAGS"
export LDFLAGS="$ARCHFLAGS"
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"

And then configure, make and make install as usual.


Or are you asking how to determine programmatically what archs would be supported? Assuming we don't need to run any built program at build time, the answer is probably all four architectures on Tiger and Leopard, and the two Intel architectures on Snow Leopard and later.

if [ "$(uname -r | cut -d . -f 1)" -gt 9 ]; then
    echo i386 x86_64
else
    echo i386 ppc ppc64 x86_64
fi




More information about the macports-dev mailing list