[C++-sig] GCC version compatibility

Christoph Ludwig ludwig at fh-worms.de
Sat Apr 15 18:48:09 CEST 2006


On Sat, Apr 15, 2006 at 09:12:24AM -0400, David Abrahams wrote:
> Christoph Ludwig <ludwig at fh-worms.de> writes:
> > On Tue, Nov 01, 2005 at 11:23:20AM -0500, David Abrahams wrote:
> >> Christoph Ludwig <cludwig at cdc.informatik.tu-darmstadt.de> writes:
> >> 
> >> > On Tue, Nov 01, 2005 at 10:23:14AM -0500, David Abrahams wrote:
> >> >> Christoph Ludwig <cludwig at cdc.informatik.tu-darmstadt.de> writes:
> >> >> > I finally had the spare time to look into this problem again and submitted
> >> >> > patch #1324762. The proposed patch implements the following:
> >> >> 
> >> >> <snip awesome patch>
> >> >> 
> >> >> Christoph, thanks so much for doing this! 
> >> >
> >> > You are welcome. It was pretty straight forward once I realized how the C++
> >> > compiler is communicated from configure to distutils. But the patch has not
> >> > been applied to Python's CVS yet; I don't know how the Python developers think
> >> > about it. 
> >> 
> >> Hmm, maybe I should post encouraging someone to look at this.
> >
> > FYI, the patch got in.
> 
> Great!
> 
> IIRC, this had some practical consequences W.R.T. Boost.Python and/or
> debug builds of Python, but I can't quite remember what the upshot
> was.  Can you?

I do not see how the patch could affect Boost.Python (in the sense that you
have to change anything in Boost.Python's code or its Jamfile). I only
modified the configuration and build scripts of Python in such a way that
Python's main() is compiled and linked with a C++ compiler only if the user
explicitly asks for it. Therefore, the dependency of the Python executable on
the C++ runtime library is removed. On many platforms (notably, Linux/ELF) you
can load C++ extension modules anyway, but you are no longer forced to build
your extension module with a particular C++ compiler version. (On platforms
that support C++ extension modules only if main() was compiled and linked with
a C++ compiler you need to build Python with the --with-cxx-main configure
option. Of course, then you are no longer free to choose which compiler to
build your C++ extensions with. I.e., then you have exactly the situation that
used to be forced on all users.) 

The same holds for a Python debug build - I did not mess with the compiler
option settings at all. If you want your Python executable built with debug
info, you do it as before.

Regards

Christoph

-- 
FH Worms - University of Applied Sciences
Fachbereich Informatik / Telekommunikation
Erenburgerstr. 19, 67549 Worms, Germany



More information about the Cplusplus-sig mailing list