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

Aaron Durbin adurbin at google.com
Wed Apr 4 17:31:10 CEST 2018


On Wed, Apr 4, 2018 at 4:55 AM, Piotr Król <piotr.krol at 3mdeb.com> wrote:
> Hi all,
> I can't compile tianocore payload using coreboot-sdk:1.50 and coreboot 4.7.
>
> VfrUtilityLib.cpp: In member function 'CHAR8*
> CVfrStringDB::GetVarStoreNameFormStringId(EFI_STRING_ID)':
>
> VfrUtilityLib.cpp:3375:26: error: ISO C++ forbids comparison between
> pointer and integer [-fpermissive]
>    if (mStringFileName == '\0' ) {

That's just an incorrect check. i.e. bad code. Current master seems to
not have that error.

https://github.com/tianocore/edk2/blob/master/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp

FWIW, comparing a char (integer) to a pointer is indeed incorrect.

>
> 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
> problematic
> 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
>
> --
> coreboot mailing list: coreboot at coreboot.org
> https://mail.coreboot.org/mailman/listinfo/coreboot



More information about the coreboot mailing list