chromebook_coral: build failure
Wolfgang Wallner
wolfgang.wallner at br-automation.com
Tue Aug 4 09:59:51 CEST 2020
Hi Simon,
-----"Simon Glass" <sjg at chromium.org> schrieb: -----
> Betreff: Re: chromebook_coral: build failure
>
> Hi Wolfgang,
>
> On Fri, 31 Jul 2020 at 05:44, Wolfgang Wallner
> <wolfgang.wallner at br-automation.com> wrote:
> >
> > Hi Simon,
> >
> > while trying out your ACPI patches I tried to compile
> chromebook_coral_defconfig
> > as a reference. Building this defconfig fails for multiple
> definitions
> > of "_X86EMU_env":
> >
> > $ git checkout v2020.07
> > $ make distclean
> > $ make chromebook_coral_defconfig
> > $ make
> >
> > [...]
> > LDS u-boot.lds
> > LD u-boot
> > ld.bfd: drivers/built-in.o:(.bss._X86EMU_env+0x0): multiple
> definition of `_X86EMU_env';
> arch/x86/lib/built-in.o:(.bss._X86EMU_env+0x0): first defined here
> > make: *** [Makefile:1755: u-boot] Error 1
> >
> > A quick and dirty workaround was to drop "#define CONFIG_BIOSEMU"
> from
> > include/configs/x86-chromebook.h. With this change
> chromebook_coral_defconfig
> > compiles fine.
> >
> > Do you know what is going on here, and what might be a proper fix?
>
> I don't see that problem myself, [...]
It seems to be triggered by a change of default flags in GCC 10.
I can reliably reproduce the build error on my main machine (Arch Linux with
GCC 10), but it builds fine on a Debian 10 with GCC 8.
A colleague told me about "-fno-common", which was changed to be on by default
in GCC 10:
https://gcc.gnu.org/gcc-10/porting_to.html
I can build chromebook_coral_defconfig on my Arch with GCC 10 with:
make KCFLAGS="-fcommon"
However, I'm not sure what the initial problem is, as I don't know the relevant
code parts. Both of the following files declare a global variable
"_X86EMU_env":
drivers/bios_emulator/x86emu/sys.c
arch/x86/lib/bios.c
Should they both be part of the build for Chromebook Coral?
> [...] but I do see an ACPI compile problem
> now. that I rebase. I have added a patch for that and pushed the tree
> to u-boot-dm/coral-working
Yes, this is the reason why I wanted to compile chromebook_coral_defconfig
as a reference :) I saw the ACPI compile problem when I tried your ACPI
patches on my APL board and wanted to see whether I had broken something.
Could you please move the fix to the beginning of the part D series when you
send V2? It might make testing individual patches of that series easier if
the fix is at the beginning.
regards, Wolfgang
More information about the U-Boot
mailing list