From owner-dev-commits-ports-main@freebsd.org Mon Sep 6 13:53:17 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D7B9675715; Mon, 6 Sep 2021 13:53:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H38xT11bVz3M78; Mon, 6 Sep 2021 13:53:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02ECD1FE59; Mon, 6 Sep 2021 13:53:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 186DrGqG006376; Mon, 6 Sep 2021 13:53:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 186DrGeU006375; Mon, 6 Sep 2021 13:53:16 GMT (envelope-from git) Date: Mon, 6 Sep 2021 13:53:16 GMT Message-Id: <202109061353.186DrGeU006375@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Mikael Urankar Subject: git: 74c66d50fd5f - main - lang/rust: Fix for missing getauxval function on FreeBSD MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mikael X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74c66d50fd5f3f12469881d4f9c5634f8722ccc5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2021 13:53:17 -0000 The branch main has been updated by mikael: URL: https://cgit.FreeBSD.org/ports/commit/?id=74c66d50fd5f3f12469881d4f9c5634f8722ccc5 commit 74c66d50fd5f3f12469881d4f9c5634f8722ccc5 Author: Mikael Urankar AuthorDate: 2021-09-06 13:14:54 +0000 Commit: Mikael Urankar CommitDate: 2021-09-06 13:53:04 +0000 lang/rust: Fix for missing getauxval function on FreeBSD Use FreeBSD's elf_aux_info for detecting ARM HW features PR: 258198 Tested by: Bob Prohaska --- lang/rust/Makefile | 2 +- ...rc_llvm-project_compiler-rt_lib_builtins_cpu__model.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 77476313a0dc..26185e9697df 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -2,7 +2,7 @@ PORTNAME= rust PORTVERSION?= 1.54.0 -PORTREVISION?= 0 +PORTREVISION?= 1 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 new file mode 100644 index 000000000000..ee00760e61c6 --- /dev/null +++ b/lang/rust/files/patch-src_llvm-project_compiler-rt_lib_builtins_cpu__model.c @@ -0,0 +1,16 @@ +--- src/llvm-project/compiler-rt/lib/builtins/cpu_model.c.orig 2021-05-22 10:27:43 UTC ++++ src/llvm-project/compiler-rt/lib/builtins/cpu_model.c +@@ -775,7 +775,12 @@ _Bool __aarch64_have_lse_atomics + #define HWCAP_ATOMICS (1 << 8) + #endif + static void CONSTRUCTOR_ATTRIBUTE init_have_lse_atomics(void) { +- unsigned long hwcap = getauxval(AT_HWCAP); ++ unsigned long hwcap = 0; ++#if defined(__linux__) ++ hwcap = getauxval(AT_HWCAP); ++#elif defined(__FreeBSD__) ++ hwcap = elf_aux_info(AT_HWCAP, &hwcap, sizeof(unsigned long)); ++#endif + __aarch64_have_lse_atomics = (hwcap & HWCAP_ATOMICS) != 0; + } + #endif // defined(__has_include)