git: 8583bcb5b400 - main - Revert "build: provide a FORTIFY_SOURCE.<src file> override"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 01 May 2026 12:19:57 UTC
The branch main has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=8583bcb5b400c4e4d18a563cd749ee9b23750e0a
commit 8583bcb5b400c4e4d18a563cd749ee9b23750e0a
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2026-05-01 12:19:17 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2026-05-01 12:19:17 +0000
Revert "build: provide a FORTIFY_SOURCE.<src file> override"
This reverts commit c46a0b590716144d772eeba83ca88d96ee12c2f1. It broke
the build and I'm not awake yet.
---
share/mk/bsd.sys.mk | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 5bd8cd3362d1..93e7c8572310 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -321,12 +321,9 @@ SSP_CFLAGS?= -fstack-protector-strong
.endif
CFLAGS+= ${SSP_CFLAGS}
.endif # SSP
-
-.if empty(CFLAGS:M-D_FORTIFY_SOURCE*)
-CFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE.${.IMPSRC:T}:U${FORTIFY_SOURCE}}
-.endif
-.if empty(CXXFLAGS:M-D_FORTIFY_SOURCE*)
-CXXFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE.${.IMPSRC:T}:U${FORTIFY_SOURCE}}
+.if ${FORTIFY_SOURCE} > 0
+CFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE}
+CXXFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE}
.endif
# Additional flags passed in CFLAGS and CXXFLAGS when MK_DEBUG_FILES is