summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2004-11-16 20:42:03 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2004-11-16 20:42:03 +0000
commit1c4d3556854e52686428a85c1dbd01f18eb2896e (patch)
tree86fafdadb3445db88babab13d305c6fe6dc98b99 /sys/arch/sgi
parent76a66fe447e4b939a2f507b0d4b247b93f318676 (diff)
Strip kernels compiled with DEBUG=-g leaving an unstripped kernel as bsd.gdb.
ok miod@
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/conf/Makefile.sgi10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi
index 69575e42619..d657843e33b 100644
--- a/sys/arch/sgi/conf/Makefile.sgi
+++ b/sys/arch/sgi/conf/Makefile.sgi
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sgi,v 1.9 2004/10/20 12:49:15 pefo Exp $
+# $OpenBSD: Makefile.sgi,v 1.10 2004/11/16 20:42:02 kettenis Exp $
# Makefile for OpenBSD
#
@@ -58,6 +58,7 @@ COPTS?= -O2
CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -x assembler-with-cpp -traditional-cpp \
-mno-abicalls ${ABI} -D_LOCORE
+STRIPFLAGS= -g -X -x
### find out what to use for libkern
.include "$S/lib/libkern/Makefile.inc"
@@ -109,6 +110,13 @@ SYSTEM_LD= -@if [ X${DEBUG} = X-g ]; \
SYSTEM_LD_TAIL= chmod 755 $@; \
${SIZE} $@
+DEBUG?=
+.if ${DEBUG} == "-g"
+SYSTEM_LD_TAIL+=; \
+ echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
+ echo ${STRIP} ${STRIPFLAGS} $@; ${STRIP} ${STRIPFLAGS} $@
+.endif
+
%LOAD
newvers: