Skip to content

Commit

Permalink
windows-build.sh: ensure that -static-libgcc is used with MSYS2 gcc
Browse files Browse the repository at this point in the history
In MSYS2 MINGW32, the gcc version is "i686-w64-mingw32-cc.exe (Rev4,
Built by MSYS2 project) 13.2.0" which does not contain the string
"(GCC)" as expected.  Similarly for MSYS2 MINGW64.  This means that
-static-libgcc does not get used as intended.  As a quick fix, just
invert the check, so gcc is now detected by checking for not clang...
  • Loading branch information
ebiggers committed Feb 7, 2024
1 parent a84cbaa commit c6d758b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/windows-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ configure_wimlib()
fi
exit 1
fi
if "$cc" --version | grep -q '(GCC)'; then
if ! "$cc" --version | grep -q -i 'clang'; then
configure_args+=("CC=$cc -static-libgcc")
fi
configure_args+=("${EXTRA_CONFIGURE_ARGS[@]}")
Expand Down

0 comments on commit c6d758b

Please sign in to comment.