Fri Feb 21 20:45:12 2014 UTC ()
Use code model small for LLVM, it should be equivalent to GCC's medlow.


(joerg)
diff -r1.73 -r1.74 src/sys/arch/sparc64/conf/Makefile.sparc64

cvs diff -r1.73 -r1.74 src/sys/arch/sparc64/conf/Makefile.sparc64 (expand / switch to unified diff)

--- src/sys/arch/sparc64/conf/Makefile.sparc64 2013/03/19 19:59:40 1.73
+++ src/sys/arch/sparc64/conf/Makefile.sparc64 2014/02/21 20:45:12 1.74
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.sparc64,v 1.73 2013/03/19 19:59:40 christos Exp $ 1# $NetBSD: Makefile.sparc64,v 1.74 2014/02/21 20:45:12 joerg Exp $
2 2
3#========================================================================= 3#=========================================================================
4# 4#
5# ***** WARNING ****** 5# ***** WARNING ******
6# 6#
7# ANYONE WHO CHANGES THIS MAKEFILE AND DOES NOT TEST BOTH A 32-BIT 7# ANYONE WHO CHANGES THIS MAKEFILE AND DOES NOT TEST BOTH A 32-BIT
8# AND 64-BIT KERNEL WILL BE SHOT. 8# AND 64-BIT KERNEL WILL BE SHOT.
9# 9#
10#========================================================================= 10#=========================================================================
11 11
12 12
13# Makefile for NetBSD 13# Makefile for NetBSD
14# 14#
@@ -49,30 +49,32 @@ NEED_OWN_INSTALL_TARGET?=no @@ -49,30 +49,32 @@ NEED_OWN_INSTALL_TARGET?=no
49SPARC64= $S/arch/sparc64 49SPARC64= $S/arch/sparc64
50GENASSYM_CONF= ${SPARC64}/sparc64/genassym.cf 50GENASSYM_CONF= ${SPARC64}/sparc64/genassym.cf
51 51
52## 52##
53## (2) compile settings 53## (2) compile settings
54## 54##
55CPPFLAGS+= -Dsparc64 -D__sparc64__ 55CPPFLAGS+= -Dsparc64 -D__sparc64__
56.if ${LP64} == "yes" 56.if ${LP64} == "yes"
57# 64-bit kernels 57# 64-bit kernels
58CPPFLAGS+= -D_LP64 -Wa,-Av9a 58CPPFLAGS+= -D_LP64 -Wa,-Av9a
59AFLAGS+= -Wa,-Av9a 59AFLAGS+= -Wa,-Av9a
60.if defined(PROF) 60.if defined(PROF)
61# Profiling is only supported in the medium low memory model. 61# Profiling is only supported in the medium low memory model.
62CFLAGS+= -mcmodel=medlow 62CFLAGS+= ${${ACTIVE_CC} == "gcc":? -mcmodel=medlow :}
 63CFLAGS+= ${${ACTIVE_CC} == "clang":? -mcmodel=small :}
63.else 64.else
64# Since the kernel resides in the lower 32 bits, use medium low for now anyway. 65# Since the kernel resides in the lower 32 bits, use medium low for now anyway.
65CFLAGS+= -mcmodel=medlow 66CFLAGS+= ${${ACTIVE_CC} == "gcc":? -mcmodel=medlow :}
 67CFLAGS+= ${${ACTIVE_CC} == "clang":? -mcmodel=small :}
66.endif 68.endif
67.else 69.else
68# 32-bit kernels 70# 32-bit kernels
69CPPFLAGS+= -m32 -Wa,-Av8plusa -mcpu=ultrasparc 71CPPFLAGS+= -m32 -Wa,-Av8plusa -mcpu=ultrasparc
70AFLAGS+= -Wa,-Av8plusa 72AFLAGS+= -Wa,-Av8plusa
71.endif 73.endif
72CFLAGS+= -mno-fpu 74CFLAGS+= -mno-fpu
73AFLAGS+= -x assembler-with-cpp 75AFLAGS+= -x assembler-with-cpp
74 76
75## 77##
76## (3) libkern and compat 78## (3) libkern and compat
77## 79##
78OPT_MODULAR= %MODULAR% 80OPT_MODULAR= %MODULAR%