tech-userlevel archive

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

Re: RCSID/SCCS conditionals



On Wed, Aug 27, 2008 at 09:45:25AM +1000, Luke Mewburn wrote:
> I think we should move to the latter -- __RCSID only, no #ifndef lint.

Attached patch removes the need for LIBC_SCCSID and SYSLIBC_SCCS moking
in src/lib/libc in a more general fashion.

What remains is fixing machine/asm.h on a bunch of platforms to put RCS
IDs from assembler sources in the right section.

Comments?

Joerg
Index: bsd.README
===================================================================
RCS file: /home/joerg/repo/netbsd/src/share/mk/bsd.README,v
retrieving revision 1.224
diff -u -p -r1.224 bsd.README
--- bsd.README  5 Sep 2008 22:26:28 -0000       1.224
+++ bsd.README  8 Sep 2008 02:40:02 -0000
@@ -177,6 +177,10 @@ MKIEEEFP   If "no", don't add code for IEE
                Has no effect on most platforms.
                Default: yes
 
+MKSTRIPIDENT   If not "no", strip the RCS IDs from programs and shared
+               libraries.
+               Default: no
+
 MKINET6                If "no", disables building of INET6 (IPv6) 
infrastructure
                (libraries and support programs).
                Default: yes
Index: bsd.lib.mk
===================================================================
RCS file: /home/joerg/repo/netbsd/src/share/mk/bsd.lib.mk,v
retrieving revision 1.285
diff -u -p -r1.285 bsd.lib.mk
--- bsd.lib.mk  13 Aug 2008 16:36:15 -0000      1.285
+++ bsd.lib.mk  8 Sep 2008 02:20:27 -0000
@@ -509,6 +509,9 @@ lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
        ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
        mv -f lib${LIB}.so.tmp lib${LIB}.so
 .endif
+.if defined(MKSTRIPIDENT) && ${MKSTRIPIDENT} != "no"
+       ${OBJCOPY} -R .ident ${.TARGET}
+.endif
 
 .if !empty(LOBJS)                                                      # {
 LLIBS?=                -lc
Index: bsd.prog.mk
===================================================================
RCS file: /home/joerg/repo/netbsd/src/share/mk/bsd.prog.mk,v
retrieving revision 1.234
diff -u -p -r1.234 bsd.prog.mk
--- bsd.prog.mk 28 Aug 2008 07:17:06 -0000      1.234
+++ bsd.prog.mk 8 Sep 2008 02:20:36 -0000
@@ -308,6 +308,9 @@ ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}}
 .if defined(PAXCTL_FLAGS.${_P})
        ${PAXCTL} ${PAXCTL_FLAGS.${_P}} ${.TARGET}
 .endif
+.if defined(MKSTRIPIDENT) && ${MKSTRIPIDENT} != "no"
+       ${OBJCOPY} -R .ident ${.TARGET}
+.endif
 .endif # !commands(${_P})
 
 ${_P}.ro: ${OBJS.${_P}} ${DPADD}


Home | Main Index | Thread Index | Old Index