Thread (71 messages) 71 messages, 5 authors, 17d ago

Re: [PATCH v2 08/12] mingw: rely on MSYS2's metadata instead of hard-coding it

From: Johannes Schindelin <hidden>
Date: 2026-09-09 19:09:40

Hi Hannes,

On Wed, 9 Sep 2026, Johannes Schindelin wrote:
On Sat, 15 Aug 2026, Johannes Sixt wrote:
quoted
Am 12.08.26 um 09:52 schrieb Johannes Schindelin via GitGitGadget:
quoted
@@ -755,6 +749,10 @@ ifeq ($(uname_S),MINGW)
 		BASIC_LDFLAGS += -Wl,--dynamicbase
         endif
         ifneq (,$(MSYSTEM))
+                ifeq ($(MINGW_PREFIX),$(filter-out /%,$(MINGW_PREFIX)))
+			# Override if empty or does not start with a slash
+			MINGW_PREFIX := /$(shell echo '$(MSYSTEM)' | tr A-Z a-z)
+                endif
 		prefix = $(MINGW_PREFIX)
 		HOST_CPU = $(patsubst %-w64-mingw32,%,$(MINGW_CHOST))
 		BASIC_LDFLAGS += -Wl,--pic-executable
At this point, MINGW_PREFIX is only used to set prefix.

Only in 12/12 is the variable (and ENSURE_MSYSTEM_IS_SET) used to drive
C code. Therefore, it seems that the following hunks concerning the
CMake and meson build systems do not belong in this patch, yet, but only
in 12/12.
Ah, right, the following hunks do touch the ENSURE_MSYSTEM_IS_SET stuff.
But they _also_ add the `MINGW_PREFIX` stuff.
Gah. My assessment is incorrect. At this point in the patch series, the
`MINGW_PREFIX` constant isn't used anywhere in the C code. So you were
absolutely right, those hunks do need to move to 12/12 wholesale.

Sorry about the slalom,
Johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help