Browse Source

package/archlinux: fix LTO behavior for *.a libraries in the AUR package.

Other (development) packages don't need this as they disable
makepkg-supplied buildflags altogether.

Co-authored-by: Konstantinos Chatzilygeroudis <costashatz@gmail.com>
pull/638/head
Vladimír Vondruš 2 years ago
parent
commit
8870b038ed
  1. 9
      package/archlinux/magnum-git/PKGBUILD

9
package/archlinux/magnum-git/PKGBUILD

@ -1,6 +1,6 @@
# Author: mosra <mosra@centrum.cz>
pkgname=magnum-git
pkgver=2020.06.r1626.g67d37c9ed
pkgver=2020.06.r2855.g8538610fa
pkgrel=1
pkgdesc="C++11/C++14 graphics middleware for games and data visualization (Git version)"
arch=('i686' 'x86_64')
@ -22,6 +22,13 @@ build() {
mkdir -p "$srcdir/build"
cd "$srcdir/build"
# Otherwise lib*Application.a and other static libraries get broken during
# a strip, subsequently failing to link.
# https://archlinux.org/todo/lto-fat-objects/
if [[ $CXXFLAGS == *"-flto"* ]]; then
CXXFLAGS+=" -ffat-lto-objects"
fi
cmake "$srcdir/${pkgname%-git}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \

Loading…
Cancel
Save