Module Name:    src
Committed By:   christos
Date:           Tue Jan 22 20:43:17 UTC 2013

Modified Files:
        src/share/mk: bsd.lib.mk

Log Message:
Make the libfoo.so.X.Y.debug files actually contain debug symbols if MKDEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.325 -r1.326 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.325 src/share/mk/bsd.lib.mk:1.326
--- src/share/mk/bsd.lib.mk:1.325	Tue Nov 13 17:30:38 2012
+++ src/share/mk/bsd.lib.mk	Tue Jan 22 15:43:17 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.325 2012/11/13 22:30:38 pooka Exp $
+#	$NetBSD: bsd.lib.mk,v 1.326 2013/01/22 20:43:17 christos Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -47,6 +47,12 @@ CFLAGS+=        ${PIE_CFLAGS}
 AFLAGS+=        ${PIE_AFLAGS}
 .endif
 
+.if defined(MKDEBUG) && (${MKDEBUG} != "no")
+# We only add -g to the shared library objects
+# because we don't currently split .a archives.
+CSHLIBFLAGS+=	-g
+.endif
+
 ##### Libraries that this may depend upon.
 .if defined(LIBDPLIBS) && ${MKPIC} != "no"				# {
 .for _lib _dir in ${LIBDPLIBS}
@@ -238,7 +244,7 @@ CTFFLAGS+=	-g
 .c.pico:
 	${_MKTARGET_COMPILE}
 	${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
-.if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
+.if !defined(CSHLIBFLAGS) || empty(CSHLIBFLAGS:M*-g*) 
 	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
@@ -263,7 +269,7 @@ CTFFLAGS+=	-g
 .cc.pico .cpp.pico .cxx.pico .C.pico:
 	${_MKTARGET_COMPILE}
 	${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
-.if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
+.if !defined(CSHLIBFLAGS) || empty(CSHLIBFLAGS:M*-g*)
 	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 

Reply via email to