Build entire toolchain as PIC for proper static linking

This commit is contained in:
BtbN
2021-05-14 22:06:51 +02:00
parent a0384b8b70
commit 654a6d765e
5 changed files with 27 additions and 18 deletions

View File

@ -20,9 +20,12 @@ ffbuild_dockerbuild() {
return 0
}
ffbuild_configure() {
ffbuild_ldexeflags() {
echo '-pie'
if [[ $VARIANT == *shared* ]]; then
# Can't escape escape hell
echo --extra-ldexeflags=\'-Wl,-rpath='\\\\\\\$\\\$ORIGIN'\\ -Wl,-rpath='\\\\\\\$\\\$ORIGIN/../lib'\'
echo -Wl,-rpath='\\\\\\\$\\\$ORIGIN'
echo -Wl,-rpath='\\\\\\\$\\\$ORIGIN/../lib'
fi
}