Page MenuHomeFreeBSD

D43497.1795534560.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D43497.1795534560.diff

Index: Mk/Features/sanitize.mk
===================================================================
--- /dev/null
+++ Mk/Features/sanitize.mk
@@ -0,0 +1,20 @@
+# Sanitize Support
+#
+# In order to enable it, add to your to your make.conf:
+# - For all ports (not advised): WITH_SANITIZE=yes
+# - For a specified port: WITH_SANITIZE_PORTS+=ftp/curl
+# In order to replace the default asan by others, like msan as example:
+# SANITIZE_FLAGS="-fsanitize=memory"
+#
+
+.if !defined(_SANITIZE_MK_INCLUDED)
+_SANITIZE_MK_INCLUDED= yes
+SANITIZE_Include_MAINTAINER= portmgr@FreeBSD.org
+
+. if !defined(SANITIZE_UNSAFE)
+ SANITIZE_FLAGS?= -fsanitize=address
+ CFLAGS+= ${SANITIZE_FLAGS}
+ CXXFLAGS+= ${SANITIZE_FLAGS}
+ LDFLAGS+= ${SANITIZE_FLAGS}
+. endif
+.endif
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk
+++ Mk/bsd.port.mk
@@ -1016,7 +1016,7 @@
# These need to be absolute since we don't know how deep in the ports
# tree we are and thus can't go relative. They can, of course, be overridden
# by individual Makefiles or local system make configuration.
-_LIST_OF_WITH_FEATURES= debug lto ssp pie relro bind_now
+_LIST_OF_WITH_FEATURES= debug lto ssp pie relro bind_now sanitize
_DEFAULT_WITH_FEATURES= ssp
PORTSDIR?= /usr/ports
LOCALBASE?= /usr/local

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 24, 3:36 PM (1 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41947568
Default Alt Text
D43497.1795534560.diff (1 KB)

Event Timeline