On Mon, 2013-04-22 at 12:36 +0000, Shalev, Tomer wrote:
> > This is not a bug. It indicates that some function declaration
> > or prototype is not using EFIAPI properly.
> Why should I build using non-ms ABI at all, if UEFI's ABI standart
> is MS-ABI?

Perhaps because the only officially supported GCC toolchain for the
latest UDK release is GCC44, and GCC 4.4 - GCC 4.4.6 does not
support -mabi=ms? (It appears it was backported in 4.4.7).

In the past I seem to remember that -mabi=ms would also produce
larger code sizes. (But, a quick test of GCC 4.7 appears this might
no longer be the case.)

> I did not want to decorate all my functions with EFIAPI,
> thus I opted for forcing MS ABI globally.

You do not need to decorate your all your functions. You need to
decorate function pointers (protocols, callbacks), library interface
functions and asm interface functions.

If you intend to contribute to EDK II, then you'll need to get
these right. If you are producing Intel reference code, I certainly
hope you will get it correct for the purposes of producing high
quality reference code.

If you really want to ignore this issue, but don't want to modify
tools_def.txt, then you might try this in your platform .dsc:

[BuildOptions]
  GCC:*_GCC46_*_CC_FLAGS = -mabi=ms

(Obviously, I don't recommend this.)

If (at some point) Intel and EDK II community decides that GCC44
is no longer relevant, and -mabi=ms can be shown to consistently
produce good code sizes, then I suppose we can change tools_def,
and thereby lose our only method of highlighting EFIAPI
inconsistencies.

Thanks,

-Jordan



------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to