-
Notifications
You must be signed in to change notification settings - Fork 214
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
add mips/mips64 compiler-rt fallbacks so that libgcc is not required #341
add mips/mips64 compiler-rt fallbacks so that libgcc is not required #341
Conversation
ea4c64f
to
cc90d0e
Compare
It looks like compiler-rt builds for mips targets were never run before. There are some build failures like this:
That is because fp_mode.c was introduced in llvm 9 (https://github.com/llvm-mirror/compiler-rt/commits/master/lib/builtins/arm/fp_mode.c) however the CI system uses llvm 8 fork https://github.com/rust-lang/llvm-project. Really like to have mips arches rolling without linking to libgcc. Not sure how to proceed now. But let me try fixing the CI error first. |
cc90d0e
to
aaca9e1
Compare
This adds compiler-rt fallbacks for mips and mips64 arches. Solves linking issues like rust-lang/rust#57820. Signed-off-by: Yuxiang Zhu <vfreex@gmail.com>
aaca9e1
to
3f012a8
Compare
I see this includes fall-backs for |
@nivkner I haven't checked aarch64 build. Would like to have them in another PR. Getting rid of libgcc/libgcc_s will make cross compiling much easier (closer to golang's cross compiling experience) |
("__fixunstfsi", "fixunstfsi.c"), | ||
("__floatunsitf", "floatunsitf.c"), | ||
("__fe_getround", "fp_mode.c"), | ||
]); |
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 list should probably contain all the tf
(long double) builtins from compiler-rt:
set(GENERIC_TF_SOURCES
comparetf2.c
extenddftf2.c
extendsftf2.c
fixtfdi.c
fixtfsi.c
fixtfti.c
fixunstfdi.c
fixunstfsi.c
fixunstfti.c
floatditf.c
floatsitf.c
floattitf.c
floatunditf.c
floatunsitf.c
floatuntitf.c
multc3.c
trunctfdf2.c
trunctfsf2.c
)
We can't implement these in Rust since Rust doesn't have a long double
type.
Since the author is inactive, I'll make the requested changes in another PR. |
I'm getting the following error in https://github.com/messense/rust-musl-cross/runs/2181084617?check_suite_focus=true
Is it resolvable by adding the missing sources like this PR does? Edit: Opened #408 |
This adds compiler-rt fallbacks for mips and mips64 arches.
Solves linking issues like rust-lang/rust#57820.
Signed-off-by: Yuxiang Zhu vfreex@gmail.com