@graysky @m10r I brought it up on the actual RFC thread about adding those flags:
https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/merge_requests/6#note_171460
Here's my workaround - replace the lines after the configure options:
# makepkg is breaking the -Wl,-z,pack-relative-relocs ldflag for cmake's FindThreads
export LDFLAGS=$(echo "$LDFLAGS" | sed 's/-Wl,-z,pack-relative-relocs//g')
echo "building kodi"
cmake "${_args[@]}" ../"$_gitname"
make
This particular flag, when it works, just makes the resulting binary a little bit smaller and more organized, it isn't really to do with security, so removing it should be fine.
Pinned Comments
graysky commented on 2022-06-11 11:49 (UTC)
@laichiaheng - kodi is bound to a specific version of ffmpeg which is generally older than Arch's package. We avoid incompatibilities by using that specific version (ie internal ffmpeg). Recommend that you build kodi in clean chroot. See: https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot
I wrote a script that automates much of that called clean-chroot-manager offered here in the AUR.