public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bernhard Rosenkraenzer <bero@arklinux.org>
To: Avi Kivity <avi@qumranet.com>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: 2.6.19-rc5-mm1 fails to compile with gcc 4.2
Date: Sun, 12 Nov 2006 14:36:15 +0100	[thread overview]
Message-ID: <200611121436.15492.bero@arklinux.org> (raw)
In-Reply-To: <4556E860.700@qumranet.com>

On Sunday, 12. November 2006 10:24, Avi Kivity wrote:
> >> Or better yet, preprocessed source and full gcc command line (as seen on
> >> 'make V=1').

gcc -m32 -Wp,-MD,drivers/kvm/.kvm_main.o.d  -nostdinc -isystem /usr/lib/gcc/i586-ark-linux/4.2.0/include -D__KERNEL__ -Iinclude  -include 
include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -pipe -msoft-float -mpreferred-stack-boundary=2  -march=i686 -mtune=pentium3 -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -Iinclude/asm-i386/mach-default -fomit-frame-pointer  -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign   -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(kvm_main)"  -D"KBUILD_MODNAME=KBUILD_STR(kvm)" -c -o 
drivers/kvm/.tmp_kvm_main.o drivers/kvm/kvm_main.c
drivers/kvm/kvm_main.c: In function 'kvm_dev_ioctl_run':
drivers/kvm/kvm_main.c:153: error: 'asm' operand has impossible constraints
drivers/kvm/kvm_main.c:158: error: 'asm' operand has impossible constraints

> > It does look like a gcc bug -- -O0 makes it go away.
> > Details at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29808
>
> That's a different bug, gcc generates code that the assembler can't
> handle.  Might be an assembler bug.

It's the same thing, the code is taken from kvm_main.c:

static void load_fs(u16 sel)
{
        asm ("mov %0, %%fs" : : "g"(sel));	<--- line 153
}

static void load_gs(u16 sel)
{
        asm ("mov %0, %%gs" : : "g"(sel));	<--- line 158
}


> Can you compile it with -S and post the generated assembly?

It can't generate assembly with asm() constructs it perceives as invalid -- -S 
produces the same error.

  reply	other threads:[~2006-11-12 13:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-11 22:34 2.6.19-rc5-mm1 fails to compile with gcc 4.2 Bernhard Rosenkraenzer
2006-11-12  8:22 ` Avi Kivity
2006-11-12  9:05   ` Bernhard Rosenkraenzer
2006-11-12  9:24     ` Avi Kivity
2006-11-12 13:36       ` Bernhard Rosenkraenzer [this message]
2006-11-12 13:43         ` Avi Kivity
2006-11-12 13:50           ` Bernhard Rosenkraenzer
2006-11-12 13:55             ` Avi Kivity
2006-11-12 14:13           ` Segher Boessenkool
2006-11-12 14:10         ` Segher Boessenkool
2006-11-12 11:17     ` Segher Boessenkool
2006-11-12 13:43   ` Bernhard Rosenkraenzer
2006-11-12 13:50     ` Avi Kivity

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=200611121436.15492.bero@arklinux.org \
    --to=bero@arklinux.org \
    --cc=akpm@osdl.org \
    --cc=avi@qumranet.com \
    --cc=linux-kernel@vger.kernel.org \
    /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