Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/stand/ofwboot Simplify, get rid of manual _LP...



details:   https://anonhg.NetBSD.org/src/rev/8a4941d10d70
branches:  trunk
changeset: 811053:8a4941d10d70
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Oct 10 06:49:40 2015 +0000

description:
Simplify, get rid of manual _LP64 define.
Do not pass a SUN4U define, as that is no longer used in the relevant headers.
Instead tell the compiler we are compiling for a v9 CPU (so it internally
defines everything we need).

diffstat:

 sys/arch/sparc/stand/ofwboot/Makefile |  22 +++++-----------------
 1 files changed, 5 insertions(+), 17 deletions(-)

diffs (52 lines):

diff -r 9286c3de6bc7 -r 8a4941d10d70 sys/arch/sparc/stand/ofwboot/Makefile
--- a/sys/arch/sparc/stand/ofwboot/Makefile     Sat Oct 10 05:50:34 2015 +0000
+++ b/sys/arch/sparc/stand/ofwboot/Makefile     Sat Oct 10 06:49:40 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.34 2015/10/02 20:36:54 joerg Exp $
+#      $NetBSD: Makefile,v 1.35 2015/10/10 06:49:40 martin Exp $
 
 CURDIR=        ${.CURDIR}
 S=     ${CURDIR}/../../../..
@@ -15,6 +15,7 @@
 SRCS+=         bootinfo.c loadfile_machdep.c promlib.c prf.c isfloppy.c
 .if ${MACHINE_ARCH} == "sparc64"
 SRCS+=         hvcall.S
+CPPFLAGS+=     -DSUN4V
 .endif
 .PATH:         ${S}/arch/sparc64/sparc64 ${S}/arch/sparc/stand/common
 
@@ -27,11 +28,8 @@
 
 COPTS+=                -ffreestanding
 CWARNFLAGS+=   -Wno-main
-CFLAGS+=       ${COPTS} ${CEXTRAFLAGS}
-CPPFLAGS+=     -D_STANDALONE -DSUN4U
-.if ${MACHINE_ARCH} == "sparc64"
-CPPFLAGS+=     -DSUN4V
-.endif
+CFLAGS+=       ${COPTS}
+CPPFLAGS+=     -D_STANDALONE
 CPPFLAGS+=     -DBOOT_ELF32 -DBOOT_ELF64 -DBOOT_AOUT
 CPPFLAGS+=     -DNETBOOT
 CPPFLAGS+=     -DSUPPORT_DHCP
@@ -109,19 +107,9 @@
 
 .include <bsd.prog.mk>
 
-.if ${MACHINE_ARCH} == "sparc64"
+CPUFLAGS+=             -mcpu=v9
 AFLAGS+=               -Wa,-Av9a
-CEXTRAFLAGS?=          -D_LP64
-.else
-AFLAGS+=               -Wa,-Av8plusa
-.endif
-
-.if CROSS
 AFLAGS+=               -x assembler-with-cpp -D_LOCORE -D__ELF__
-CEXTRAFLAGS?=          -D_LP64
-.else
-AFLAGS+=               -x assembler-with-cpp -D_LOCORE -D__ELF__ ${CEXTRAFLAGS}
-.endif
 
 NORMAL_S=      ${CC} ${AFLAGS} ${AFLAGS.${<:T}}  ${CPPFLAGS} -c $<
 srt0.o: srt0.s



Home | Main Index | Thread Index | Old Index