From 837a7d2f28765e28c97b45d49c10540607a8b066 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Thu, 25 Jul 2024 16:34:28 -0700 Subject: Fix lto. --- PKGBUILD | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 572dc07..4540dd2 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -9,12 +9,15 @@ pkgname=dosbox pkgver=0.74.3 -pkgrel=2 +pkgrel=2.2 pkgdesc='Emulator with builtin DOS for running DOS Games' arch=('x86_64') url='http://dosbox.sourceforge.net/' license=('GPL') -optiions=('lto') +# # For some reason this breaks compiling. "error: C compiler cannot create executables" +# # But old-fashioned raw injection of -flto=auto via export doesn't. +# # Now explicitly disabled because arch now forces it by default. +options=(!lto) depends=('sdl_net' 'zlib' 'sdl_sound' 'libgl' 'libpng' 'alsa-lib' 'gcc-libs' 'glu') makedepends=('mesa-libgl' 'gendesk' 'patch') source=(https://downloads.sourceforge.net/$pkgname/$pkgname-0.74-3.tar.gz @@ -29,8 +32,8 @@ prepare() { build() { cd "${srcdir}/$pkgname-0.74-3" - export CFLAGS="$CFLAGS -O3 -fstack-protector-all -fPIE" - export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -fPIE" + export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=auto -fPIE" + export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=auto -fPIE" export LDFLAGS="$LDFLAGS,-pie" ./configure --prefix=/usr --sysconfdir=/etc/dosbox make -- cgit v1.2.1