diff --git a/packages/aur/PKGBUILD b/packages/aur/PKGBUILD index 2cd00c03..842dd3f5 100644 --- a/packages/aur/PKGBUILD +++ b/packages/aur/PKGBUILD @@ -17,6 +17,7 @@ makedepends=( 'rust' 'cargo' 'clang' + 'nasm' ) source=("$pkgname-$pkgver.tar.gz::https://github.com/Psychotoxical/psysonic/archive/refs/tags/v$pkgver.tar.gz") sha256sums=('SKIP') @@ -34,6 +35,13 @@ build() { # because the last -fuse-ld=* flag passed to cc wins. export RUSTFLAGS="${RUSTFLAGS} -C link-arg=-fuse-ld=bfd" + # CachyOS sets -flto=auto in CFLAGS. ring compiles its C/asm objects via the + # cc crate and picks up CFLAGS, producing fat-LTO objects. bfd cannot resolve + # symbols from fat-LTO objects when linking against non-LTO Rust rlibs, causing + # "undefined reference to ring_core_*" even though the symbols exist in the .a. + # Strip CFLAGS/CXXFLAGS entirely so ring builds plain ELF objects. + unset CFLAGS CXXFLAGS + npm install npm run tauri:build -- --no-bundle }