summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik “Freso” S. Olesen2024-02-20 03:22:20 +0100
committertytan6522024-02-20 15:37:45 +0100
commit5271dfb3263b4c25359c1db4ff452ae8dfe28606 (patch)
treeaf2da6deacdb2f2f4146b71a1e419b04b56cb988
parent83d08d4935d2ff1b2da46665f5fbadcd23bae729 (diff)
downloadaur-5271dfb3263b4c25359c1db4ff452ae8dfe28606.tar.gz
Force _FORTIFY_SOURCE level 2
libcef.so uses malloc_usable_size so it won’t build with fortification level set to 3. See also: https://rfc.archlinux.page/0017-increase-fortification-level/ https://archlinux.org/todo/prepare-packages-for-d_fortify_source3/ https://gitlab.archlinux.org/archlinux/devtools/-/merge_requests/191
-rw-r--r--PKGBUILD4
1 files changed, 4 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 532384a138c9..9d05e8d2c0a3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -64,6 +64,10 @@ prepare() {
build() {
cd "${srcdir}/cef_binary_${_cefbranch}_linux_${CARCH}"
+ # 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}"
+
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DPROJECT_ARCH=$CARCH .