If MKREPRO, transform ${NETBSDSRCDIR} to /usr/src and ${DESTDIR} to /
for the purpose of the C preprocessor. This avoids leaking the source path into the final binaries.
This commit is contained in:
parent
9f5adb9583
commit
762325586d
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.hostprog.mk,v 1.59 2010/11/22 11:29:07 pooka Exp $
|
||||
# $NetBSD: bsd.hostprog.mk,v 1.60 2010/12/25 18:56:45 joerg Exp $
|
||||
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
|
||||
|
||||
.include <bsd.init.mk>
|
||||
|
@ -125,7 +125,7 @@ cleanprog: .PHONY
|
|||
|
||||
beforedepend:
|
||||
CFLAGS:= ${HOST_CFLAGS}
|
||||
CPPFLAGS:= ${HOST_CPPFLAGS}
|
||||
CPPFLAGS:= ${HOST_CPPFLAGS:N-Wp,-iremap,*}
|
||||
|
||||
lint: ${LOBJS}
|
||||
.if defined(LOBJS) && !empty(LOBJS)
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
# $NetBSD: bsd.sys.mk,v 1.192 2010/04/21 16:09:11 pooka Exp $
|
||||
# $NetBSD: bsd.sys.mk,v 1.193 2010/12/25 18:56:45 joerg Exp $
|
||||
#
|
||||
# Build definitions used for NetBSD source tree builds.
|
||||
|
||||
.if !defined(_BSD_SYS_MK_)
|
||||
_BSD_SYS_MK_=1
|
||||
|
||||
.if ${MKREPRO:Uno} == "yes"
|
||||
CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src
|
||||
CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/
|
||||
.endif
|
||||
|
||||
.if defined(WARNS)
|
||||
.if ${WARNS} > 0
|
||||
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.host,v 1.26 2009/12/01 17:06:34 uebayasi Exp $
|
||||
# $NetBSD: Makefile.host,v 1.27 2010/12/25 18:56:44 joerg Exp $
|
||||
|
||||
NOINFO= # defined
|
||||
NOLINT= # defined
|
||||
|
@ -42,6 +42,7 @@ ${var}:= ${${var}}
|
|||
HOSTPROGNAME?= ${HOSTPROG}
|
||||
HOST_BINDIR?= ${TOOLDIR}/bin
|
||||
HOST_CPPFLAGS:= ${HOST_CPPFLAGS} ${CPPFLAGS}
|
||||
HOST_CPPFLAGS:= ${HOST_CPPFLAGS:N-Wp,-iremap,*}
|
||||
.undef LINKS
|
||||
|
||||
SRCS?= ${HOSTPROG}.c
|
||||
|
|
Loading…
Reference in New Issue