On 07/23/15 12:31, Laszlo Ersek wrote:
> On 07/23/15 01:06, David Woodhouse wrote:

>> Well, why don't we just add -mabi=ms to the compiler flags? Then EFIAPI
>> in the source code could be a no-op, right?
> 
> Yes, I think EFIAPI would be a no-op then. I don't know why we don't set
> -mabi=ms globally.
> 
> Hm, wait, I do know. Because gcc-4.4 doesn't support it. See the docs:
> 
> https://gcc.gnu.org/onlinedocs/gcc-4.4.7/gcc/i386-and-x86_002d64-Options.html
> 
> The section "Intel 386 and AMD x86-64 Options" does not list "-mabi=".
> Apparently, the "-mabi=(ms|sysv)" option was introduced in gcc-4.5.
> 
> ... Hm, that might be a glitch in the gcc-4.4 documentation. I just
> checked my Fedora 13 VM (with gcc-4.4), and it does know about -mabi=ms.
> So, I don't know.

Sigh. My test was wrong. This is what I checked:

[root@edk2-gcc44-fc13 ~]# gcc -mabi=ms
gcc: no input files

That's a good result, right? Nope. Compare:

[root@edk2-gcc44-fc13 ~]# gcc -mabi=foobar
gcc: no input files

As I said, "sigh". The diagnostic output cannot be trusted here; the
results are undistinguishable between "ms" and "foobar". Compare on gcc-4.8:

$ gcc -mabi=ms
gcc: fatal error: no input files

$ gcc -mabi=foobar
gcc: error: unrecognized argument in option '-mabi=foobar'
gcc: note: valid arguments to '-mabi=' are: ms sysv

So, the documentation of gcc-4.4 is apparently correct, and -mabi is a
silently ignored switch.

Thanks
Laszlo

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to