Skip to content

Commit 1eb6c44

Browse files
committed
Remove start functions, use newlib instead of openlibm + ralloc
1 parent e7b006d commit 1eb6c44

File tree

10 files changed

+6
-167
lines changed

10 files changed

+6
-167
lines changed

src/librustc_back/target/redox_base.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,22 @@ pub fn opts() -> TargetOptions {
2727
// Always enable NX protection when it is available
2828
"-Wl,-z,noexecstack".to_string(),
2929

30-
// Do not link libc
31-
"-nostdlib".to_string(),
32-
3330
// Static link
3431
"-static".to_string()
3532
],
33+
late_link_args: vec![
34+
"-lc".to_string(),
35+
"-lm".to_string()
36+
],
3637
executables: true,
3738
relocation_model: "static".to_string(),
3839
disable_redzone: true,
3940
eliminate_frame_pointer: false,
4041
target_family: Some("redox".to_string()),
4142
linker_is_gnu: true,
4243
no_default_libraries: true,
43-
lib_allocation_crate: "ralloc".to_string(),
44-
exe_allocation_crate: "ralloc".to_string(),
44+
lib_allocation_crate: "alloc_system".to_string(),
45+
exe_allocation_crate: "alloc_system".to_string(),
4546
has_elf_tls: true,
4647
panic_strategy: PanicStrategy::Abort,
4748
.. Default::default()

src/libstd/build.rs

-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ 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");
6765
}
6866
}
6967

src/libstd/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@
299299
#![feature(unwind_attributes)]
300300
#![feature(vec_push_all)]
301301
#![feature(zero_one)]
302-
#![cfg_attr(target_os = "redox", feature(naked_functions))]
303302
#![cfg_attr(test, feature(update_panic_count))]
304303

305304
// Explicitly import the prelude. The compiler uses this same unstable attribute

src/libstd/rt.rs

-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
// Reexport some of our utilities which are expected by other crates.
2626
pub use panicking::{begin_panic, begin_panic_fmt, update_panic_count};
2727

28-
// Reexport the start module on platforms that provide it
29-
#[unstable(feature = "sys_rt", issue="0")]
30-
pub use sys::rt::*;
31-
3228
#[cfg(not(test))]
3329
#[lang = "start"]
3430
fn lang_start(main: *const u8, argc: isize, argv: *const *const u8) -> isize {

src/libstd/sys/redox/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ pub mod path;
3030
pub mod pipe;
3131
pub mod process;
3232
pub mod rand;
33-
pub mod rt;
3433
pub mod rwlock;
3534
pub mod stack_overflow;
3635
pub mod stdio;

src/libstd/sys/redox/rt.rs

-130
This file was deleted.

src/libstd/sys/unix/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ pub mod path;
5050
pub mod pipe;
5151
pub mod process;
5252
pub mod rand;
53-
pub mod rt;
5453
pub mod rwlock;
5554
pub mod stack_overflow;
5655
pub mod thread;

src/libstd/sys/unix/rt.rs

-11
This file was deleted.

src/libstd/sys/windows/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ pub mod path;
3636
pub mod pipe;
3737
pub mod process;
3838
pub mod rand;
39-
pub mod rt;
4039
pub mod rwlock;
4140
pub mod stack_overflow;
4241
pub mod thread;

src/libstd/sys/windows/rt.rs

-11
This file was deleted.

0 commit comments

Comments
 (0)