Skip to contentSkip to conversation

QEMU build fails with Clang?

Qemu-devel Brad Smith 3 participants 6 messages Jan 5, 2013 – Jan 6, 2013

lore
Share & tools
lore

Brad Smith

author
#0 lore raw

Supposedly QEMU is able to build with Clang and yet trying to do so I am seeing the build fail as follows..

Comments?

gmake[1]: Entering directory `/home/brad/qemu/pc-bios/optionrom'
clang -I. -I/home/brad/qemu -I/home/brad/qemu/include -I/home/brad/qemu/libcacard -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -MMD -MP -MT multiboot.o -MF ./multiboot.d -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -c -o multiboot.o multiboot.S
multiboot.S:31:1: error: unexpected directive .code16
.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds; ^
multiboot.S:31:8: error: .code16 not supported yet

.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds;
       ^
multiboot.S:71:135: error: unknown directive
 read_fw 0x0a; mov %eax, %edi; read_fw 0x0b; mov %eax, %ecx; mov $0x12, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                      ^

multiboot.S:102:2: error: unknown directive
.dc.b 0x26,0x67,0x66,0x89,0x4f,0xfc
^
multiboot.S:130:17: error: unexpected token in argument list
data32 lgdt %gs:6

                ^
multiboot.S:138:15: error: unknown token in expression
 data32 ljmp *%gs:0
              ^
multiboot.S:152:135: error: unknown directive
 read_fw 0x07; mov %eax, %edi; read_fw 0x08; mov %eax, %ecx; mov $0x11, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                      ^

gmake[1]: *** [multiboot.o] Error 1

Signature · 3 lines
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
#1 lore raw
Quoted 4 lines · Brad Smith

Supposedly QEMU is able to build with Clang and yet trying to do so I am seeing the build fail as follows..

Comments?

Clang does not support this kind of assembly code yet. The attached patch avoids this by using 'as' and 'cpp' for .S files, please try. It could still fail if the 'as' does not come from binutils.

Quoted 25 lines

gmake[1]: Entering directory `/home/brad/qemu/pc-bios/optionrom'
clang -I. -I/home/brad/qemu -I/home/brad/qemu/include -I/home/brad/qemu/libcacard -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -MMD -MP -MT multiboot.o -MF ./multiboot.d -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -c -o multiboot.o multiboot.S
multiboot.S:31:1: error: unexpected directive .code16
.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds; ^
multiboot.S:31:8: error: .code16 not supported yet

.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds;
       ^
multiboot.S:71:135: error: unknown directive
 read_fw 0x0a; mov %eax, %edi; read_fw 0x0b; mov %eax, %ecx; mov $0x12, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                      ^

multiboot.S:102:2: error: unknown directive
.dc.b 0x26,0x67,0x66,0x89,0x4f,0xfc
^
multiboot.S:130:17: error: unexpected token in argument list
data32 lgdt %gs:6

                ^
multiboot.S:138:15: error: unknown token in expression
 data32 ljmp *%gs:0
              ^
multiboot.S:152:135: error: unknown directive
 read_fw 0x07; mov %eax, %edi; read_fw 0x08; mov %eax, %ecx; mov $0x11, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                      ^
Quoted 8 lines

gmake[1]: *** [multiboot.o] Error 1

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

From dcdd392a0341bf7ff65b114055dc221aa013fa93 Mon Sep 17 00:00:00 2001
Message-Id: <dcdd392a0341bf7ff65b114055dc221aa013fa93.1357402566.git.blauwirbel@gmail.com>
From: Blue Swirl <[email protected]>
Date: Sat, 5 Jan 2013 10:10:27 +0000
Subject: [PATCH] optionrom: build with discrete CPP and AS steps

Build option ROM .S files with separate preprocessor and assembler steps because the C compiler could be unsuitable.

---
 configure |    6 ++++++
 rules.mak |    7 +++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
