Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Aug 2021 09:25:48 GMT
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 120f0a029e26 - stable/13 - Fix building rescue/rescue when sanitizers are enabled
Message-ID:  <202108050925.1759Pmir006630@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by arichardson:

URL: https://cgit.FreeBSD.org/src/commit/?id=120f0a029e267067325757f4269ab6b30506ddd7

commit 120f0a029e267067325757f4269ab6b30506ddd7
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-07-06 11:18:29 +0000
Commit:     Alex Richardson <arichardson@FreeBSD.org>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108050925.1759Pmir006630>