From owner-dev-commits-src-all@freebsd.org Thu Aug 5 09:25:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 30FA46605E3; Thu, 5 Aug 2021 09:25:49 +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 4GgNWc73kXz4nVw; Thu, 5 Aug 2021 09:25:48 +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 985D417B44; Thu, 5 Aug 2021 09:25:48 +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 1759PmWb006631; Thu, 5 Aug 2021 09:25:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1759Pmir006630; Thu, 5 Aug 2021 09:25:48 GMT (envelope-from git) Date: Thu, 5 Aug 2021 09:25:48 GMT Message-Id: <202108050925.1759Pmir006630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: 120f0a029e26 - stable/13 - Fix building rescue/rescue when sanitizers are enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 120f0a029e267067325757f4269ab6b30506ddd7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2021 09:25:49 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=120f0a029e267067325757f4269ab6b30506ddd7 commit 120f0a029e267067325757f4269ab6b30506ddd7 Author: Alex Richardson AuthorDate: 2021-07-06 11:18:29 +0000 Commit: Alex Richardson CommitDate: 2021-08-05 08:59:51 +0000 Fix building rescue/rescue when sanitizers are enabled We have to ensure that we don't link any instrumented object files into rescue as it is a static executable and static binaries can't use the sanitizer runtime. Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D31044 (cherry picked from commit 2eefc1d926430dbba83128d27f8bed3c34199159) --- rescue/rescue/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index 7352828a822c..f2aa614f1dfc 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -6,7 +6,12 @@ PACKAGE=rescue MAN= MK_SSP= no +# Static-PIE is not supported so we should not be linking against _pie.a libs. +# This is also needed to avoid linking against sanitizer-instrumented libraries +# since MK_ASAN/MK_UBSAN will instrument the .pieo object files. +MK_PIE= no NO_SHARED= yes +CRUNCH_BUILDOPTS+= MK_PIE=no NO_SHARED=yes PROG= rescue BINDIR?=/rescue