[ipxe-devel] compile fails with gcc 4.8.0

Christian Hesse list at eworm.de
Mon Apr 29 21:09:23 UTC 2013


Michael Brown <mbrown at fensystems.co.uk> on Thu, 2013/04/04 22:42:
> On 03/04/13 09:37, Christian Hesse wrote:
> > Christian Hesse<list at eworm.de>  on Tue, 2013/04/02 10:35:
> >> Hello everybody,
> >>
> >> with gcc 4.8.0 compilation fails:
> >>
> >> With   [BUILD] 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 }
> >>   ^
> >>
> >> No idea how to fix this, though.
> >
> > Oh, this has been reported before... Sorry.
> >
> > But I have a patch. Compiles and works for me [tm], hope it is correct.
> 
> Thanks.  The patch works, but it would be awesome to find a proper 
> generic solution to this issue.
> 
> The problem with adding a manual "pushl/popl %ebp" pair is twofold:
> 
> - it may add unnecessary code (if there's nothing useful currently in 
> %ebp anyway)
> 
> - it generates incorrect code if any of the asm constraints end up 
> generating memory references to local variables.  (Not applicable in 
> this case, but it's a nasty thing to have to remember for future 
> maintenance.)
> 
> I did get access to the gcc compile farm, but none of the test machines 
> therein seem to have gcc 4.8 installed!
> 
> If anyone has the time to investigate a proper solution for this, I'd be 
> very grateful.

Just an update for anybody how needs to build this with gcc 4.8...
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Chris           get my mail address:    */=0;b=c[a++];)
putchar(b-1/(/*               gcc -o sig sig.c && ./sig    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipxe_asm_v2.patch
Type: text/x-patch
Size: 1073 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20130429/5c35b169/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20130429/5c35b169/attachment.sig>


More information about the ipxe-devel mailing list