git » qt5-webengine.git » commit d1a1d59

do not use fortification level 3

author kpcyrd
2024-02-11 14:44:50 UTC
committer kpcyrd
2024-02-11 14:44:50 UTC
parent 8de14079a1a57a69386cc5201ad5995471b0555f

do not use fortification level 3

PKGBUILD +8 -0

diff --git a/PKGBUILD b/PKGBUILD
index 5a4c29e..ab67b49 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -51,6 +51,10 @@ prepare() {
 }
 
 build() {
+  # this uses malloc_usable_size, which is incompatible with fortification level 3
+  export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
+  export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
+
   cd build
   qmake ../${_pkgfqn} CONFIG+=force_debug_info -- \
     -proprietary-codecs \
@@ -64,6 +68,10 @@ build() {
 }
 
 package() {
+  # this uses malloc_usable_size, which is incompatible with fortification level 3
+  export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
+  export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
+
   cd build
   make INSTALL_ROOT="$pkgdir" install