From 9c3fbf56e94658b67667256257d1cba9cb52775b Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sun, 7 Feb 2021 02:25:08 -0800 Subject: Fix lto Add offline build toggle --- PKGBUILD | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 4d904d9..7ec16ad 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,6 +8,8 @@ # Artix version uses emoticons # Artix version uses incorrect gpg fingerprints +_offline=0 + pkgname=qtox _pkgname=qTox pkgver=1.17.3 @@ -58,8 +60,8 @@ build() { mkdir -p build cd build # gcc 10.2 + qt 5.15 + pie = segfault - export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=4" - export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=4" + export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=auto" + export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=auto" cmake .. -DCMAKE_INSTALL_PREFIX=/usr \ -DDESKTOP_NOTIFICATIONS=ON \ -DGIT_VERSION=$_gitver \ @@ -69,11 +71,13 @@ build() { } # tests require an active public internet connection +if [ "$_offline" == "0" ]; then check() { cd $_pkgname cd build make test } +fi package() { cd $_pkgname -- cgit v1.2.1