From 473a0e375ef3e4ffc058478ce07908e5e06e7bc6 Mon Sep 17 00:00:00 2001 From: Mikael Urankar Date: Mon, 6 Sep 2021 21:15:53 +0200 Subject: lang/rust: don't overwrite hwcap with the return value of elf_aux_info(3) Reported by: jbeich --- lang/rust/Makefile | 2 +- .../files/patch-src_llvm-project_compiler-rt_lib_builtins_cpu__model.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 25ba0b104626..da3b0ae3ebba 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -2,7 +2,7 @@ PORTNAME= rust PORTVERSION?= 1.54.0 -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES= lang MASTER_SITES= https://static.rust-lang.org/dist/:src \ https://dev-static.rust-lang.org/dist/:src \ diff --git a/lang/rust/files/patch-src_llvm-project_compiler-rt_lib_builtins_cpu__model.c b/lang/rust/files/patch-src_llvm-project_compiler-rt_lib_builtins_cpu__model.c index ee00760e61c6..b58648815199 100644 --- a/lang/rust/files/patch-src_llvm-project_compiler-rt_lib_builtins_cpu__model.c +++ b/lang/rust/files/patch-src_llvm-project_compiler-rt_lib_builtins_cpu__model.c @@ -9,7 +9,7 @@ +#if defined(__linux__) + hwcap = getauxval(AT_HWCAP); +#elif defined(__FreeBSD__) -+ hwcap = elf_aux_info(AT_HWCAP, &hwcap, sizeof(unsigned long)); ++ elf_aux_info(AT_HWCAP, &hwcap, sizeof(unsigned long)); +#endif __aarch64_have_lse_atomics = (hwcap & HWCAP_ATOMICS) != 0; } -- cgit v1.2.3