summaryrefslogtreecommitdiff
path: root/mk/tools
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2018-11-12 13:36:50 +0000
committerjperkin <jperkin@pkgsrc.org>2018-11-12 13:36:50 +0000
commit272558f684acc9f6bf1f1b06a4c57f69054b2382 (patch)
tree14bc784ee46347659ed0ca240e9ce2574d48b26a /mk/tools
parentfc76ab5acc76ec5ebe2f2171fe2d326d323bfd32 (diff)
downloadpkgsrc-272558f684acc9f6bf1f1b06a4c57f69054b2382.tar.gz
mk/tools: Create a strip-dbg tool.
On platform where strip supports -g it is used, otherwise this is a no-op.
Diffstat (limited to 'mk/tools')
-rw-r--r--mk/tools/strip.mk17
1 files changed, 15 insertions, 2 deletions
diff --git a/mk/tools/strip.mk b/mk/tools/strip.mk
index e75ec440db6..db9d77e0f94 100644
--- a/mk/tools/strip.mk
+++ b/mk/tools/strip.mk
@@ -1,4 +1,4 @@
-# $NetBSD: strip.mk,v 1.5 2018/08/22 20:48:37 maya Exp $
+# $NetBSD: strip.mk,v 1.6 2018/11/12 13:36:50 jperkin Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -39,7 +39,20 @@ TOOLS_CREATE+= strip
TOOLS_PATH.strip= ${TOOLS_PLATFORM.strip}
.endif
-# Make ${STRIP} call "strip" through the PATH, which should find the one
+#
+# Create a special strip-dbg tool for stripping just debug information,
+# used by the install-strip-debug target. Currently requires GNU strip.
+#
+.if !defined(TOOLS_PLATFORM.gstrip)
+TOOLS_NOOP+= strip-dbg
+.else
+TOOLS_CREATE+= strip-dbg
+TOOLS_PATH.strip-dbg= ${TOOLS_PLATFORM.gstrip}
+TOOLS_ARGS.strip-dbg= -g
+.endif
+
+# Make ${STRIP} and ${STRIP_DBG} call through the PATH so they find the ones
# under ${TOOLS_DIR}.
#
STRIP?= strip
+STRIP_DBG?= strip-dbg