[ipxe-devel] iPXE build failure on Fedora 19 (rawhide)

Daniel P. Berrange berrange at redhat.com
Fri Feb 22 15:40:53 UTC 2013


Building on Fedora 19 rawhide, which has latest gcc 4.8.0 I'm seeing the
following failure on the pxe_call.c file:


  gcc  -DARCH=i386 -DPLATFORM=pcbios -march=i386 -fomit-frame-pointer -fstrength-reduce -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mpreferred-stack-boundary=2 -mregparm=3 -mrtd -freg-struct-return -m32 -fshort-wchar -Ui386 -Ulinux -DNVALGRIND -Iinclude -I. -Iarch/x86/include -Iarch/i386/include -Iarch/i386/include/pcbios -Os -g -ffreestanding -Wall -W -Wformat-nonliteral   -fno-stack-protector  -fno-dwarf2-cfi-asm -fno-exceptions  -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-address  -ffunction-sections -fdata-sections -include compiler.h   -DOBJECT=pxe_call -c arch/i386/interface/pxe/pxe_call.c -o bin/pxe_call.o 
  arch/i386/interface/pxe/pxe_call.c: In function 'pxe_start_nbp':
  arch/i386/interface/pxe/pxe_call.c:284:1: error: bp cannot be used in asm here
   }
   ^
  make: *** [bin/pxe_call.o] Error 1


That's the following function code:

int pxe_start_nbp ( void ) {
        int jmp;
        int discard_b, discard_c, discard_d, discard_D;
        uint16_t rc;

        /* Allow restarting NBP via PXENV_RESTART_TFTP */
        jmp = rmsetjmp ( pxe_restart_nbp );
        if ( jmp )
                DBG ( "Restarting NBP (%x)\n", jmp );

        /* Far call to PXE NBP */
        __asm__ __volatile__ ( REAL_CODE ( "movw %%cx, %%es\n\t"
                                           "pushw %%es\n\t"
                                           "pushw %%di\n\t"
                                           "sti\n\t"
                                           "lcall $0, $0x7c00\n\t"
                                           "addw $4, %%sp\n\t" )
                               : "=a" ( rc ), "=b" ( discard_b ),
                                 "=c" ( discard_c ), "=d" ( discard_d ),
                                 "=D" ( discard_D )
                               : "a" ( 0 ), "b" ( __from_text16 ( &pxenv ) ),
                                 "c" ( rm_cs ),
                                 "d" ( virt_to_phys ( &pxenv ) ),
                                 "D" ( __from_text16 ( &ppxe ) )
                               : "esi", "ebp", "memory" );

        return rc;
}


asm isn't my strong field, so anyone know if this is a valid ipxe bug, or
a mistaken report from newest gcc ?

NB, this is a git snapshot from 20130103, change #717279a. I've not tested
latest git yet, but don't see any changes to pxe_call.c that would make
me think it would succeed.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



More information about the ipxe-devel mailing list