In dev-lang/python-2.5.1-r2.ebuild, LINKCC is set to prevent python from linking against libstdc++.so. This isn't necessary any more, as >=python-2.5 itself defaults to use '$(CC)' to compile and link python-main. If one wants to change this, there is a new configure argument '--with-cxx-main', accepting 'yes', 'no' (default, same as --without-cxx-main), or a compiler. So we should be happy with the default. I've compared (on x86) the output of 'emerge python' with and without the patch[1], it differs only in one line[2]. Why this is a problem for me: In alt:prefix, specifically on aix, LINKCC is more complex, and overriding it breaks building python there. [1] the patch: --- python-2.5.1-r2.ebuild 15 Sep 2007 18:27:57 -0000 1.17 +++ python-2.5.1-r2.ebuild 20 Sep 2007 14:51:15 -0000 @@ -161,8 +161,8 @@ # export CXX so it ends up in /usr/lib/python2.x/config/Makefile tc-export CXX - # set LINKCC to prevent python from being linked to libstdc++.so - export LINKCC="\$(PURIFY) \$(CC)" + # Since python-2.5 there is a new configure flag '--with-cxx-main': + # we're happy with default 'no' to avoid linking to libstdc++.so. # set LDFLAGS so we link modules with -lpython2.5 correctly. # Needed on FreeBSD unless python2.5 is already installed. [2] the output diff: --- emerge-python.out.orig 2007-09-19 21:25:46.000000000 +0200 +++ emerge-python.out.nothing 2007-09-19 21:33:52.000000000 +0200 @@ -75,7 +75,7 @@ checking for --with-suffix... checking for case-insensitive build directory... no checking LIBRARY... libpython$(VERSION).a -checking LINKCC... $(PURIFY) $(CC) +checking LINKCC... $(PURIFY) $(MAINCC) checking for --enable-shared... yes checking for --enable-profiling... checking LDLIBRARY... libpython$(VERSION).so
This concerns Gentoo/Alt:Prefix, not just me ;)
Apparently --with-cxx option has been renamed to --with-cxx-main[1]. We don't have to set LINKCC or pass --with-cxx=no option to configure. Default is fine for us as you mentioned. I've also dropped nocxx use flag as there's no benefit of --with-cxx-main other than linking main() to libstdc++. Thanks for reporting :) [1]: http://bugs.python.org/issue1324762