Module Name:    src
Committed By:   tsutsui
Date:           Sat Oct 26 10:10:14 UTC 2019

Modified Files:
        src/sys/arch/zaurus/stand/zbsdmod: Makefile

Log Message:
Misc cleanup to avoid future confusion.

- Remove more unnecessary debug sections
- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
- Use CFLAGS and CPPFLAGS correctly
- Explicitly set -ffreestanding


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/zaurus/stand/zbsdmod/Makefile

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

Modified files:

Index: src/sys/arch/zaurus/stand/zbsdmod/Makefile
diff -u src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.11 src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.12
--- src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.11	Mon Sep 23 13:42:37 2019
+++ src/sys/arch/zaurus/stand/zbsdmod/Makefile	Sat Oct 26 10:10:14 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2019/09/23 13:42:37 christos Exp $
+#	$NetBSD: Makefile,v 1.12 2019/10/26 10:10:14 tsutsui Exp $
 
 WARNS?=	4
 
@@ -10,8 +10,18 @@ OBJS=	zbsdmod.o
 SRCS=	zbsdmod.c
 NOMAN=	# defined
 
+OBJCOPY_FLAGS=			\
+	-R .debug_abbrev	\
+	-R .debug_aranges	\
+	-R .debug_info		\
+	-R .debug_line		\
+	-R .debug_loc		\
+	-R .debug_ranges	\
+	-R .debug_str		\
+	-R .eh_frame
+
 realall: ${OBJS}
-	${OBJCOPY} -R .eh_frame ${.OBJDIR}/zbsdmod.o
+	${OBJCOPY} ${OBJCOPY_FLAGS} ${.OBJDIR}/zbsdmod.o
 
 .include <bsd.klinks.mk>
 .include <bsd.prog.mk>
@@ -21,11 +31,12 @@ afterinstall:
 		${OBJS} ${DESTDIR}/${BINDIR}
 
 CPUFLAGS=
-COPTS=		-Os
+DBG=		-Os
 CFLAGS+=	-fno-strict-aliasing
-CFLAGS+=	-DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
-CPPFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
-CPPFLAGS+=      -nostdinc -D_STANDALONE
+CFLAGS+=	-ffreestanding -nostdinc
+CFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
+CPPFLAGS+=	-DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
+CPPFLAGS+=	-D_STANDALONE
 CPPFLAGS+=	-I${.OBJDIR} -I${S}
 
 release: check_RELEASEDIR

Reply via email to