Sat Oct 26 10:10:14 2019 UTC ()
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


(tsutsui)
diff -r1.11 -r1.12 src/sys/arch/zaurus/stand/zbsdmod/Makefile

cvs diff -r1.11 -r1.12 src/sys/arch/zaurus/stand/zbsdmod/Makefile (expand / switch to unified diff)

--- src/sys/arch/zaurus/stand/zbsdmod/Makefile 2019/09/23 13:42:37 1.11
+++ src/sys/arch/zaurus/stand/zbsdmod/Makefile 2019/10/26 10:10:14 1.12
@@ -1,33 +1,44 @@ @@ -1,33 +1,44 @@
1# $NetBSD: Makefile,v 1.11 2019/09/23 13:42:37 christos Exp $ 1# $NetBSD: Makefile,v 1.12 2019/10/26 10:10:14 tsutsui Exp $
2 2
3WARNS?= 4 3WARNS?= 4
4 4
5.include <bsd.init.mk> 5.include <bsd.init.mk>
6 6
7S= ${.CURDIR}/../../../.. 7S= ${.CURDIR}/../../../..
8 8
9OBJS= zbsdmod.o 9OBJS= zbsdmod.o
10SRCS= zbsdmod.c 10SRCS= zbsdmod.c
11NOMAN= # defined 11NOMAN= # defined
12 12
 13OBJCOPY_FLAGS= \
 14 -R .debug_abbrev \
 15 -R .debug_aranges \
 16 -R .debug_info \
 17 -R .debug_line \
 18 -R .debug_loc \
 19 -R .debug_ranges \
 20 -R .debug_str \
 21 -R .eh_frame
 22
13realall: ${OBJS} 23realall: ${OBJS}
14 ${OBJCOPY} -R .eh_frame ${.OBJDIR}/zbsdmod.o 24 ${OBJCOPY} ${OBJCOPY_FLAGS} ${.OBJDIR}/zbsdmod.o
15 25
16.include <bsd.klinks.mk> 26.include <bsd.klinks.mk>
17.include <bsd.prog.mk> 27.include <bsd.prog.mk>
18 28
19afterinstall: 29afterinstall:
20 ${INSTALL_FILE} ${INSTALL_COPY} -o root -g wheel -m 644 \ 30 ${INSTALL_FILE} ${INSTALL_COPY} -o root -g wheel -m 644 \
21 ${OBJS} ${DESTDIR}/${BINDIR} 31 ${OBJS} ${DESTDIR}/${BINDIR}
22 32
23CPUFLAGS= 33CPUFLAGS=
24COPTS= -Os 34DBG= -Os
25CFLAGS+= -fno-strict-aliasing 35CFLAGS+= -fno-strict-aliasing
26CFLAGS+= -DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\" 36CFLAGS+= -ffreestanding -nostdinc
27CPPFLAGS+= ${ARM_APCS_FLAGS} -mcpu=xscale 37CFLAGS+= ${ARM_APCS_FLAGS} -mcpu=xscale
28CPPFLAGS+= -nostdinc -D_STANDALONE 38CPPFLAGS+= -DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
 39CPPFLAGS+= -D_STANDALONE
29CPPFLAGS+= -I${.OBJDIR} -I${S} 40CPPFLAGS+= -I${.OBJDIR} -I${S}
30 41
31release: check_RELEASEDIR 42release: check_RELEASEDIR
32 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${OBJS} \ 43 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${OBJS} \
33 ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation 44 ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation