File tree Expand file tree Collapse file tree 5 files changed +8
-81
lines changed
Expand file tree Collapse file tree 5 files changed +8
-81
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,6 @@ General Options
4141
4242 See :data: `sys.int_info.bits_per_digit <sys.int_info> `.
4343
44- .. cmdoption :: --with-cxx-main
45- .. cmdoption :: --with-cxx-main=COMPILER
46-
47- Compile the Python ``main() `` function and link Python executable with C++
48- compiler: ``$CXX ``, or *COMPILER * if specified.
49-
5044.. cmdoption :: --with-suffix=SUFFIX
5145
5246 Set the Python executable suffix to *SUFFIX *.
@@ -721,22 +715,10 @@ Compiler flags
721715
722716 Example: ``gcc -pthread ``.
723717
724- .. envvar :: MAINCC
725-
726- C compiler command used to build the ``main() `` function of programs like
727- ``python ``.
728-
729- Variable set by the :option: `--with-cxx-main ` option of the configure
730- script.
731-
732- Default: ``$(CC) ``.
733-
734718.. envvar :: CXX
735719
736720 C++ compiler command.
737721
738- Used if the :option: `--with-cxx-main ` option is used.
739-
740722 Example: ``g++ -pthread ``.
741723
742724.. envvar :: CFLAGS
@@ -854,7 +836,7 @@ Linker flags
854836
855837 Linker command used to build programs like ``python `` and ``_testembed ``.
856838
857- Default: ``$(PURIFY) $(MAINCC ) ``.
839+ Default: ``$(PURIFY) $(CC ) ``.
858840
859841.. envvar :: CONFIGURE_LDFLAGS
860842
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ abs_builddir= @abs_builddir@
3636
3737CC= @CC@
3838CXX= @CXX@
39- MAINCC= @MAINCC@
4039LINKCC= @LINKCC@
4140AR= @AR@
4241READELF= @READELF@
@@ -1222,10 +1221,10 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Python/frozen_modules/getpath.h M
12221221 -o $@ $(srcdir)/Modules/getpath.c
12231222
12241223Programs/python.o: $(srcdir)/Programs/python.c
1225- $(MAINCC ) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c
1224+ $(CC ) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c
12261225
12271226Programs/_testembed.o: $(srcdir)/Programs/_testembed.c Programs/test_frozenmain.h
1228- $(MAINCC ) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c
1227+ $(CC ) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c
12291228
12301229Modules/_sre/sre.o: $(srcdir)/Modules/_sre/sre.c $(srcdir)/Modules/_sre/sre.h $(srcdir)/Modules/_sre/sre_constants.h $(srcdir)/Modules/_sre/sre_lib.h
12311230
Original file line number Diff line number Diff line change 1+ Remove the ``configure --with-cxx-main `` build option: it didn't work for
2+ many years. Remove the ``MAINCC `` variable from ``configure `` and
3+ ``Makefile ``. Patch by Victor Stinner.
Original file line number Diff line number Diff line change @@ -865,29 +865,6 @@ rm -f conftest.c conftest.out
865865AC_USE_SYSTEM_EXTENSIONS
866866
867867AC_SUBST ( CXX )
868- AC_SUBST ( MAINCC )
869- AC_MSG_CHECKING ( for -- with-cxx-main=<compiler> )
870- AC_ARG_WITH ( cxx_main ,
871- AS_HELP_STRING ( [ --with-cxx-main@<:@ =COMPILER@:>@ ] ,
872- [ compile main() and link Python executable with C++ compiler specified in COMPILER (default is $CXX)] ) ,
873- [
874-
875- case $withval in
876- no) with_cxx_main=no
877- MAINCC='$(CC)';;
878- yes) with_cxx_main=yes
879- MAINCC='$(CXX)';;
880- *) with_cxx_main=yes
881- MAINCC=$withval
882- if test -z "$CXX"
883- then
884- CXX=$withval
885- fi;;
886- esac] , [
887- with_cxx_main=no
888- MAINCC='$(CC)'
889- ] )
890- AC_MSG_RESULT ( $with_cxx_main )
891868
892869preset_cxx="$CXX"
893870if test -z "$CXX"
@@ -1358,7 +1335,7 @@ AC_SUBST(LINKCC)
13581335AC_MSG_CHECKING ( LINKCC )
13591336if test -z "$LINKCC"
13601337then
1361- LINKCC='$(PURIFY) $(MAINCC )'
1338+ LINKCC='$(PURIFY) $(CC )'
13621339 case $ac_sys_system in
13631340 QNX*)
13641341 # qcc must be used because the other compilers do not
You can’t perform that action at this time.
0 commit comments