Forcing compiler
Ryan Schmidt
ryandesign at macports.org
Sat Apr 3 17:28:44 PDT 2010
On Apr 3, 2010, at 18:55, Jeremy Huddleston wrote:
> I need to force gcc-4.2 when building mesa on Leopard, but it doesn't seem to be working:
>
> DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_Users_jeremy_src_macports-trunk_dports_x11_mesa/work/Mesa-7.8" && /usr/bin/make -j5 default INSTALL_DIR=/opt/local RC_CFLAGS="-arch ppc" CC="/usr/bin/gcc-4.0 -I/opt/local/include" CXX="/usr/bin/g++-4.0 -I/opt/local/include"'
>
>
> even though I have:
>
> platform darwin 9 {
> # http://trac.macports.org/ticket/24345
> configure.compiler apple-gcc-4.2
> }
>
> build.args-append \
> CC="${configure.cc} ${configure.cppflags}" \
> CXX="${configure.cxx} ${configure.cppflags}"
>
> I also tried
> configure.cc /usr/bin/gcc-4.2
>
> but it's still using /usr/bin/gcc-4.0 when setting up build.args on Leopard...
>
> What's wrong here?
The variant gets evaluated after the build.args have already been appended.
To fix this:
pre-build {
build.args-append \
CC="${configure.cc} ${configure.cppflags}" \
CXX="${configure.cxx} ${configure.cppflags}"
}
More information about the macports-dev
mailing list