configure +6 -0
index 837a84a..b17b9a2 100755
@@ -262,6 +262,8 @@ else
 fi
 
 ar="${AR-${cross_prefix}ar}"
+as="${AS-${cross_prefix}as}"
+cpp="${CPP-${cross_prefix}cpp}"
 objcopy="${OBJCOPY-${cross_prefix}objcopy}"
 ld="${LD-${cross_prefix}ld}"
 libtool="${LIBTOOL-${cross_prefix}libtool}"
@@ -3712,6 +3714,8 @@ echo "CC_I386=$cc_i386" >> $config_host_mak
 echo "HOST_CC=$host_cc" >> $config_host_mak
 echo "OBJCC=$objcc" >> $config_host_mak
 echo "AR=$ar" >> $config_host_mak
+echo "AS=$as" >> $config_host_mak
+echo "CPP=$cpp" >> $config_host_mak
 echo "OBJCOPY=$objcopy" >> $config_host_mak
 echo "LD=$ld" >> $config_host_mak
 echo "WINDRES=$windres" >> $config_host_mak
@@ -4264,6 +4268,8 @@ for rom in seabios vgabios ; do
     echo "CPP=${cross_prefix}cpp" >> $config_mak
     echo "OBJCOPY=objcopy" >> $config_mak
     echo "IASL=iasl" >> $config_mak
+    echo "AS=$as" >> $config_mak
+    echo "CPP=$cpp" >> $config_mak
     echo "LD=$ld" >> $config_mak
 done
 
