From nobody Sat Nov 13 09:42:40 2021 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 88DFA1841302; Sat, 13 Nov 2021 09:42:41 +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 4Hrr8w6lVrz4d5D; Sat, 13 Nov 2021 09:42:40 +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 8891811518; Sat, 13 Nov 2021 09:42:40 +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 1AD9geGS018522; Sat, 13 Nov 2021 09:42:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AD9geBc018521; Sat, 13 Nov 2021 09:42:40 GMT (envelope-from git) Date: Sat, 13 Nov 2021 09:42:40 GMT Message-Id: <202111130942.1AD9geBc018521@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Tobias Kortkamp Subject: git: 3dd789ff4ac3 - main - devel/freebsd-sysroot: Add -mno-relax to the riscv64 wrapper scripts List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tobik X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3dd789ff4ac3db21c9fde387acd5ba832989380a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tobik: URL: https://cgit.FreeBSD.org/ports/commit/?id=3dd789ff4ac3db21c9fde387acd5ba832989380a commit 3dd789ff4ac3db21c9fde387acd5ba832989380a Author: Tobias Kortkamp AuthorDate: 2021-11-09 13:21:20 +0000 Commit: Tobias Kortkamp CommitDate: 2021-11-13 09:08:42 +0000 devel/freebsd-sysroot: Add -mno-relax to the riscv64 wrapper scripts $ FREEBSD_SYSROOT_CC=clang13 /usr/local/freebsd-sysroot/riscv64/bin/cc test.c ld: error: test.c:(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax On riscv64 base clang defaults to -mno-relax (per D25210). This patch has not been applied to ports LLVM. In the wrapper scripts pass -mno-relax explicitly to make it work as expected when FREEBSD_SYSROOT_CC is set to ports clang. --- devel/freebsd-sysroot/Makefile | 2 +- devel/freebsd-sysroot/files/riscv64-c++.in | 4 ++++ devel/freebsd-sysroot/files/riscv64-cc.in | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/devel/freebsd-sysroot/Makefile b/devel/freebsd-sysroot/Makefile index 151257f4b7fd..cae92c98e281 100644 --- a/devel/freebsd-sysroot/Makefile +++ b/devel/freebsd-sysroot/Makefile @@ -1,5 +1,5 @@ PORTNAME= freebsd-sysroot -DISTVERSION= a2021-09-14 +DISTVERSION= a2021-11-09 CATEGORIES= devel MASTER_SITES= LOCAL/tobik:${FLAVOR} \ ${_SYSROOT_DIST:@f@https://download.freebsd.org/ftp/$f?dummy=/:${FLAVOR}@} diff --git a/devel/freebsd-sysroot/files/riscv64-c++.in b/devel/freebsd-sysroot/files/riscv64-c++.in new file mode 100644 index 000000000000..6148593cb1b0 --- /dev/null +++ b/devel/freebsd-sysroot/files/riscv64-c++.in @@ -0,0 +1,4 @@ +#!/bin/sh +: ${FREEBSD_SYSROOT_CXX:="%%FREEBSD_SYSROOT_CXX%%"} +: ${FREEBSD_SYSROOT:="%%FREEBSD_SYSROOT%%"} +exec "${FREEBSD_SYSROOT_CXX}" --sysroot="${FREEBSD_SYSROOT}" --target=%%FREEBSD_SYSROOT_LLVM_TRIPLE%% --stdlib=libc++ -mno-relax "$@" diff --git a/devel/freebsd-sysroot/files/riscv64-cc.in b/devel/freebsd-sysroot/files/riscv64-cc.in new file mode 100644 index 000000000000..8777c34d30f3 --- /dev/null +++ b/devel/freebsd-sysroot/files/riscv64-cc.in @@ -0,0 +1,4 @@ +#!/bin/sh +: ${FREEBSD_SYSROOT_CC:="%%FREEBSD_SYSROOT_CC%%"} +: ${FREEBSD_SYSROOT:="%%FREEBSD_SYSROOT%%"} +exec "${FREEBSD_SYSROOT_CC}" --sysroot="${FREEBSD_SYSROOT}" --target=%%FREEBSD_SYSROOT_LLVM_TRIPLE%% -mno-relax "$@"