Merge pull request #341 from vfreex/add-mips-compiler-rt-fallback
add mips/mips64 compiler-rt fallbacks so that libgcc is not required
This commit is contained in:
commit
caa19a764e
|
@ -88,8 +88,8 @@ jobs:
|
||||||
- run: rustup component add llvm-tools-preview
|
- run: rustup component add llvm-tools-preview
|
||||||
- name: Download compiler-rt reference sources
|
- name: Download compiler-rt reference sources
|
||||||
run: |
|
run: |
|
||||||
curl -L -o code.tar.gz https://github.com/rust-lang/llvm-project/archive/rustc/8.0-2019-03-18.tar.gz
|
curl -L -o code.tar.gz https://github.com/rust-lang/llvm-project/archive/rustc/10.0-2020-02-05.tar.gz
|
||||||
tar xzf code.tar.gz --strip-components 1 llvm-project-rustc-8.0-2019-03-18/compiler-rt
|
tar xzf code.tar.gz --strip-components 1 llvm-project-rustc-10.0-2020-02-05/compiler-rt
|
||||||
echo "##[set-env name=RUST_COMPILER_RT_ROOT]./compiler-rt"
|
echo "##[set-env name=RUST_COMPILER_RT_ROOT]./compiler-rt"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
|
19
build.rs
19
build.rs
|
@ -421,6 +421,25 @@ mod c {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if target_arch == "mips" {
|
||||||
|
sources.extend(&[("__bswapsi2", "bswapsi2.c")]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if target_arch == "mips64" {
|
||||||
|
sources.extend(&[
|
||||||
|
("__extenddftf2", "extenddftf2.c"),
|
||||||
|
("__netf2", "comparetf2.c"),
|
||||||
|
("__addtf3", "addtf3.c"),
|
||||||
|
("__multf3", "multf3.c"),
|
||||||
|
("__subtf3", "subtf3.c"),
|
||||||
|
("__fixtfsi", "fixtfsi.c"),
|
||||||
|
("__floatsitf", "floatsitf.c"),
|
||||||
|
("__fixunstfsi", "fixunstfsi.c"),
|
||||||
|
("__floatunsitf", "floatunsitf.c"),
|
||||||
|
("__fe_getround", "fp_mode.c"),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the assembly implementations that won't compile for the target
|
// Remove the assembly implementations that won't compile for the target
|
||||||
if llvm_target[0] == "thumbv6m" || llvm_target[0] == "thumbv8m.base" {
|
if llvm_target[0] == "thumbv6m" || llvm_target[0] == "thumbv8m.base" {
|
||||||
let mut to_remove = Vec::new();
|
let mut to_remove = Vec::new();
|
||||||
|
|
Loading…
Reference in New Issue