From 558920f554f288fd1ea80ec76ccb31a5527926e4 Mon Sep 17 00:00:00 2001 From: jake Date: Thu, 27 Feb 2003 23:02:22 +0000 Subject: [PATCH] - Removed various cruft from before we had a hosted toolchain (!). - Moved special compiler flags to bsd.kern.mk so they get used for modules too. --- share/mk/bsd.kern.mk | 9 +++++++++ sys/conf/Makefile.sparc64 | 15 --------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/share/mk/bsd.kern.mk b/share/mk/bsd.kern.mk index 214ef1a6c328..602fab487c90 100644 --- a/share/mk/bsd.kern.mk +++ b/share/mk/bsd.kern.mk @@ -43,6 +43,15 @@ CFLAGS+= -mno-fp-regs -ffixed-8 -Wa,-mev6 CFLAGS+= -ffixed-r13 -mfixed-range=f32-f127 -mno-sdata .endif +# +# For sparc64 we want medlow code model, and we tell gcc to use floating +# point emulation. This avoids using floating point registers for integer +# operations which it has a tendency to do. +# +.if ${MACHINE_ARCH} == "sparc64" +CFLAGS+= -mcmodel=medlow -msoft-float +.endif + # # GCC 3.0 and above like to do certain optimizations based on the # assumption that the program is linked against libc. Stop this. diff --git a/sys/conf/Makefile.sparc64 b/sys/conf/Makefile.sparc64 index 49140dc161e7..719e9ce46f4b 100644 --- a/sys/conf/Makefile.sparc64 +++ b/sys/conf/Makefile.sparc64 @@ -16,17 +16,11 @@ # after which config should be rerun for all machines. # -CWARNFLAGS= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ - -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - -ansi - # Which version of config(8) is required. %VERSREQ= 500011 STD8X16FONT?= iso -HACK_EXTRA_FLAGS=-Wl,-shared - .if !defined(S) .if exists(./@/.) S= ./@ @@ -36,9 +30,6 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -# XXX: this should probably go somewhere else -COPTS+= -mcmodel=medlow -msoft-float - SYSTEM_SFILES= $S/$M/$M/locore.S $S/$M/$M/exception.S $S/$M/$M/interrupt.S SYSTEM_OBJS= locore.o exception.o interrupt.o vnode_if.o ${OBJS} hints.o \ env.o config.o hack.So majors.o @@ -55,12 +46,6 @@ SYSTEM_OBJS= locore.o exception.o interrupt.o vnode_if.o ${OBJS} hints.o \ %CLEAN -#lint: /tmp -# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \ -# $S/$M/$M/Locore.c ${CFILES} | \ -# grep -v 'struct/union .* never defined' | \ -# grep -v 'possible pointer alignment problem' - exception.o: $S/$M/$M/exception.S assym.s ${NORMAL_S}