Skip to content

Commit b1b6eb5

Browse files
committed
git-extra: fix build with clangarm64
To make `-D__USE_MINGW_ANSI_STDIO=1` work (which is implicitly set via `/etc/makepkg_mingw.conf`), with clangarm64 we need to link to libmsvcrt-os. Otherwise the build would fail with: ld.lld: error: undefined symbol: __ms_printf [...] ld.lld: error: undefined symbol: __ms_sscanf With toolchains other than `clangarm64`, linking to that static library does not hurt, so let's do it unconditionally. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 8dbf89f commit b1b6eb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-extra/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $(BUILDDIR)/%.res: $(SRCDIR)/%.rc
2121
$(WINDRES) --input $< --output $@ --output-format coff
2222

2323
$(BUILDDIR)/WhoUses.exe: $(BUILDDIR)/WhoUses.o $(BUILDDIR)/SystemInfo.o
24-
$(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $^
24+
$(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $^ -lmsvcrt-os
2525

2626
$(BUILDDIR)/WhoUses.o: $(SRCDIR)/WhoUses.cpp $(SRCDIR)/SystemInfo.h
2727
$(BUILDDIR)/SystemInfo.o: $(SRCDIR)/SystemInfo.cpp $(SRCDIR)/SystemInfo.h

0 commit comments

Comments
 (0)