Commit 3b51c53e authored by Max Kellermann's avatar Max Kellermann

win32/build.py: add -D_FORTIFY_SOURCE=0

This fixes the Windows build. Linking failed because some packages (e.g. libFLAC) default to enabling `_FORTIFY_SOURCE`, which is broken in recent mingw versions (https://github.com/msys2/MINGW-packages/issues/5803).
parent 0aa0ffb6
......@@ -66,6 +66,11 @@ class CrossGccToolchain:
' -static-libstdc++ -static-libgcc'
self.libs = ''
# Explicitly disable _FORTIFY_SOURCE because it is broken with
# mingw. This prevents some libraries such as libFLAC to
# enable it.
self.cppflags += ' -D_FORTIFY_SOURCE=0'
self.is_arm = arch.startswith('arm')
self.is_armv7 = self.is_arm and 'armv7' in self.cflags
self.is_aarch64 = arch == 'aarch64'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment