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).
This commit is contained in:
martin 2015-10-10 06:49:40 +00:00
parent c0b82ae584
commit 01cb3be7ca
1 changed files with 5 additions and 17 deletions

View File

@ -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= srt0.s Locore.c boot.c ofdev.c alloc.c net.c netif_of.c vers.c
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 @@ LIBCRTEND=
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 @@ ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
.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