On 11/16/14 00:46, Scott Duplichan wrote:
> Scott Duplichan [mailto:[email protected]] wrote:
> 
> ]Laszlo Ersek [mailto:[email protected]] wrote:
> ]
> ]Hello Laszlo,
> ]
> ]Comments below from me, but first some ranting...
> ]
> ]We must find a better way to handle the different warning settings
> ]EDK2 uses for Microsoft and EDK2. For Windows users, the problem is
> ]minimized by the availability of needed Windows hosted gcc builds
> ](as soon as the patch is accepted). For Windows, setting up EDK2+gcc
> ]is easy, even easier than for EDK2+Visual Studio. But for Linux, use
> ]of Visual Studio is essentially impossible.
> 
> Forgot to finish this part...
> 
> A way to reduce the need to test new code with both gcc and Microsoft
> compilers is to choose matching warning settings for both. A while back
> I proposed some changes to make the Microsoft warning settings more
> like those in effect for gcc. This proposal was not popular. I suppose
> that means the gcc warning settings must be changed to match Microsoft.
> This is not a perfect solution because the warning settings for gcc
> cannot be made to exactly match Microsoft. Here is the closest I can find:
>     -Wconversion -Wno-sign-conversion -pedantic -std=c99
> One problem is that existing EDK2 code cannot build with these settings.
> Changing existing working code to match these warning settings is not a
> good idea in my opinion. I don't know of a good way to make the extra
> gcc flags apply to new code only. The extra gcc flags can be added by 
> hand during development.

INF files can have [BuildOptions] sections, and you could capture
"current" gcc flags in all INF files that exist and fail to build with
the new gcc flags (that are closer to MSVC).

But I don't think it would scale in the long term; at some point you
might want to change some "orthogonal" compiler option, and that
wouldn't work if you ever had to use "==" in [BuildOptions].

A practical approach exists where the current practice of build options
can be sustained -- "give me an easy way to build my platform with your
compiler", and then I'll run into *your* build failures first, and I can
fix them preventively.

This means a build farm. I think even contributors who use Windows
exclusively would benefit from it, because you can't possibly build for
two bitnesses and five (?) VS versions on your personal workstation.

Otherwise we'll have to make do with patchsets like these.

I just wish that big code drops were build tested with at least *one*
gcc version before the initial commit. :/ Given that gcc is free (as in
beer, for this sentence), and easy to set up, as you say.

Thanks
Laszlo

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to