Skip to content

Commit 01157e6

Browse files
committed
Link openlibm only in libstd
1 parent 86f85c1 commit 01157e6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/librustc_back/target/redox_base.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ pub fn opts() -> TargetOptions {
3333
// Static link
3434
"-static".to_string()
3535
],
36-
late_link_args: vec![
37-
// Link to openlibm for math functions
38-
"-lopenlibm".to_string()
39-
],
4036
executables: true,
4137
relocation_model: "static".to_string(),
4238
disable_redzone: true,

src/libstd/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ fn main() {
6262
println!("cargo:rustc-link-lib=magenta");
6363
println!("cargo:rustc-link-lib=mxio");
6464
println!("cargo:rustc-link-lib=launchpad"); // for std::process
65+
} else if target.contains("redox") {
66+
println!("cargo:rustc-link-lib=openlibm");
6567
}
6668
}
6769

0 commit comments

Comments
 (0)