From 2e439da02b923bafba6520f21c657f2e5854cc63 Mon Sep 17 00:00:00 2001 From: Armaan Sandhu Date: Sun, 24 May 2026 12:15:14 +0530 Subject: [PATCH 1/2] gh-150311: Fix minor issues in configure.ac for the CYGWIN port - Use 'CYGWIN' (uppercase) for ac_sys_system to match the casing used in all case-pattern references throughout configure.ac. - Fix LDLIBRARY for static builds: use '.a' extension instead of '.dll.a' when shared libraries are disabled. - Replace hardcoded 'gcc' and 'g++' with '$(CC)' and '$(CXX)' in LDSHARED/LDCXXSHARED for Cygwin. --- configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index bb2a7eee9a116e3..a5da598d0852b11 100644 --- a/configure.ac +++ b/configure.ac @@ -334,7 +334,7 @@ then ac_sys_system=Linux ;; *-*-cygwin*) - ac_sys_system=Cygwin + ac_sys_system=CYGWIN ;; *-apple-ios*) ac_sys_system=iOS @@ -1650,7 +1650,7 @@ else # shared is disabled case $ac_sys_system in CYGWIN*) BLDLIBRARY='$(LIBRARY)' - LDLIBRARY='libpython$(LDVERSION).dll.a' + LDLIBRARY='libpython$(LDVERSION).a' ;; esac fi @@ -3694,8 +3694,8 @@ then dnl not implemented yet ]);; CYGWIN*) - LDSHARED="gcc -shared -Wl,--enable-auto-image-base" - LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";; + LDSHARED="$(CC) -shared -Wl,--enable-auto-image-base" + LDCXXSHARED="$(CXX) -shared -Wl,--enable-auto-image-base";; *) LDSHARED="ld";; esac fi From 98b301be4a89b91a758c13a6a31f4a2bc1a11a51 Mon Sep 17 00:00:00 2001 From: Armaan Sandhu Date: Sun, 24 May 2026 12:34:44 +0530 Subject: [PATCH 2/2] gh-150311: Add NEWS entry and regenerate configure --- .../Build/2026-05-24-12-30-00.gh-issue-150311.Xk9m3P.rst | 4 ++++ configure | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2026-05-24-12-30-00.gh-issue-150311.Xk9m3P.rst diff --git a/Misc/NEWS.d/next/Build/2026-05-24-12-30-00.gh-issue-150311.Xk9m3P.rst b/Misc/NEWS.d/next/Build/2026-05-24-12-30-00.gh-issue-150311.Xk9m3P.rst new file mode 100644 index 000000000000000..a9a37d4b628a417 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2026-05-24-12-30-00.gh-issue-150311.Xk9m3P.rst @@ -0,0 +1,4 @@ +Fix three minor issues in ``configure.ac`` for the Cygwin port: use +consistent uppercase ``CYGWIN`` for ``ac_sys_system``, correct the static +library extension from ``.dll.a`` to ``.a`` when shared is disabled, and use +``$(CC)``/``$(CXX)`` instead of hardcoded ``gcc``/``g++``. diff --git a/configure b/configure index 00e3ca25c86e8f9..c8ffd79d2521930 100755 --- a/configure +++ b/configure @@ -4151,7 +4151,7 @@ then ac_sys_system=Linux ;; *-*-cygwin*) - ac_sys_system=Cygwin + ac_sys_system=CYGWIN ;; *-apple-ios*) ac_sys_system=iOS @@ -7842,7 +7842,7 @@ else # shared is disabled case $ac_sys_system in CYGWIN*) BLDLIBRARY='$(LIBRARY)' - LDLIBRARY='libpython$(LDVERSION).dll.a' + LDLIBRARY='libpython$(LDVERSION).a' ;; esac fi @@ -14226,8 +14226,8 @@ then : fi;; CYGWIN*) - LDSHARED="gcc -shared -Wl,--enable-auto-image-base" - LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";; + LDSHARED="$(CC) -shared -Wl,--enable-auto-image-base" + LDCXXSHARED="$(CXX) -shared -Wl,--enable-auto-image-base";; *) LDSHARED="ld";; esac fi