Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue while building opensbi with clang #690

Open
vaibhavvivekdeshpande opened this issue Nov 14, 2022 · 2 comments
Open

Issue while building opensbi with clang #690

vaibhavvivekdeshpande opened this issue Nov 14, 2022 · 2 comments
Labels

Comments

@vaibhavvivekdeshpande
Copy link

Facing issue while building opensbi with clang from kirkstone branch.
Please see below error logs

Log data follows:
| DEBUG: Executing python function externalsrc_compile_prefunc
| NOTE: opensbi: compiling from external source tree /home/vaibhav/clang/build/../source/opensbi
| DEBUG: Python function externalsrc_compile_prefunc finished
| DEBUG: Executing python function autotools_aclocals
| DEBUG: SITE files ['endian-little', 'bit-64', 'riscv-common', 'common-linux', 'common-glibc', 'riscv64-linux', 'riscv64-linux', 'common']
| DEBUG: Python function autotools_aclocals finished
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8 PLATFORM=generic I=/home/vaibhav/clang/build/tmp-glibc/work/riscv64-oe-linux/opensbi/1.0-r0/image FW_PIC=y FW_OPTIONS=0x0 -C /home/vaibhav/clang/build/../source/opensbi FW_PAYLOAD_PATH=/home/vaibhav/clang/build/tmp-glibc/deploy/images/qemuriscv64/Image-qemuriscv64.bin
| make: Entering directory '/home/vaibhav/clang/source/opensbi'
| ELF platform/generic/firmware/payloads/test.elf
| /home/vaibhav/clang/build/tmp-glibc/hosttools/ld.bfd: cannot represent machine `riscv'
| clang-14: error: ld.lld command failed with exit code 1 (use -v to see invocation)
| ERROR: oe_runmake failed
| make: Leaving directory '/home/vaibhav/clang/source/opensbi'
| WARNING: exit code 1 from a shell command.

Thank you

@kraj
Copy link
Owner

kraj commented Nov 14, 2022

@vaibhavvivekdeshpande it seems to be not finding cross-linker and then defaulting to what it finds in path which is ld.bfd from hosttools. Looking at the opensbi recipe it uses

EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n CLANG_TARGET= "

so perhaps try to match these options and see if they match.

@kraj
Copy link
Owner

kraj commented Mar 30, 2023

is this still an issue with latest master

@kraj kraj added the feedback label Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants