[Python-Dev] Linux Python linking with G++? (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Tue Jul 12 00:30:17 CEST 2005
- Previous message: [Python-Dev] Linux Python linking with G++?
- Next message: [Python-Dev] Linux Python linking with G++?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
David Abrahams wrote:
I don't see how that works. Somehow we need to decide whether to put main in ccpython.o in the first place, don't we?
Yes, that is done through --with-cxx (alone). However, the decision to use CXX for linking is independent on whether --with-cxx was given. Is the above a description of existing behavior or a behavior you're proposing?
This is the current behaviour. See the code to see for yourself.
Somebody reported that the test works better for g++ if the function is marked extern "C".
Which function?
foo().
What does "works better" mean?
It correctly detects that linking with g++ is necessary on the specific system in question (see bug report #1205568)
Ok, it's still different. I see three cases now: 1. --without-cxx or --with-cxx=no specified. configure does not look for a C++ compiler, and does not check whether linking needs to be done with a C++ compiler, and decides to use Modules/python.c. 2. --with-cxx not given. configure does look for a C++ compiler, and does check whether linking with the C++ compiler is necessary, and still uses Modules/python.c 3. --with-cxx is given. configure requires it to point to a C++ compiler, performs the linking check, and uses Modules/ccpython.cc.
Is the above a description of existing behavior or is it a behavior you're proposing?
This is existing behaviour (or what I believe existing behaviour to be).
I don't know what you mean by "use the actual code." Do you mean, refer to the actual code in the discussion, or do you mean actually building and running Python --without-cxx myself? If the latter, I don't see a reason to repeat what people I trust have already done.
You wouldn't have to ask these questions if you had investigated the answers yourself.
Regards, Martin
- Previous message: [Python-Dev] Linux Python linking with G++?
- Next message: [Python-Dev] Linux Python linking with G++?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]