Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src If MKREPRO, transform ${NETBSDSRCDIR} to /usr/src and ${DEST...



details:   https://anonhg.NetBSD.org/src/rev/a6651fdf7558
branches:  trunk
changeset: 760069:a6651fdf7558
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Dec 25 18:56:44 2010 +0000

description:
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.

diffstat:

 share/mk/bsd.hostprog.mk |  4 ++--
 share/mk/bsd.sys.mk      |  7 ++++++-
 tools/Makefile.host      |  3 ++-
 3 files changed, 10 insertions(+), 4 deletions(-)

diffs (55 lines):

diff -r e88857667e3f -r a6651fdf7558 share/mk/bsd.hostprog.mk
--- a/share/mk/bsd.hostprog.mk  Sat Dec 25 18:23:39 2010 +0000
+++ b/share/mk/bsd.hostprog.mk  Sat Dec 25 18:56:44 2010 +0000
@@ -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 @@
 
 beforedepend:
 CFLAGS:=       ${HOST_CFLAGS}
-CPPFLAGS:=     ${HOST_CPPFLAGS}
+CPPFLAGS:=     ${HOST_CPPFLAGS:N-Wp,-iremap,*}
 
 lint: ${LOBJS}
 .if defined(LOBJS) && !empty(LOBJS)
diff -r e88857667e3f -r a6651fdf7558 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk       Sat Dec 25 18:23:39 2010 +0000
+++ b/share/mk/bsd.sys.mk       Sat Dec 25 18:56:44 2010 +0000
@@ -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
diff -r e88857667e3f -r a6651fdf7558 tools/Makefile.host
--- a/tools/Makefile.host       Sat Dec 25 18:23:39 2010 +0000
+++ b/tools/Makefile.host       Sat Dec 25 18:56:44 2010 +0000
@@ -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 @@
 HOSTPROGNAME?= ${HOSTPROG}
 HOST_BINDIR?=  ${TOOLDIR}/bin
 HOST_CPPFLAGS:=        ${HOST_CPPFLAGS} ${CPPFLAGS}
+HOST_CPPFLAGS:=        ${HOST_CPPFLAGS:N-Wp,-iremap,*}
 .undef LINKS
 
 SRCS?=         ${HOSTPROG}.c



Home | Main Index | Thread Index | Old Index