Fix up compiler options:
1) Get things right for 32-bit kernels 2) Always use medium any memory model for 64-bit kernels for the moment.
This commit is contained in:
parent
b40bbc753e
commit
7a49cca31a
|
@ -1,4 +1,14 @@
|
|||
# $NetBSD: Makefile.sparc64,v 1.44 2001/12/09 05:00:51 atatat Exp $
|
||||
# $NetBSD: Makefile.sparc64,v 1.45 2002/03/19 18:10:33 eeh Exp $
|
||||
|
||||
#=========================================================================
|
||||
#
|
||||
# ***** WARNING ******
|
||||
#
|
||||
# ANYONE WHO CHANGES THIS MAKEFILE AND DOES NOT TEST BOTH A 32-BIT
|
||||
# AND 64-BIT KERNEL WILL BE SHOT.
|
||||
#
|
||||
#=========================================================================
|
||||
|
||||
|
||||
# Makefile for NetBSD
|
||||
#
|
||||
|
@ -17,8 +27,11 @@
|
|||
#
|
||||
# makeoptions DEBUGLIST="uvm* trap if_*"
|
||||
|
||||
# Default to 32-bit. Set the MACHINE_ARCH accordingly, using either
|
||||
# the 32-bit or 64-bit toolchain.
|
||||
# Default to 32-bit. Set the MACHINE_ARCH accordingly.
|
||||
#
|
||||
# You must also be using the correct toolchain or the kernel build
|
||||
# will fail.
|
||||
#
|
||||
LP64?= no
|
||||
.if ${LP64} == "yes"
|
||||
MACHINE_ARCH=sparc64
|
||||
|
@ -39,16 +52,25 @@ GENASSYM= ${SPARC64}/sparc64/genassym.cf
|
|||
##
|
||||
## (2) compile settings
|
||||
##
|
||||
CPPFLAGS+= -Dsparc64
|
||||
CPPFLAGS+= -Dsparc64 -D__sparc64__
|
||||
.if ${LP64} == "yes"
|
||||
CPPFLAGS+= -D_LP64
|
||||
.endif
|
||||
CFLAGS+= -Wa,-Av9a -mno-fpu
|
||||
# 64-bit kernels
|
||||
CPPFLAGS+= -D_LP64 -Wa,-Av9a
|
||||
AFLAGS+= -Wa,-Av9a
|
||||
.if defined(PROF)
|
||||
# We need to run the compiler in medlow memory model.
|
||||
# Profiling is only supported in the medium low memory model.
|
||||
CFLAGS+= -mcmodel=medlow
|
||||
.else
|
||||
# Since the kernel resides in the lower 32 bits, use medium low for now anyway.
|
||||
CFLAGS+= -mcmodel=medlow
|
||||
.endif
|
||||
AFLAGS+= -x assembler-with-cpp -traditional-cpp -Wa,-Av9a
|
||||
.else
|
||||
# 32-bit kernels
|
||||
CPPFLAGS+= -m32 -Wa,-Av8plusa -mcpu=ultrasparc
|
||||
AFLAGS+= -Wa,-Av8plusa
|
||||
.endif
|
||||
CFLAGS+= -mno-fpu
|
||||
AFLAGS+= -x assembler-with-cpp -traditional-cpp
|
||||
|
||||
NOOPT_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -O0 -c $<
|
||||
|
||||
|
|
Loading…
Reference in New Issue