Commit
f243cc38dfebd4f3aee2e82136d56e22552fd523
mingw: avoid over-specifying `--pic-executable`
In bf2d5d8239e (Don't let ld strip relocations, 2016-01-16) (picked from https://github.com/git-for-windows/git/pull/612/commits/6a237925bf10), Git for Windows introduced the `-Wl,-pic-executable` flag, specifying the exact entry point via `-e`. This required discerning between i686 and x86_64 code because the former required the symbol to be prefixed with an underscore, the latter did not. As per https://sourceware.org/bugzilla/show_bug.cgi?id=10865, the specified symbols are already the default, though. So let's drop the overly-specific definition. 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
1 file changed,
+3
−3
modified config.mak.uname
| @@ -757,15 +757,15 @@ 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 -Wl,--large-address-aware | |
| 760 | + | BASIC_LDFLAGS += -Wl,--pic-executable -Wl,--large-address-aware | |
| 761 | 761 | else ifeq (MINGW64,$(MSYSTEM)) | |
| 762 | 762 | prefix = /mingw64 | |
| 763 | 763 | HOST_CPU = x86_64 | |
| 764 | - | BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup | |
| 764 | + | BASIC_LDFLAGS += -Wl,--pic-executable | |
| 765 | 765 | else ifeq (CLANGARM64,$(MSYSTEM)) | |
| 766 | 766 | prefix = /clangarm64 | |
| 767 | 767 | HOST_CPU = aarch64 | |
| 768 | - | BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup | |
| 768 | + | BASIC_LDFLAGS += -Wl,--pic-executable | |
| 769 | 769 | else | |
| 770 | 770 | endif | |
| 771 | 771 | COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \ | |