Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Sep 2021 10:10:05 GMT
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 4f3befc2a362 - main - ports-mgmt/pkg-devel: Add an option for building with sanitizer
Message-ID:  <202109141010.18EAA5Yb091282@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4f3befc2a362bf8fb86c83a99015df1d45c28bff

commit 4f3befc2a362bf8fb86c83a99015df1d45c28bff
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2021-09-14 10:08:58 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2021-09-14 10:08:58 +0000

    ports-mgmt/pkg-devel: Add an option for building with sanitizer
    
    Sanitizers helps finding problems, add an option to pkg-devel to be
    able to compile with them.
---
 ports-mgmt/pkg-devel/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ports-mgmt/pkg-devel/Makefile b/ports-mgmt/pkg-devel/Makefile
index 7b9f6ddf4cf9..4094f611af20 100644
--- a/ports-mgmt/pkg-devel/Makefile
+++ b/ports-mgmt/pkg-devel/Makefile
@@ -25,7 +25,8 @@ CONFIGURE_ENV=	CC_FOR_BUILD="${CC}"
 # so that pkg-static is used from the wrkdir
 USE_SUBMAKE=	yes
 
-OPTIONS_DEFINE=	DOCS
+OPTIONS_DEFINE=	DOCS SAN
+SAN_DESC=	Enable sanitizers (ASAN and UBSAN)
 
 .if !exists(/usr/include/jail.h)
 EXTRA_PATCHES=	${FILESDIR}/extra-patch-docs_pkg.8
@@ -33,6 +34,10 @@ EXTRA_PATCHES=	${FILESDIR}/extra-patch-docs_pkg.8
 
 .include <bsd.port.pre.mk>
 
+.if ${PORT_OPTIONS:MSAN}
+CONFIGURE_ARGS+=	--with-asan --with-ubsan
+.endif
+
 # TODO: activate in april 2021
 #.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1400000
 #CONFIGURE_ARGS+=	--default-format=tzst



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