Skip to content

Backport main-next non-clangable#1003

Closed
quaresmajose wants to merge 2 commits intofoundriesio:mainfrom
quaresmajose:main-next-backport
Closed

Backport main-next non-clangable#1003
quaresmajose wants to merge 2 commits intofoundriesio:mainfrom
quaresmajose:main-next-backport

Conversation

@quaresmajose
Copy link
Copy Markdown
Member

No description provided.

@quaresmajose
Copy link
Copy Markdown
Member Author

should unblock foundriesio/lmp-manifest#277

@quaresmajose quaresmajose changed the title Main next backport non-clangable Backport main-next non-clangable Jan 11, 2023
OBJCOPY:pn-linux-lmp-ti-staging:toolchain-clang = "${HOST_PREFIX}objcopy"
OBJCOPY:pn-linux-lmp-toradex-imx:toolchain-clang = "${HOST_PREFIX}objcopy"
OBJCOPY:pn-linux-lmp-xlnx:toolchain-clang = "${HOST_PREFIX}objcopy"
OBJCOPY:pn-linux-tegra:toolchain-clang = "${HOST_PREFIX}objcopy"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why this started to happen?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, don't know where it is been introduced but can find it locally.
On main next I think see something about this on clang layer but on this stable update this makes less sense.
Anyway it fixes the build foundriesio/lmp-manifest#284 that almost done.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'm ok merging this, I would just like to have a better understanding so we know when to revert later on.

Copy link
Copy Markdown
Member Author

@quaresmajose quaresmajose Jan 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I don't even remember what happened just to change from one branch to another.
I will find something about this clang issues to update the commit message.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems that was added in meta-clang as well:

+# Subprocess output:mips-yoe-linux-llvm-objcopy: error: Link field value 22 in section .rel.dyn is not a symbol table
+# also seen on riscv64 and x86-64
+OBJCOPY:pn-linux-yocto:toolchain-clang = "${HOST_PREFIX}objcopy"

Copy link
Copy Markdown
Contributor

@MrCry0 MrCry0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@quaresmajose with these commits we have an error like:

Command '['aarch64-lmp-linux-llvm-strip', '--remove-section=.comment', '--remove-section=.note', '.../boot/vmlinux-5.15.81-lmp-standard']' returned non-zero exit status 1.
Subprocess output:aarch64-lmp-linux-llvm-strip: error: Link field value 30 in section .rela.dyn is not a symbol table

I fixed it with the commit MrCry0@2b982d3
Testing.

But it's better to find the root cause of all these issues.

@MrCry0 MrCry0 self-requested a review January 11, 2023 21:25
@ricardosalveti
Copy link
Copy Markdown
Member

commit 299a5fd24b7bee2191127c9fef8bd39d807f3492
Author: Khem Raj <[email protected]>
Date:   Thu Dec 15 10:41:47 2022 -0800

    linux-yocto: Use binutils provided strip

    We are not _yet_ using clang as kernel compiler

    Signed-off-by: Khem Raj <[email protected]>

diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf
index f322fa1..93d5d7e 100644
--- a/conf/nonclangable.conf
+++ b/conf/nonclangable.conf
@@ -418,6 +418,7 @@ RANLIB:append:pn-tcf-agent:toolchain-clang = " $@"
 # Subprocess output:mips-yoe-linux-llvm-objcopy: error: Link field value 22 in section .rel.dyn is not a symbol table
 # also seen on riscv64 and x86-64
 OBJCOPY:pn-linux-yocto:toolchain-clang = "${HOST_PREFIX}objcopy"
+STRIP:pn-linux-yocto:toolchain-clang = "${HOST_PREFIX}strip"

 # see https://github.com/llvm/llvm-project/issues/53948
 OBJCOPY:pn-opensbi:toolchain-clang = "${HOST_PREFIX}objcopy"

@ricardosalveti
Copy link
Copy Markdown
Member

So yeah, please add the objcopy and strip changes for all kernel recipes we use (since kernel is indeed not yet using clang during build-time).

@quaresmajose
Copy link
Copy Markdown
Member Author

We have now most of the layers updated with foundriesio/lmp-manifest#287 so my next task will be update oe-core layer and find where was introduced this issues that mainly affect the clang toolchain.

@MrCry0
Copy link
Copy Markdown
Contributor

MrCry0 commented Jan 17, 2023

We have now most of the layers updated with foundriesio/lmp-manifest#287 so my next task will be update oe-core layer and find where was introduced this issues that mainly affect the clang toolchain.

@quaresmajose Ricardo found that meta-clang has a similar fix for the Linux kernel, so our fix may be acceptable:
#1003 (comment)

@quaresmajose
Copy link
Copy Markdown
Member Author

@MrCry0 we have already meta-clang updated with latest kirkstone version but this clang issues comes when we bump oe-core so the root cause is in oe-core and not in meta-clang imo

@quaresmajose
Copy link
Copy Markdown
Member Author

This are been integrated in foundriesio/lmp-manifest#287

@quaresmajose quaresmajose deleted the main-next-backport branch January 19, 2023 11:16
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