-
Notifications
You must be signed in to change notification settings - Fork 559
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
0_RootFS: Support riscv64 #8468
Conversation
Can you please update https://github.com/JuliaPackaging/Yggdrasil/blob/master/RootFS.md? In particular the list of architectures in the first section, and the version of glibc for riscv64 in corresponding table. |
if [[ ${COMPILER_TARGET} == riscv64-* ]]; then | ||
# Explicitly disable C++ | ||
# (Disable for all architectures?) | ||
GLIBC_CONFIGURE_OVERRIDES+=( CXX=false ) | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this? What are the consequences?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this setting, glibc builds the file support/links-dso-program.cc
with a C++ compiler. There is no C++ compiler for the host architecture available, so glibc uses /usr/bin/g++
instead. This fails. If we disable C++ (/bin/false
always reports an error in the configure stage), then glibc builds a different version of that file (support/links-dso-program-c.c
) with a C compiler, and all is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file doesn't exist in the earlier glibc versions that we build for other architectures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no C++ compiler for the host architecture available
All this stuff is built with system compilers, we don't use BinayBuilder toolchains, that's the point of these (obscure) lines
Yggdrasil/0_RootFS/gcc_common.jl
Lines 31 to 32 in b196211
@eval BinaryBuilder.BinaryBuilderBase empty!(bootstrap_list) | |
@eval BinaryBuilder.BinaryBuilderBase push!(bootstrap_list, :rootfs, :platform_support) |
/usr/bin/gcc
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the C file is built with the host compiler (--target="${COMPILER_TARGET}"
). The lines you see here are only configuring glibc. glibc is built much further down (# Finish off libc
), after the first stage of GCC has been built (# Back to GCC-land, install libgcc
).
/usr/bin/gcc
would target the build system x86_64-linux-musl
, and that wouldn't work for building a glibc for riscv64
.
No description provided.