[Buildroot] [PATCH 2/2 v2] linux: fix build with host-gcc 10+

Peter Korsgaard peter at korsgaard.com
Sun Feb 27 19:24:39 UTC 2022


>>>>> "Yann" == Yann E MORIN <yann.morin.1998 at free.fr> writes:

 > Some older versions of linux, 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

 > 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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e33a814e772cdc36436c8c188d8c42d019fda639

 > 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