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

litex_setup: fix software build when liteeth or/and litesata is set (riscv toolchain issue) #1738

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

trabucayre
Copy link
Collaborator

Starting with ubuntu 22.04, when a target is configured with ethernet and/or sata the sofware build fails with:

/usr/lib/gcc-cross/riscv64-linux-gnu/12/../../../../riscv64-linux-gnu/bin/ld: ../libc/libc.a(libc_ssp_chk_fail.c.o): in function `__chk_fail':
/somewhere/litex-boards/litex_boards/targets/build/digilent_arty/software/libc/../../../../../../../pythondata-software-picolibc/pythondata_software_picolibc/data/newlib/libc/ssp/chk_fail.c:13: undefined reference to `write'
collect2: error: ld returned 1 exit status
make: *** [/somewhere/litex/litex/soc/software/bios/Makefile:72: bios.elf] Error 1

By switching to gcc-riscv64-unknown-elf (bare-metal toolchain) build end successfully
Fix:

@enjoy-digital enjoy-digital merged commit b8dc1b7 into enjoy-digital:master Jul 31, 2023
1 check passed
@enjoy-digital
Copy link
Owner

Thanks @trabucayre!

@jevinskie
Copy link
Collaborator

Just FYI if we wanted to consolidate on the same RISC-V toolchain for every host we might be able to use these prebuilds. After looking around for a bit this packaging project seems to be the most similar to other high-quality “universal” crosstool builds like Linaro’s Arm cross-compiler releases.

@trabucayre trabucayre deleted the fix_toolchain branch October 17, 2023 11:52
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