From de8cdcbbd7ecfba7b44ed92375b7e76f460115cc Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 12 May 2022 16:40:50 -0700 Subject: [PATCH 1/7] Doc/using/configure.rst: Expand on what should not go into CFLAGS, LDFLAGS --- Doc/using/configure.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index d61647f5ea71ea..6a32d6f015ac2c 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -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 @@ -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`` From f14fc191609e7bff73d58425751aaa5d54b86bbc Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 12 May 2022 23:47:18 +0000 Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Documentation/2022-05-12-23-47-17.gh-issue-90539.nmRgOZ.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Documentation/2022-05-12-23-47-17.gh-issue-90539.nmRgOZ.rst diff --git a/Misc/NEWS.d/next/Documentation/2022-05-12-23-47-17.gh-issue-90539.nmRgOZ.rst b/Misc/NEWS.d/next/Documentation/2022-05-12-23-47-17.gh-issue-90539.nmRgOZ.rst new file mode 100644 index 00000000000000..b096ae3d0342a3 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2022-05-12-23-47-17.gh-issue-90539.nmRgOZ.rst @@ -0,0 +1 @@ +Expand the documentation of the configure variables `CFLAGS_NODIST`, `LDFLAGS_NODIST`. From 7a678d88b907203c79d6754612f7e3f6bcba0bef Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 13 May 2022 18:30:47 -0700 Subject: [PATCH 3/7] Doc/using/configure.rst: Fix rst markup --- Doc/using/configure.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index 6a32d6f015ac2c..c83311df1db214 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -749,12 +749,12 @@ Compiler flags In particular, :envvar:`CFLAGS` should not contain: - - the compiler flag `-I` (for setting the search path for include files); + * 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 + * hardening flags such as `-Werror` because distributions cannot control whether packages installed by users conform to such heightened standards. @@ -872,7 +872,7 @@ Linker flags In particular, :envvar:`LDFLAGS` should not contain: - - the compiler flag `-L` (for setting the search path for libraries); + * 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. From 73f2c43332117079fc1d9e41fc26c66cc81bf483 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 13 May 2022 18:41:24 -0700 Subject: [PATCH 4/7] Doc/using/configure.rst: Fixup: LDFLAGS, not CFLAGS --- Doc/using/configure.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index c83311df1db214..45ae0418914995 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -874,7 +874,7 @@ Linker flags * 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` + :envvar:`LDFLAGS` would take precedence over user- and package-supplied `-L` flags. .. envvar:: CONFIGURE_LDFLAGS_NODIST From 8220995bdd44f1be96e26c637e1f4254f0765272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Tue, 17 May 2022 12:23:30 -0700 Subject: [PATCH 5/7] Doc/using/configure.rst: Break a long sentence Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- Doc/using/configure.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index 45ae0418914995..d909bcf26b8c2d 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -749,8 +749,8 @@ Compiler flags 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 + * 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. From 04a9c4f782d01c8378a5a155f9b5442807935ec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Tue, 17 May 2022 12:23:46 -0700 Subject: [PATCH 6/7] Doc/using/configure.rst: Break another long sentence Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- Doc/using/configure.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index d909bcf26b8c2d..a6e9d14bd8065a 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -872,8 +872,8 @@ Linker flags 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 + * 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. From cc8b79f63d2b0cb1496808a9e17b0dfbb45f9572 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 17 Jun 2022 13:03:21 -0700 Subject: [PATCH 7/7] Misc/NEWS.d/next/Documentation/2022-05-12-23-47-17.gh-issue-90539.nmRgOZ.rst: Remove --- .../Documentation/2022-05-12-23-47-17.gh-issue-90539.nmRgOZ.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2022-05-12-23-47-17.gh-issue-90539.nmRgOZ.rst diff --git a/Misc/NEWS.d/next/Documentation/2022-05-12-23-47-17.gh-issue-90539.nmRgOZ.rst b/Misc/NEWS.d/next/Documentation/2022-05-12-23-47-17.gh-issue-90539.nmRgOZ.rst deleted file mode 100644 index b096ae3d0342a3..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2022-05-12-23-47-17.gh-issue-90539.nmRgOZ.rst +++ /dev/null @@ -1 +0,0 @@ -Expand the documentation of the configure variables `CFLAGS_NODIST`, `LDFLAGS_NODIST`.