[Buildroot] [PATCH 1/2 v2] boot/uboot: fix build with host-gcc 10+
Peter Korsgaard
peter at korsgaard.com
Sun Feb 27 19:24:33 UTC 2022
>>>>> "Yann" == Yann E MORIN <yann.morin.1998 at free.fr> writes:
> Some older versions of U-Boot, or custom versions (like forks for some
> boards), fail to build with host-gcc 10+, because of redefined symbols:
> HOSTLD scripts/dtc/dtc
> /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition
> of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
> collect2: error: ld returned 1 exit status
> make[4]: *** [scripts/Makefile.host:106: scripts/dtc/dtc] E
> Since this has been fixed in recent-ish versions, we can't use an
> unconditionaly patch, so we must have a conditional patch. However, a
> patch may not always apply to arbitrary U-Boot versions or forks.
> Upstream just dropped that line altogether:
> https://source.denx.de/u-boot/u-boot/-/commit/018921ee79d3f30893614b3b2b63b588d8544f73
> So, we use a little sed-grep combo to do the exact same change.
> Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
> ---
> Changes v1 -> v2:
> - don't fail if no file to fix: use 'grep -Z |xargs -0 -r' (Arnout)
Committed to 2021.02.x and 2021.11.x, thanks.
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list