aboutsummaryrefslogtreecommitdiff
path: root/sys/boot
diff options
context:
space:
mode:
authorYoshihiro Takahashi <nyan@FreeBSD.org>2002-05-14 12:34:03 +0000
committerYoshihiro Takahashi <nyan@FreeBSD.org>2002-05-14 12:34:03 +0000
commit8b20c954cbe7f643928b1e82f215a2e25bb2c6ef (patch)
tree42b3aee7e5bdb7fc27fc1b6922aecb47b24740f3 /sys/boot
parent629d0dd5e0cff524dd04a16bc2854cded8c9a64b (diff)
downloadsrc-8b20c954cbe7f643928b1e82f215a2e25bb2c6ef.tar.gz
src-8b20c954cbe7f643928b1e82f215a2e25bb2c6ef.zip
Fixed to build for GCC 3.1
Notes
Notes: svn path=/head/; revision=96581
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/pc98/boot2/Makefile4
-rw-r--r--sys/boot/pc98/boot2/asm.h20
-rw-r--r--sys/boot/pc98/boot2/boot.h1
-rw-r--r--sys/boot/pc98/boot2/disk.c4
-rw-r--r--sys/boot/pc98/boot2/io.c2
-rw-r--r--sys/boot/pc98/boot2/start.S2
6 files changed, 16 insertions, 17 deletions
diff --git a/sys/boot/pc98/boot2/Makefile b/sys/boot/pc98/boot2/Makefile
index 44908664535f..ed4408112d32 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 88ef59a42c58..3a08a390eb7e 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 4e32192eebc6..dbd90e40eedc 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 8899ceba612e..bcffb59f6ff6 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 294de33d1ace..2f559d042924 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 b5f11ee6893e..2a9bcbb7a1b2 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 */