qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Brad Smith <brad@comstyle.com>
To: Ashley <reginod5000@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] QEMU build fails with Clang?
Date: Sat, 5 Jan 2013 22:26:23 -0500	[thread overview]
Message-ID: <20130106032623.GC14265@rox.home.comstyle.com> (raw)
In-Reply-To: <kcaqfe$oou$1@ger.gmane.org>

On Sat, Jan 05, 2013 at 07:19:11PM -0800, Ashley wrote:
> On 1/5/2013 8:51 AM, Blue Swirl wrote:
> >On Sat, Jan 5, 2013 at 1:48 AM, Brad Smith <brad@comstyle.com> wrote:
> >>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.
> >
> >>
> >>
> >>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)

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

> 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.

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

  reply	other threads:[~2013-01-06  3:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-05  1:48 [Qemu-devel] QEMU build fails with Clang? Brad Smith
2013-01-05 16:51 ` Blue Swirl
2013-01-06  3:19   ` Ashley
2013-01-06  3:26     ` Brad Smith [this message]
2013-01-06  9:40   ` Brad Smith
2013-01-06 10:26     ` Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130106032623.GC14265@rox.home.comstyle.com \
    --to=brad@comstyle.com \
    --cc=qemu-devel@nongnu.org \
    --cc=reginod5000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).