[compiler] Mark weak functions noinline
authorStefan Hajnoczi <stefanha@gmail.com>
Wed, 14 Jul 2010 07:32:48 +0000 (08:32 +0100)
committerStefan Hajnoczi <stefanha@gmail.com>
Wed, 14 Jul 2010 09:11:10 +0000 (10:11 +0100)
commit1a260f8098d01caab029564005dfc132b0dce1ff
tree039e8f4e0529cca55eb9c35c96127f51bef5ee03
parent129385afd1a47ff72b38f4bf78f5373b2d36052d
[compiler] Mark weak functions noinline

Weak functions whose visibility is hidden may be inlined due to a bug in
GCC.  Explicitly mark weak functions noinline to work around the
problem.

This makes the PXE_MENU config option work again, the PXE boot menu was
never being called because the compiler inlined a weak stub function.

The GCC bug was identified and fixed by Richard Sandiford
<rdsandiford@googlemail.com> but in the meantime gPXE needs to implement
a workaround.

Reported-by: Steve Jones <steve@squaregoldfish.co.uk>
Reported-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Suggested-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
src/include/compiler.h