summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-06-20 14:14:51 (GMT)
committerGitHub <noreply@github.com>2022-06-20 14:14:51 (GMT)
commit2454dbe6527fb96eb880c1957905c8cf5934f5be (patch)
treec39b65b27db6f81a06a87396a24f03810b9c45b4 /Doc
parent9d73adf7a45035f9c3bd6771347aad912e15c373 (diff)
downloadcpython-2454dbe6527fb96eb880c1957905c8cf5934f5be.zip
cpython-2454dbe6527fb96eb880c1957905c8cf5934f5be.tar.gz
cpython-2454dbe6527fb96eb880c1957905c8cf5934f5be.tar.bz2
gh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS (GH-92754)
(cherry picked from commit 61f24e7885bed096b5d7f75aff13c1001994b35a) Co-authored-by: Matthias Köppe <mkoeppe@math.ucdavis.edu>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/using/configure.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst
index 14ffdd7..13c3394 100644
--- a/Doc/using/configure.rst
+++ b/Doc/using/configure.rst
@@ -652,6 +652,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
@@ -764,6 +775,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:`LDFLAGS` would take precedence over user- and package-supplied `-L`
+ flags.
+
.. envvar:: CONFIGURE_LDFLAGS_NODIST
Value of :envvar:`LDFLAGS_NODIST` variable passed to the ``./configure``