Commit

59d45146c6191c05cbfa05c6cb039acc4d08d71f

mingw: only use -Wl,--large-address-aware for 32-bit builds

That option only matters there, and is in fact only really understood in
those builds; UCRT64 versions of GCC, for example, do not know what to
do with that option.

Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin <johannes.schindelin@gmx.de> · 2026-09-10 06:05 UTC · committed by Junio C Hamano

Browse files
1 file changed, +2 −4
modified config.mak.uname
@@ -757,9 +757,8 @@ ifeq ($(uname_S),MINGW)
757 757 ifeq (MINGW32,$(MSYSTEM))
758 758 prefix = /mingw32
759 759 HOST_CPU = i686
760 - BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup
761 - endif
762 - ifeq (MINGW64,$(MSYSTEM))
760 + BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup -Wl,--large-address-aware
761 + else ifeq (MINGW64,$(MSYSTEM))
763 762 prefix = /mingw64
764 763 HOST_CPU = x86_64
765 764 BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
@@ -768,7 +767,6 @@ ifeq ($(uname_S),MINGW)
768 767 HOST_CPU = aarch64
769 768 BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
770 769 else
771 - BASIC_LDFLAGS += -Wl,--large-address-aware
772 770 endif
773 771 COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \
774 772 -fstack-protector-strong