Disable -D_FORTIFY_SOURCE=2 for webkit
authorJonathan Boeing <jonathan.n.boeing@gmail.com>
Wed, 10 Nov 2021 06:34:05 +0000 (23:34 -0700)
committerJonathan Boeing <jonathan.n.boeing@gmail.com>
Wed, 10 Nov 2021 16:56:25 +0000 (09:56 -0700)
patches/webkitgtk-2.4.11/09-no-fortify-source.patch [new file with mode: 0644]

diff --git a/patches/webkitgtk-2.4.11/09-no-fortify-source.patch b/patches/webkitgtk-2.4.11/09-no-fortify-source.patch
new file mode 100644 (file)
index 0000000..d3e3a34
--- /dev/null
@@ -0,0 +1,18 @@
+# Remove -D_FORTIFY_SOURCE=2 for mingw gcc-10
+diff -u a/Source/autotools/SetupCompilerFlags.m4 b/Source/autotools/bSetupCompilerFlags.m4
+--- a/Source/autotools/SetupCompilerFlags.m4
++++ b/Source/autotools/SetupCompilerFlags.m4
+@@ -46,13 +46,6 @@ fi
+ if test "$enable_optimizations" = "yes"; then
+     CXXFLAGS="$CXXFLAGS -O2"
+     CFLAGS="$CFLAGS -O2"
+-
+-    if test "$c_compiler" = "gcc"; then
+-        CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+-    fi
+-    if test "$cxx_compiler" = "g++"; then
+-        CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2"
+-    fi
+ else
+     CXXFLAGS="$CXXFLAGS -Og"
+     CFLAGS="$CFLAGS -Og"