diff options
-rw-r--r-- | PKGBUILD | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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 |