Skip to content

Add downstream patch to fix compiling error#6

Merged
masneyb merged 1 commit into
masneyb:masterfrom
nfraprado:downstream-dtc
Nov 18, 2020
Merged

Add downstream patch to fix compiling error#6
masneyb merged 1 commit into
masneyb:masterfrom
nfraprado:downstream-dtc

Conversation

@nfraprado
Copy link
Copy Markdown
Contributor

The following error occurs when compiling the downstream kernel:

  HOSTLD  scripts/dtc/dtc
/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x50): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:127: scripts/dtc/dtc] Error 1
make[1]: *** [scripts/Makefile.build:443: scripts/dtc] Error 2

While building the dtc, the host ld is used, so the CROSS_COMPILE path doesn't matter. Perhaps the ld version I'm using caused that to be an issue.

This patch fixed it for me and the downstream kernel is now running succesfully.

Tested on Arch Linux with kernel 5.9.3, GCC 10.2.0 and GNU ld (binutils)
2.35.1.

@z3ntu
Copy link
Copy Markdown

z3ntu commented Nov 5, 2020

In the postmarketOS repos we have this patch for < v4.2 kernels which also adjusts the dtc-lexer.lex.c_shipped: https://gitlab.com/postmarketOS/pmaports/-/blob/master/device/.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch

@masneyb masneyb merged commit 6d2ee70 into masneyb:master Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants