[Python-bugs-list] [Bug #124782] configure should attempt to find a default C++ compiler.

noreply@sourceforge.net noreply@sourceforge.net
Wed, 13 Dec 2000 06:17:41 -0800


Bug #124782, was updated on 2000-Dec-06 15:50
Here is a current snapshot of the bug.

Project: Python
Category: Build
Status: Closed
Resolution: Wont Fix
Bug Group: None
Priority: 3
Submitted by: gvanrossum
Assigned to : loewis
Summary: configure should attempt to find a default C++ compiler.

Details: It's annoying that C++ isn't better supported by default. Currently, you must specify the C++ compiler with the --with-gxx=... flag.

The configure script could easily set CXX to g++ if that exists and if we are using GCC, for example.

(But why does using the --with-gxx flag automatically create a main program compiled with C++?)


Follow-Ups:

Date: 2000-Dec-13 06:17
By: loewis

Comment:
The --with-cxx flag is designed to support extension modules written in C++. In some compilation systems, compiling any object file with C++ requires that the main function is compiled and linked with the C++ compiler. For example, on an a.out system, with g++, g++ will generate a call to __main as the first thing in main(), to allow for construction of global objects. On an advanced compilation system (e.g. ELF, or Win32), this is not necessary - global objects will be constructed even if main was not compiled with a C++ compiler.

I believe the sole purpose of --with-cxx flag is to support that case; I can't emagine any other reason to use it. Since  such requirement of the C++ compiler is becoming rare, I don't think there is a need to change the behaviour of the Python configure.in. 

So the real bug is that --with-cxx was not documented; that is corrected in README 1.107.
-------------------------------------------------------

Date: 2000-Dec-11 12:47
By: gvanrossum

Comment:
Martin, do you happen to be a C++ user?  Maybe you have an idea what to do with this?  If not, assign it back to me or to Nobody.
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=124782&group_id=5470