From cbb2ea927ded8a0412fdf342fdb9f7af018fe1ce Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Mon, 5 Jun 2023 17:19:48 +0200 Subject: [PATCH] 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 Reviewed-on: https://somegit.dev/ALHP/ALHP.GO/pulls/196 Co-authored-by: Daniel Bertalan Co-committed-by: Daniel Bertalan --- flags.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flags.yaml b/flags.yaml index d48d49b..4d4276c 100644 --- a/flags.yaml +++ b/flags.yaml @@ -20,7 +20,7 @@ common: packager: "ALHP $march$ " 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"