Skip to content

[WIP] gh-93744: Remove configure --with-cxx-main option #94063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/library/sysconfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ Example of usage::
0
>>> sysconfig.get_config_var('LIBDIR')
'/usr/local/lib'
>>> sysconfig.get_config_vars('AR', 'CXX')
['ar', 'g++']
>>> sysconfig.get_config_vars('AR', 'CC')
['ar', 'gcc']

.. _installation_paths:

Expand Down
26 changes: 1 addition & 25 deletions Doc/using/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ General Options

See :data:`sys.int_info.bits_per_digit <sys.int_info>`.

.. cmdoption:: --with-cxx-main
.. cmdoption:: --with-cxx-main=COMPILER

Compile the Python ``main()`` function and link Python executable with C++
compiler: ``$CXX``, or *COMPILER* if specified.

.. cmdoption:: --with-suffix=SUFFIX

Set the Python executable suffix to *SUFFIX*.
Expand Down Expand Up @@ -721,24 +715,6 @@ Compiler flags

Example: ``gcc -pthread``.

.. envvar:: MAINCC

C compiler command used to build the ``main()`` function of programs like
``python``.

Variable set by the :option:`--with-cxx-main` option of the configure
script.

Default: ``$(CC)``.

.. envvar:: CXX

C++ compiler command.

Used if the :option:`--with-cxx-main` option is used.

Example: ``g++ -pthread``.

.. envvar:: CFLAGS

C compiler flags.
Expand Down Expand Up @@ -854,7 +830,7 @@ Linker flags

Linker command used to build programs like ``python`` and ``_testembed``.

Default: ``$(PURIFY) $(MAINCC)``.
Default: ``$(PURIFY) $(CC)``.

.. envvar:: CONFIGURE_LDFLAGS

Expand Down
7 changes: 2 additions & 5 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ abs_builddir= @abs_builddir@


CC= @CC@
CXX= @CXX@
MAINCC= @MAINCC@
LINKCC= @LINKCC@
AR= @AR@
READELF= @READELF@
Expand Down Expand Up @@ -164,7 +162,6 @@ SHLIB_SUFFIX= @SHLIB_SUFFIX@
EXT_SUFFIX= @EXT_SUFFIX@
LDSHARED= @LDSHARED@ $(PY_LDFLAGS)
BLDSHARED= @BLDSHARED@ $(PY_CORE_LDFLAGS)
LDCXXSHARED= @LDCXXSHARED@
DESTSHARED= $(BINLIBDEST)/lib-dynload

# List of exported symbols for AIX
Expand Down Expand Up @@ -1241,10 +1238,10 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Python/frozen_modules/getpath.h M
-o $@ $(srcdir)/Modules/getpath.c

Programs/python.o: $(srcdir)/Programs/python.c
$(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c
$(CC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c

Programs/_testembed.o: $(srcdir)/Programs/_testembed.c Programs/test_frozenmain.h
$(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c
$(CC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c

Modules/_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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Remove ``configure --with-cxx-main`` option: it didn't work for many years.
Remove the following configure and Makefile variables: ``CXX``,
``LDCXXSHARED``, ``MAINCC``. Patch by Victor Stinner.
Loading