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
This commit is contained in:
Baptiste Daroussin 2023-11-13 18:18:58 +01:00
parent 3fd60a6b73
commit 030af1b62d

View File

@ -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