1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-27 02:03:29 +04:00

Bugfix: x86_64 module compilation failure (#20)

This commit is contained in:
gjz010 2019-10-10 01:43:37 +08:00 committed by Runji Wang
parent 7e1cb319e5
commit 7f769d280a
2 changed files with 4 additions and 1 deletions

View File

@ -3,4 +3,6 @@ fn main() {
println!("cargo:rustc-link-search=all={}", path);
let path = "../../kernel/target/aarch64/release/deps";
println!("cargo:rustc-link-search=all={}", path);
let path = "../../kernel/target/release/deps";
println!("cargo:rustc-link-search=all={}", path);
}

View File

@ -31,7 +31,8 @@ rustc --edition=2018 --crate-name hello_rust src/lib.rs \
-L dependency=target/$ARCH/release/deps \
-L dependency=target/release/deps \
--emit=obj --sysroot target/sysroot \
-L all=../../kernel/target/$ARCH/release/deps
-L all=../../kernel/target/$ARCH/release/deps \
-L all=../../kernel/target/release/deps
echo "Step 3. Packing the library into kernel module."
"$PREFIX"objcopy --input binary --output $TEXT_TYPE \
--binary-architecture $BIN_ARCH\