git: 030af1b62d7b - main - pkgbase: set the prefix of debug files and macros to /usr/src
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Nov 2023 07:43:18 UTC
The branch main has been updated by bapt:
URL: https://cgit.FreeBSD.org/src/commit/?id=030af1b62d7b9a86f5ecdceff5a1fa23e9570be1
commit 030af1b62d7b9a86f5ecdceff5a1fa23e9570be1
Author: Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2023-11-13 17:18:58 +0000
Commit: Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2023-11-14 07:43:15 +0000
pkgbase: set the prefix of debug files and macros to /usr/src
When the macro PACKAGE_BUILDING is set, then consider we are building package
for pkgbase, this has already been used in Makefile.inc1 and reuse the
PACKAGE_BUILDING macros already used for that purpose in the ports tree
In the future this should be tied to REPRODUCIBLE_BUILD
MFC After: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D42569
---
share/mk/src.sys.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/share/mk/src.sys.mk b/share/mk/src.sys.mk
index edf369638d9d..d5c2af0c559d 100644
--- a/share/mk/src.sys.mk
+++ b/share/mk/src.sys.mk
@@ -38,6 +38,9 @@ __postrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno
# default over to -fno-common, making this redundant.
CFCOMMONFLAG?= -fno-common
CFLAGS+= ${CFCOMMONFLAG}
+.if defined(PACKAGE_BUILDING)
+CFLAGS+= -fmacro-prefix-map=${SRCTOP}=/usr/src -fdebug-prefix-map=${SRCTOP}=/usr/src
+.endif
DEFAULTWARNS= 6