Add `-z pack-relative-relocs` to RUSTFLAGS (#196)

rustc/cargo ignores LDFLAGS and requires the linker flags to be passed
via `-Clink-arg=` in RUSTFLAGS.

Co-authored-by: Daniel Bertalan <dani@danielbertalan.dev>
Reviewed-on: #196
Co-authored-by: Daniel Bertalan <bertaland@noreply.somegit.dev>
Co-committed-by: Daniel Bertalan <bertaland@noreply.somegit.dev>
This commit is contained in:
Daniel Bertalan 2023-06-05 17:19:48 +02:00 committed by anonfunc
parent db8cb28fc5
commit cbb2ea927d
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ common:
packager: "ALHP $march$ <alhp@harting.dev>"
makeflags: "-j$buildproc$"
# https://somegit.dev/ALHP/ALHP.GO/issues/110
rustflags: "-Copt-level=3 -Ctarget-cpu=$march$"
rustflags: "-Copt-level=3 -Ctarget-cpu=$march$ -Clink-arg=-Wl,-z,pack-relative-relocs"
ltoflags:
- "-falign-functions=32" # https://github.com/InBetweenNames/gentooLTO/issues/164
kcflags: " -march=$march$ -O3"