8000 gh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS by mkoeppe · Pull Request #92754 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS #92754

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

Merged
merged 7 commits into from
Jun 20, 2022
Merged
Changes from 1 commit
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
Next Next commit
Doc/using/configure.rst: Expand on what should not go into CFLAGS, LD…
…FLAGS
  • Loading branch information
mkoeppe committed May 12, 2022
commit de8cdcbbd7ecfba7b44ed92375b7e76f460115cc
18 changes: 18 additions & 0 deletions Doc/using/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,17 @@ Compiler flags
extensions. Use it when a compiler flag should *not* be part of the
distutils :envvar:`CFLAGS` once Python is installed (:issue:`21121`).

In particular, :envvar:`CFLAGS` should not contain:

- the compiler flag `-I` (for setting the search path for include files);
the `-I` flags are processed from left to right, and any flags in
:envvar:`CFLAGS` would take precedence over user- and package-supplied `-I`
flags.

- hardening flags such as `-Werror` because distributions cannot control
whether packages installed by users conform to such heightened
standards.

.. versionadded:: 3.5

.. envvar:: EXTRA_CFLAGS
Expand Down Expand Up @@ -859,6 +870,13 @@ Linker flags
:envvar:`CFLAGS_NODIST`. Use it when a linker flag should *not* be part of
the distutils :envvar:`LDFLAGS` once Python is installed (:issue:`35257`).

In particular, :envvar:`LDFLAGS` should not contain:

- the compiler flag `-L` (for setting the search path for libraries);
the `-L` flags are processed from left to right, and any flags in
:envvar:`CFLAGS` would take precedence over user- and package-supplied `-L`
flags.

.. envvar:: CONFIGURE_LDFLAGS_NODIST

Value of :envvar:`LDFLAGS_NODIST` variable passed to the ``./configure``
Expand Down
0