From 4e38e7ddf8dd021c3cd7e4609dfa01afb827797b Mon Sep 17 00:00:00 2001 From: Rob Gries Date: Fri, 2 Oct 2020 17:14:25 -0400 Subject: [PATCH 1/2] Remove rlibc and use compiler-builtins-mem feature (#865) --- .cargo/config.toml | 1 + Cargo.lock | 7 ------- Cargo.toml | 1 - src/main.rs | 2 -- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 2f9647c1..d4172593 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,6 @@ [unstable] build-std = ["core", "compiler_builtins"] +build-std-features = ["compiler-builtins-mem"] [build] target = "x86_64-blog_os.json" diff --git a/Cargo.lock b/Cargo.lock index 83e90a2c..91e1519a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,7 +5,6 @@ name = "blog_os" version = "0.1.0" dependencies = [ "bootloader", - "rlibc", ] [[package]] @@ -13,9 +12,3 @@ name = "bootloader" version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83732ad599045a978528e4311539fdcb20c30e406b66d1d08cd4089d4fc8d90f" - -[[package]] -name = "rlibc" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe" diff --git a/Cargo.toml b/Cargo.toml index 163efcd0..b5e63ce6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,4 +6,3 @@ edition = "2018" [dependencies] bootloader = "0.9.8" -rlibc = "1.0.0" diff --git a/src/main.rs b/src/main.rs index 36255956..0f0eac13 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,6 @@ #![no_std] #![no_main] -extern crate rlibc; - use core::panic::PanicInfo; static HELLO: &[u8] = b"Hello World!"; From d4e1f47e625a04cd8cd96fa1add7494273526d6a Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Fri, 2 Oct 2020 23:28:03 +0200 Subject: [PATCH 2/2] Update post-04 to use compiler_builtins `mem` feature instead of `rlibc` (#868) * Remove rlibc and use compiler-builtins-mem feature (#865) * Update post-04 to use compiler_builtins `mem` feature instead of `rlibc` Co-authored-by: Rob Gries --- .cargo/config.toml | 1 + Cargo.lock | 7 ------- Cargo.toml | 1 - src/lib.rs | 2 -- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 2f9647c1..d4172593 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,6 @@ [unstable] build-std = ["core", "compiler_builtins"] +build-std-features = ["compiler-builtins-mem"] [build] target = "x86_64-blog_os.json" diff --git a/Cargo.lock b/Cargo.lock index 0638dfbb..0524c686 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,6 @@ version = "0.1.0" dependencies = [ "bootloader", "lazy_static", - "rlibc", "spin", "uart_16550", "volatile", @@ -40,12 +39,6 @@ dependencies = [ "spin", ] -[[package]] -name = "rlibc" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe" - [[package]] name = "spin" version = "0.5.2" diff --git a/Cargo.toml b/Cargo.toml index 5cbdd6e1..47c09ed0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,6 @@ harness = false [dependencies] bootloader = "0.9.8" -rlibc = "1.0.0" volatile = "0.2.6" spin = "0.5.2" x86_64 = "0.12.1" diff --git a/src/lib.rs b/src/lib.rs index 42fc2b49..052452f9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,8 +4,6 @@ #![test_runner(crate::test_runner)] #![reexport_test_harness_main = "test_main"] -extern crate rlibc; - use core::panic::PanicInfo; pub mod serial;