Skip to content

Commit 51d7d25

Browse files
dianpopaacatangiu
authored andcommitted
aarch64: correctly link to the libfdt library
Signed-off-by: Diana Popa <[email protected]>
1 parent 385b2f2 commit 51d7d25

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.cargo/config

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ target = "x86_64-unknown-linux-musl"
66
# long double. Such functions are not builtin in the rust compiler, so we need to get them from libgcc.
77
# No need for the `crt_static` flag as rustc appends it by default.
88
linker = "aarch64-linux-gnu-gcc"
9-
rustflags = [ "-C", "link-arg=-lgcc" ]
9+
rustflags = [
10+
"-C", "link-arg=-lgcc",
11+
"-C", "link-arg=-lfdt",
12+
]

arch/src/aarch64/fdt.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const IRQ_TYPE_LEVEL_HI: u32 = 4;
3636
// This links to libfdt which handles the creation of the binary blob
3737
// flattened device tree (fdt) that is passed to the kernel and indicates
3838
// the hardware configuration of the machine.
39-
#[link(name = "fdt", kind = "static")]
4039
extern "C" {
4140
fn fdt_create(buf: *mut c_void, bufsize: c_int) -> c_int;
4241
fn fdt_finish_reservemap(fdt: *mut c_void) -> c_int;

0 commit comments

Comments
 (0)