diff options
author | nyan <nyan@FreeBSD.org> | 2002-05-14 12:34:03 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2002-05-14 12:34:03 +0000 |
commit | 4e0ba1d0e6f3418e983e80b52552d0cd201048bb (patch) | |
tree | 42b3aee7e5bdb7fc27fc1b6922aecb47b24740f3 /sys/boot/pc98 | |
parent | 15e2de7839ff141411705eb5c5939ff5bfe8f522 (diff) | |
download | FreeBSD-src-4e0ba1d0e6f3418e983e80b52552d0cd201048bb.zip FreeBSD-src-4e0ba1d0e6f3418e983e80b52552d0cd201048bb.tar.gz |
Fixed to build for GCC 3.1
Diffstat (limited to 'sys/boot/pc98')
-rw-r--r-- | sys/boot/pc98/boot2/Makefile | 4 | ||||
-rw-r--r-- | sys/boot/pc98/boot2/asm.h | 20 | ||||
-rw-r--r-- | sys/boot/pc98/boot2/boot.h | 1 | ||||
-rw-r--r-- | sys/boot/pc98/boot2/disk.c | 4 | ||||
-rw-r--r-- | sys/boot/pc98/boot2/io.c | 2 | ||||
-rw-r--r-- | sys/boot/pc98/boot2/start.S | 2 |
6 files changed, 16 insertions, 17 deletions
diff --git a/sys/boot/pc98/boot2/Makefile b/sys/boot/pc98/boot2/Makefile index 4490866..ed44081 100644 --- a/sys/boot/pc98/boot2/Makefile +++ b/sys/boot/pc98/boot2/Makefile @@ -8,9 +8,7 @@ SRCS+= probe_keyboard.c io.c disk.c sys.c BINDIR= /boot BINMODE= 444 -CFLAGS= -elf -Os -ffreestanding -fforce-addr -fdata-sections \ - -malign-functions=0 -malign-jumps=0 -malign-loops=0 \ - -mpreferred-stack-boundary=2 -mrtd \ +CFLAGS= -elf -Os -fno-guess-branch-probability -mrtd \ -D_KERNEL -DPC98 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT} CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK} CFLAGS+= ${CWARNFLAGS} diff --git a/sys/boot/pc98/boot2/asm.h b/sys/boot/pc98/boot2/asm.h index 88ef59a..3a08a39 100644 --- a/sys/boot/pc98/boot2/asm.h +++ b/sys/boot/pc98/boot2/asm.h @@ -63,7 +63,7 @@ #define INL inl (%dx) #define OUTL outl (%dx) -#else wheeze +#else /* wheeze */ #define ALIGN #define LCL(x) x @@ -74,12 +74,12 @@ #define LBb(x,n) n ## b #define LBf(x,n) n ## f -#else __STDC__ +#else /* __STDC__ */ #define EXT(x) _/**/x #define LEXT(x) _/**/x/**/: #define LBb(x,n) n/**/b #define LBf(x,n) n/**/f -#endif __STDC__ +#endif /* __STDC__ */ #define SVC .byte 0x9a; .long 0; .word 0x7 #define String .ascii @@ -92,7 +92,7 @@ #define INL inl %dx, %eax #define OUTL outl %eax, %dx -#endif wheeze +#endif /* wheeze */ #define addr32 .byte 0x67 #define data32 .byte 0x66 @@ -109,7 +109,7 @@ #define ASENTRY(x) .globl x; .align ALIGN; x ## : ; \ pushl %ebp; movl %esp, %ebp; MCOUNT; popl %ebp; -#else __STDC__ +#else /* __STDC__ */ #define MCOUNT .data; LB(x, 9): .long 0; .text; lea LBb(x, 9),%edx; call mcount #define ENTRY(x) .globl EXT(x); .align ALIGN; LEXT(x) ; \ @@ -119,8 +119,8 @@ #define ASENTRY(x) .globl x; .align ALIGN; x: ; \ pushl %ebp; movl %esp, %ebp; MCOUNT; popl %ebp; -#endif __STDC__ -#else GPROF +#endif /* __STDC__ */ +#else /* GPROF */ #ifdef __STDC__ #define MCOUNT @@ -129,7 +129,7 @@ .align ALIGN; LEXT(x) LEXT(y) #define ASENTRY(x) .globl x; .align ALIGN; x ## : -#else __STDC__ +#else /* __STDC__ */ #define MCOUNT #define ENTRY(x) .globl EXT(x); .align ALIGN; LEXT(x) @@ -137,8 +137,8 @@ .align ALIGN; LEXT(x) LEXT(y) #define ASENTRY(x) .globl x; .align ALIGN; x: -#endif __STDC__ -#endif GPROF +#endif /* __STDC__ */ +#endif /* GPROF */ #define Entry(x) .globl EXT(x); .align ALIGN; LEXT(x) #define DATA(x) .globl EXT(x); .align ALIGN; LEXT(x) diff --git a/sys/boot/pc98/boot2/boot.h b/sys/boot/pc98/boot2/boot.h index 4e32192..dbd90e4 100644 --- a/sys/boot/pc98/boot2/boot.h +++ b/sys/boot/pc98/boot2/boot.h @@ -28,6 +28,7 @@ */ #include <sys/param.h> +#include <sys/disklabel.h> #include <sys/time.h> #include <ufs/ffs/fs.h> diff --git a/sys/boot/pc98/boot2/disk.c b/sys/boot/pc98/boot2/disk.c index 8899ceb..bcffb59 100644 --- a/sys/boot/pc98/boot2/disk.c +++ b/sys/boot/pc98/boot2/disk.c @@ -95,7 +95,7 @@ devopen(void) { #ifdef EMBEDDED_DISKLABEL dl = &disklabel; -#else EMBEDDED_DISKLABEL +#else /* EMBEDDED_DISKLABEL */ #ifdef PC98 p = Bread(dosdev_copy, 1); dptr = (struct dos_partition *)p; @@ -123,7 +123,7 @@ devopen(void) dl=((struct disklabel *)p); disklabel = *dl; /* structure copy (maybe useful later)*/ #endif /* PC98 */ -#endif EMBEDDED_DISKLABEL +#endif /* EMBEDDED_DISKLABEL */ if (dl->d_magic != DISKMAGIC) { printf("bad disklabel\n"); return 1; diff --git a/sys/boot/pc98/boot2/io.c b/sys/boot/pc98/boot2/io.c index 294de33..2f559d0 100644 --- a/sys/boot/pc98/boot2/io.c +++ b/sys/boot/pc98/boot2/io.c @@ -289,7 +289,7 @@ strcasecmp(const char *s1, const char *s2) void bcopy(const void *from, void *to, size_t len) { - char *fp = (char *)from; + const char *fp = (const char *)from; char *tp = (char *)to; while (len-- > 0) diff --git a/sys/boot/pc98/boot2/start.S b/sys/boot/pc98/boot2/start.S index b5f11ee..2a9bcbb 100644 --- a/sys/boot/pc98/boot2/start.S +++ b/sys/boot/pc98/boot2/start.S @@ -450,7 +450,7 @@ one: String "1-\0" two: String "2-\0" three: String "3-\0" four: String "4-\0" -#endif DEBUG +#endif /* DEBUG */ #ifdef NAMEBLOCK_WRITEBACK ewrite: String "Write error\r\n\0" #endif /* NAMEBLOCK_WRITEBACK */ |