When building a module keep symbols if built with "MKCTF" and "COPTS=-g".

This commit is contained in:
hannken 2019-07-05 08:28:16 +00:00
parent 8131c50e5e
commit ce2428b9c3
1 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.kmodule.mk,v 1.61 2019/05/09 23:34:51 maya Exp $
# $NetBSD: bsd.kmodule.mk,v 1.62 2019/07/05 08:28:16 hannken Exp $
# We are not building this with PIE
MKPIE=no
@ -11,6 +11,11 @@ CFLAGS+= -g
# Only need symbols for ctf, strip them after converting to CTF
CTFFLAGS= -L VERSION
CTFMFLAGS= -t -L VERSION
# Keep symbols if built with "-g"
.if !empty(COPTS:M*-g*)
CTFFLAGS+= -g
CTFMFLAGS+= -g
.endif
.endif
.include <bsd.sys.mk>