Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 193190 - no need to set LINKCC for python-2.5.1 any more
Summary: no need to set LINKCC for python-2.5.1 any more
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Other
: High normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-20 15:07 UTC by Michael Haubenwallner (RETIRED)
Modified: 2007-09-24 18:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Haubenwallner (RETIRED) gentoo-dev 2007-09-20 15:07:20 UTC
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
Comment 1 Fabian Groffen gentoo-dev 2007-09-20 21:33:49 UTC
This concerns Gentoo/Alt:Prefix, not just me ;)
Comment 2 Ali Polatel (RETIRED) gentoo-dev 2007-09-24 18:46:16 UTC
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