summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-09-04 14:31:03 +0200
committerMax Kellermann <max@musicpd.org>2020-09-04 14:33:11 +0200
commit3b51c53eca040217936e0ed2ebf8ab0555ffb058 (patch)
tree259b535058fd0613db7bc01312732bb2e5089594 /win32
parent0aa0ffb67b225c583dd25a31869dc5b3222cd5fb (diff)
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).
Diffstat (limited to 'win32')
-rwxr-xr-xwin32/build.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/win32/build.py b/win32/build.py
index fb636ded5..8aa87e288 100755
--- a/win32/build.py
+++ b/win32/build.py
@@ -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'