Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/zaurus/stand/zbsdmod Misc cleanup to avoid future c...



details:   https://anonhg.NetBSD.org/src/rev/45ee3966d1c7
branches:  trunk
changeset: 1004354:45ee3966d1c7
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Oct 26 10:10:14 2019 +0000

description:
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

diffstat:

 sys/arch/zaurus/stand/zbsdmod/Makefile |  23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r 1893b85f1adc -r 45ee3966d1c7 sys/arch/zaurus/stand/zbsdmod/Makefile
--- a/sys/arch/zaurus/stand/zbsdmod/Makefile    Sat Oct 26 09:58:40 2019 +0000
+++ b/sys/arch/zaurus/stand/zbsdmod/Makefile    Sat Oct 26 10:10:14 2019 +0000
@@ -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 @@
 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 @@
                ${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



Home | Main Index | Thread Index | Old Index