[lkml]   [2006]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 2.6.19-rc5-mm1 fails to compile with gcc 4.2
    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
    > 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.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-11-12 14:41    [W:0.020 / U:0.052 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site