@@ -1045,13 +1045,35 @@ Modules/getpath.o.
1045
1045
--with-libs='libs': Add 'libs' to the LIBS that the python interpreter
1046
1046
is linked against.
1047
1047
1048
- --with-cxx=<compiler>: Some C++ compilers require that main() is
1049
- compiled with the C++ if there is any C++ code in the application.
1050
- Specifically, g++ on a.out systems may require that to support
1051
- construction of global objects. With this option, the main() function
1052
- of Python will be compiled with <compiler>; use that only if you
1053
- plan to use C++ extension modules, and if your compiler requires
1054
- compilation of main() as a C++ program.
1048
+ --with-cxx-main=<compiler>: If you plan to use C++ extension modules,
1049
+ then -- on some platforms -- you need to compile python's main()
1050
+ function with the C++ compiler. With this option, make will use
1051
+ <compiler> to compile main() *and* to link the python executable.
1052
+ It is likely that the resulting executable depends on the C++
1053
+ runtime library of <compiler>. (The default is --without-cxx-main.)
1054
+
1055
+ There are platforms that do not require you to build Python
1056
+ with a C++ compiler in order to use C++ extension modules.
1057
+ E.g., x86 Linux with ELF shared binaries and GCC 3.x, 4.x is such
1058
+ a platform. We recommend that you configure Python
1059
+ --without-cxx-main on those platforms because a mismatch
1060
+ between the C++ compiler version used to build Python and to
1061
+ build a C++ extension module is likely to cause a crash at
1062
+ runtime.
1063
+
1064
+ The Python installation also stores the variable CXX that
1065
+ determines, e.g., the C++ compiler distutils calls by default
1066
+ to build C++ extensions. If you set CXX on the configure command
1067
+ line to any string of non-zero length, then configure won't
1068
+ change CXX. If you do not preset CXX but pass
1069
+ --with-cxx-main=<compiler>, then configure sets CXX=<compiler>.
1070
+ In all other cases, configure looks for a C++ compiler by
1071
+ some common names (c++, g++, gcc, CC, cxx, cc++, cl) and sets
1072
+ CXX to the first compiler it finds. If it does not find any
1073
+ C++ compiler, then it sets CXX="".
1074
+
1075
+ Similarly, if you want to change the command used to link the
1076
+ python executable, then set LINKCC on the configure command line.
1055
1077
1056
1078
1057
1079
--with-pydebug: Enable additional debugging code to help track down
0 commit comments