[Python-Dev] GCC version compatibility (original) (raw)
David Abrahams dave at boost-consulting.com
Sun Jul 10 15:38:35 CEST 2005
- Previous message: [Python-Dev] [C++-sig] GCC version compatibility
- Next message: [Python-Dev] PEP 343 documentation on Sourceforge Patch tracker
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Christoph Ludwig <cludwig at cdc.informatik.tu-darmstadt.de> writes:
--with-cxx=: If you plan to use C++ extension modules, then on some platform you need to compile python's main() function with the C++ compiler. With this option, make will use to compile main() and to link the python executable. It is likely that the resulting executable depends on the C++ runtime library of .
Note there are platforms that do not require you to build Python with a C++ compiler in order to use C++ extension modules. E.g., x86 Linux with ELF shared binaries and GCC 3.x, 4.x is such a platform. We recommend that you configure Python --without-cxx on those platforms to avoid unnecessary dependencies.
I don't think that's strong enough. What happens is that dynamically loaded Python extension modules built with other, ABI-compatible versions of G++ may crash.
If you need to compile main() with , but your platform does not require that you also link the python executable with (e.g., ), then set LINKCC='$(PURIFY) $(CC)' prior to calling make. Then the python executable will not depend on the C++ runtime library of .
Are we sure we have an actual use case for the above? Doesn't --without-cxx cover all the actual cases we know about?
BTW, I'd also change the short explanation output by `configure --help'. Something like:
ACHELPSTRING(--with-cxx=, use to compile and link main()) In Python 2.4.1, the help message says "enable C++ support". That made me use this option even though it turned out it is not necessary on my platform.
Your suggestion is simple and powerful; I like it!
-- Dave Abrahams Boost Consulting www.boost-consulting.com
- Previous message: [Python-Dev] [C++-sig] GCC version compatibility
- Next message: [Python-Dev] PEP 343 documentation on Sourceforge Patch tracker
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]