rules.mak +5 -2
index 8448b94..3204f54 100644
@@ -28,8 +28,11 @@ else
 	$(call quiet-command,$(LIBTOOL) --mode=compile --quiet --tag=CC $(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  lt CC $@")
 endif
 
-%.o: %.S
-	$(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  AS    $(TARGET_DIR)$@")
+%.asm: %.S
+	$(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -o $@ $<,"  CPP    $(TARGET_DIR)$@")
+
+%.o: %.asm
+	$(call quiet-command,$(AS) $(ASFLAGS) -o $@ $<,"  AS    $(TARGET_DIR)$@")
 
 %.o: %.m
 	$(call quiet-command,$(OBJCC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  OBJC  $(TARGET_DIR)$@")
Signature · 1 line
1.7.2.5
#2 lore raw
Quoted 43 lines · Blue Swirl
Quoted 4 lines · Brad Smith

Supposedly QEMU is able to build with Clang and yet trying to do so I am seeing the build fail as follows..

Comments?

Clang does not support this kind of assembly code yet. The attached patch avoids this by using 'as' and 'cpp' for .S files, please try. It could still fail if the 'as' does not come from binutils.

Quoted 33 lines

gmake[1]: Entering directory `/home/brad/qemu/pc-bios/optionrom'
clang -I. -I/home/brad/qemu -I/home/brad/qemu/include -I/home/brad/qemu/libcacard -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -MMD -MP -MT multiboot.o -MF ./multiboot.d -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -c -o multiboot.o multiboot.S
multiboot.S:31:1: error: unexpected directive .code16
.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds; ^
multiboot.S:31:8: error: .code16 not supported yet

.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds;
        ^
multiboot.S:71:135: error: unknown directive
  read_fw 0x0a; mov %eax, %edi; read_fw 0x0b; mov %eax, %ecx; mov $0x12, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                       ^

multiboot.S:102:2: error: unknown directive
.dc.b 0x26,0x67,0x66,0x89,0x4f,0xfc
^
multiboot.S:130:17: error: unexpected token in argument list
data32 lgdt %gs:6

                 ^
multiboot.S:138:15: error: unknown token in expression
  data32 ljmp *%gs:0
               ^
multiboot.S:152:135: error: unknown directive
  read_fw 0x07; mov %eax, %edi; read_fw 0x08; mov %eax, %ecx; mov $0x11, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                       ^

gmake[1]: *** [multiboot.o] Error 1

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Have you committed this to the git? (or is the term push)

I think that might be a good idea if you haven't (or some variation of this fix) because clang is going to be the "official" C/C++ compiler in FreeBSD 10 (as I've heard).

author
#3 lore raw
Quoted 38 lines · Ashley
Quoted 37 lines · Blue Swirl
Quoted 4 lines · Brad Smith

Supposedly QEMU is able to build with Clang and yet trying to do so I am seeing the build fail as follows..

Comments?

Clang does not support this kind of assembly code yet. The attached patch avoids this by using 'as' and 'cpp' for .S files, please try. It could still fail if the 'as' does not come from binutils.

Quoted 27 lines

gmake[1]: Entering directory `/home/brad/qemu/pc-bios/optionrom'
clang -I. -I/home/brad/qemu -I/home/brad/qemu/include -I/home/brad/qemu/libcacard -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -MMD -MP -MT multiboot.o -MF ./multiboot.d -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -c -o multiboot.o multiboot.S
multiboot.S:31:1: error: unexpected directive .code16
.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds; ^
multiboot.S:31:8: error: .code16 not supported yet

.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds;
       ^
multiboot.S:71:135: error: unknown directive
 read_fw 0x0a; mov %eax, %edi; read_fw 0x0b; mov %eax, %ecx; mov $0x12, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                      ^

multiboot.S:102:2: error: unknown directive
.dc.b 0x26,0x67,0x66,0x89,0x4f,0xfc
^
multiboot.S:130:17: error: unexpected token in argument list
data32 lgdt %gs:6

                ^
multiboot.S:138:15: error: unknown token in expression
 data32 ljmp *%gs:0
              ^
multiboot.S:152:135: error: unknown directive
 read_fw 0x07; mov %eax, %edi; read_fw 0x08; mov %eax, %ecx; mov $0x11, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                      ^

gmake[1]: *** [multiboot.o] Error 1

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Have you committed this to the git? (or is the term push)

Considering I'm still building and haven't replied yet.. no.

Quoted 3 lines

I think that might be a good idea if you haven't (or some variation of this fix) because clang is going to be the "official" C/C++ compiler in FreeBSD 10 (as I've heard).

It's known as the system compiler and that is already the case. Although I'm not using FreeBSD and this is still important even if not using FreeBSD.

Signature · 3 lines
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
author
#4 lore raw
In reply to Blue Swirl
Quoted 9 lines · Blue Swirl
Quoted 4 lines · Brad Smith

Supposedly QEMU is able to build with Clang and yet trying to do so I am seeing the build fail as follows..

Comments?

Clang does not support this kind of assembly code yet. The attached patch avoids this by using 'as' and 'cpp' for .S files, please try. It could still fail if the 'as' does not come from binutils.

Could this please use $CC -E instead unless overridden? It just makes it easier if I only have to override CC and not CPP as well if using LLVM/Clang or even say another copy of GCC and have it use the appropriate C preprocessor.

BTW, there are some interesting warnings spit out while compiling with Clang and most of them look to be legit issues with the code.

QEMU builds and works fine with Clang with this patch applied.

Quoted 26 lines
Quoted 26 lines

gmake[1]: Entering directory `/home/brad/qemu/pc-bios/optionrom'
clang -I. -I/home/brad/qemu -I/home/brad/qemu/include -I/home/brad/qemu/libcacard -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -MMD -MP -MT multiboot.o -MF ./multiboot.d -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -c -o multiboot.o multiboot.S
multiboot.S:31:1: error: unexpected directive .code16
.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds; ^
multiboot.S:31:8: error: .code16 not supported yet

.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds;
       ^
multiboot.S:71:135: error: unknown directive
 read_fw 0x0a; mov %eax, %edi; read_fw 0x0b; mov %eax, %ecx; mov $0x12, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                      ^

multiboot.S:102:2: error: unknown directive
.dc.b 0x26,0x67,0x66,0x89,0x4f,0xfc
^
multiboot.S:130:17: error: unexpected token in argument list
data32 lgdt %gs:6

                ^
multiboot.S:138:15: error: unknown token in expression
 data32 ljmp *%gs:0
              ^
multiboot.S:152:135: error: unknown directive
 read_fw 0x07; mov %eax, %edi; read_fw 0x08; mov %eax, %ecx; mov $0x11, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                      ^

gmake[1]: *** [multiboot.o] Error 1

Signature · 3 lines
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
#5 lore raw
Quoted 7 lines · Brad Smith
Quoted 6 lines · Blue Swirl
Quoted 4 lines · Brad Smith

Supposedly QEMU is able to build with Clang and yet trying to do so I am seeing the build fail as follows..

Comments?

Quoted 8 lines
Quoted 3 lines

Clang does not support this kind of assembly code yet. The attached patch avoids this by using 'as' and 'cpp' for .S files, please try. It could still fail if the 'as' does not come from binutils.

Could this please use $CC -E instead unless overridden? It just makes it easier if I only have to override CC and not CPP as well if using LLVM/Clang or even say another copy of GCC and have it use the appropriate C preprocessor.

I've just posted to the list an updated version using $cc -E.

Quoted 3 lines

BTW, there are some interesting warnings spit out while compiling with Clang and most of them look to be legit issues with the code.

I'm using this to get a warning free build:
CFLAGS=-Wno-unused-value -Wno-initializer-overrides -Wno-constant-conversion -Wno-unneeded-internal-declaration

Not all warnings are very interesting to fix, for example initializer override warnings comes from somewhat useful shorthand in defining tables and the only warning from -Wconstant-conversion in ARM code looks like a bug in Clang.

But there could be additional Clang warning flags besides the defaults that could be useful to enable, using -Weverything (or what was it) produced some interesting warnings.

Quoted 35 lines

QEMU builds and works fine with Clang with this patch applied.

Quoted 18 lines
Quoted 18 lines

gmake[1]: Entering directory `/home/brad/qemu/pc-bios/optionrom'
clang -I. -I/home/brad/qemu -I/home/brad/qemu/include -I/home/brad/qemu/libcacard -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -MMD -MP -MT multiboot.o -MF ./multiboot.d -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -I/home/brad/qemu -fno-stack-protector -c -o multiboot.o multiboot.S
multiboot.S:31:1: error: unexpected directive .code16
.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds; ^
multiboot.S:31:8: error: .code16 not supported yet

.code16; .text; .global _start; _start:; .short 0xaa55; .byte (_end - _start) / 512; lret; .org 0x18; .short 0; .short _pnph; _pnph: .ascii "$PnP"; .byte 0x01; .byte ( _pnph_len / 16 ); .short 0x0000; .byte 0x00; .byte 0x00; .long 0x00000000; .short _manufacturer; .short _product; .long 0x00000000; .short 0x0000; .short 0x0000; .short _bev; .short 0x0000; .short 0x0000; .equ _pnph_len, . - _pnph; _bev:; movw %cs, %ax; movw %ax, %ds;
       ^
multiboot.S:71:135: error: unknown directive
 read_fw 0x0a; mov %eax, %edi; read_fw 0x0b; mov %eax, %ecx; mov $0x12, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                      ^

multiboot.S:102:2: error: unknown directive
.dc.b 0x26,0x67,0x66,0x89,0x4f,0xfc
^
multiboot.S:130:17: error: unexpected token in argument list
data32 lgdt %gs:6

Quoted 8 lines
Quoted 8 lines
                ^
multiboot.S:138:15: error: unknown token in expression
 data32 ljmp *%gs:0
              ^
multiboot.S:152:135: error: unknown directive
 read_fw 0x07; mov %eax, %edi; read_fw 0x08; mov %eax, %ecx; mov $0x11, %ax; mov $0x510, %edx; outw %ax, (%dx); mov $0x511, %dx; cld; .dc.b 0xf3,0x6c
                                                                                                                                      ^

gmake[1]: *** [multiboot.o] Error 1

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.