From 00777861a13574bd8ed58a832b8b3bf48eacf060 Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Fri, 9 Jan 2004 16:50:31 +0000 Subject: fix build for gcc3. --- sys/arch/macppc/stand/Locore.c | 62 ++++++++++++++++++-------------------- sys/arch/macppc/stand/Makefile.inc | 3 +- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/sys/arch/macppc/stand/Locore.c b/sys/arch/macppc/stand/Locore.c index 40ddebf2d4a..c51ade28cbc 100644 --- a/sys/arch/macppc/stand/Locore.c +++ b/sys/arch/macppc/stand/Locore.c @@ -1,4 +1,4 @@ -/* $OpenBSD: Locore.c,v 1.8 2003/10/16 04:30:09 drahn Exp $ */ +/* $OpenBSD: Locore.c,v 1.9 2004/01/09 16:50:30 drahn Exp $ */ /* $NetBSD: Locore.c,v 1.1 1997/04/16 20:29:11 thorpej Exp $ */ /* @@ -46,37 +46,35 @@ static void setup(void); #ifdef XCOFF_GLUE asm (".text; .globl _entry; _entry: .long _start,0,0"); #endif -asm(" - .text - .globl bat_init -bat_init: - - mfmsr 8 - li 0,0 - mtmsr 0 - isync - - mtibatu 0,0 - mtibatu 1,0 - mtibatu 2,0 - mtibatu 3,0 - mtdbatu 0,0 - mtdbatu 1,0 - mtdbatu 2,0 - mtdbatu 3,0 - - li 9,0x12 /* BATL(0, BAT_M, BAT_PP_RW) */ - mtibatl 0,9 - mtdbatl 0,9 - li 9,0x1ffe /* BATU(0, BAT_BL_256M, BAT_Vs) */ - mtibatu 0,9 - mtdbatu 0,9 - isync - - mtmsr 8 - isync - blr -"); +asm(" .text \n" +" .globl bat_init \n" +"bat_init: \n" +" \n" +" mfmsr 8 \n" +" li 0,0 \n" +" mtmsr 0 \n" +" isync \n" +" \n" +" mtibatu 0,0 \n" +" mtibatu 1,0 \n" +" mtibatu 2,0 \n" +" mtibatu 3,0 \n" +" mtdbatu 0,0 \n" +" mtdbatu 1,0 \n" +" mtdbatu 2,0 \n" +" mtdbatu 3,0 \n" +" \n" +" li 9,0x12 \n" /* BATL(0, BAT_M, BAT_PP_RW) */ +" mtibatl 0,9 \n" +" mtdbatl 0,9 \n" +" li 9,0x1ffe \n" /* BATU(0, BAT_BL_256M, BAT_Vs) */ +" mtibatu 0,9 \n" +" mtdbatu 0,9 \n" +" isync \n" +" \n" +" mtmsr 8 \n" +" isync \n" +" blr \n"); __dead void _start(void *vpd, int res, int (*openfirm)(void *), char *arg, int argl) diff --git a/sys/arch/macppc/stand/Makefile.inc b/sys/arch/macppc/stand/Makefile.inc index df2635a710d..112d4bb0d15 100644 --- a/sys/arch/macppc/stand/Makefile.inc +++ b/sys/arch/macppc/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.3 2002/12/02 09:00:24 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.4 2004/01/09 16:50:30 drahn Exp $ # $NetBSD: Makefile.inc,v 1.1 1996/09/30 16:34:59 ws Exp $ .if !defined(__stand_makefile_inc) @@ -23,6 +23,7 @@ INCLUDES+= -I$(S)/lib/libsa DEFS+= -DSTANDALONE -DFIREPOWERBUGS CFLAGS+= $(INCLUDES) $(DEFS) $(EXTRACFLAGS) CFLAGS+= -fno-stack-protector +CFLAGS+= -fno-builtin-vprintf -fno-builtin-printf -fno-builtin-putchar LDFLAGS?= -X -N -Ttext $(RELOC) -e $(ENTRY) cleandir: -- cgit v1.2.3