summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2023-04-08 20:36:07 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2023-04-08 20:36:07 -0700
commit5354a8dbc73ff839efe8e6f33f8d681ebd5793f6 (patch)
tree7fac6feb9159067e1eb368c41c12711e28b6365b
parentFix build error for reals this time. (diff)
downloadlincity-ng-5354a8dbc73ff839efe8e6f33f8d681ebd5793f6.tar.xz
Remove modern lto to fix build errors.HEADmaster
-rw-r--r--PKGBUILD12
1 files changed, 7 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 618d635..aef98a1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,15 +13,17 @@ url="https://sourceforge.net/projects/lincity-ng.berlios/"
license=('GPL' 'custom')
depends=('sdl_mixer' 'sdl_ttf' 'sdl_image' 'physfs' 'libxml2' 'sdl_gfx' 'libgl')
makedepends=('ftjam' 'mesa' 'glu')
-options=('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.
+#options=(lto)
source=(https://sourceforge.net/projects/${pkgname}.berlios/files/${pkgname}-${pkgver}.tar.bz2)
b2sums=('39992e6a2ef78e53eea1b0e347c968f6828089b5267e6d62dac7405ea91b182335431b1718ef9892b649b1437751959deb9fa407dfd899fd1dfca55145d059f2')
build() {
cd ${pkgname}-${pkgver}
- export CFLAGS="$CFLAGS -O3 -fPIE"
- export CXXFLAGS="$CXXFLAGS -O3 -fPIE"
+ export CFLAGS="$CFLAGS -O3 -fPIE -flto=auto"
+ export CXXFLAGS="$CXXFLAGS -O3 -fPIE -flto=auto"
export LDFLAGS="$LDFLAGS,-pie"
# Build fails due to -Werror=format-security
@@ -39,8 +41,8 @@ package() {
# FLAGS are set again here to ensure optimization and prevent build failure.
# Madness.
- export CFLAGS="$CFLAGS -O3 -fPIE"
- export CXXFLAGS="$CXXFLAGS -O3 -fPIE"
+ export CFLAGS="$CFLAGS -O3 -fPIE -flto=auto"
+ export CXXFLAGS="$CXXFLAGS -O3 -fPIE -flto=auto"
export LDFLAGS="$LDFLAGS,-pie"
# Build fails due to -Werror=format-security