[coreboot] Problem with tianocore compilation in coreboot-sdk:1.50

Piotr Król piotr.krol at 3mdeb.com
Wed Apr 4 13:55:16 CEST 2018

Hi all,
I can't compile tianocore payload using coreboot-sdk:1.50 and coreboot 4.7.

VfrUtilityLib.cpp: In member function 'CHAR8*

VfrUtilityLib.cpp:3375:26: error: ISO C++ forbids comparison between
pointer and integer [-fpermissive]
   if (mStringFileName == '\0' ) {

I think this is not a single issue. Key problem is that tianocore do not
support modern toolchains - it requires GCC5. I have no problem when
compiling with 3mdeb/edk2-docker container which use GCC5.

I can workaround that problem by including payload as elf file, but if
we have integration we should make sure it works.

I'm not sure how coexistence of 3 toolchain should be solved to serve
stable build environment. In coreboot-sdk we have 2 toolchains native
Debian GCC7.2 and coreboot toolchain GCC6.3.

If we want stable build environment for tianocore payload we should have
3rd - GCC5.

Options to solve that problem:
1. Add another toolchain, which would be selected somehow through
Makefile logic when tianocore payload selected
2. Add patches in coreboot to support GCC7 or GCC6 - this may cause
unexpected behavior and maintaining this support out of edk2 can be
3. Add patches in edk2 to support GCC7 or GCC6 - I think this is long
and hard road
4. Any other that I'm missing ?

In light of coreboot-sdk I have one question that bugs me for long time.
Why we use Debian sid? Each build using moving target can be different
what means it is hard to build 2 the same coreboot-sdk containers.

Best Regards,
Piotr Król
Embedded Systems Consultant
http://3mdeb.com | @3mdeb_com

More information about the coreboot mailing list