Please sign in to comment.
[build] Work around bug in gcc >= 4.8
gcc 4.8 and 4.9 fail to compile pxe_call.c with the error "bp cannot be used in asm here". Other points in the codebase which use "ebp" in the asm clobber list do not seem to be affected. Unfortunately gcc provides no way to specify %ebp as an output register, so we cannot use this as a workaround. The only viable solution is to explicitly push/pop %ebp within the asm itself. This is ugly for two reasons: firstly, it may be unnecessary; secondly, it may cause gcc to generate invalid %esp-relative addresses if the asm happens to use memory operands. This specific block of asm uses no memory operands and so will not generate invalid code. Reported-by: Daniel P. Berrange <email@example.com> Reported-by: Christian Hesse <firstname.lastname@example.org> Originally-fixed-by: Christian Hesse <email@example.com> Signed-off-by: Michael Brown <firstname.lastname@example.org>
- Loading branch information...
Showing with 5 additions and 3 deletions.