git: 4f3befc2a362 - main - ports-mgmt/pkg-devel: Add an option for building with sanitizer
Emmanuel Vadot
manu at FreeBSD.org
Tue Sep 14 10:10:05 UTC 2021
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4f3befc2a362bf8fb86c83a99015df1d45c28bff
commit 4f3befc2a362bf8fb86c83a99015df1d45c28bff
Author: Emmanuel Vadot <manu at FreeBSD.org>
AuthorDate: 2021-09-14 10:08:58 +0000
Commit: Emmanuel Vadot <manu at 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
More information about the dev-commits-ports-all
mailing list