Skip to content

Commit da9661a

Browse files
fix(host-rust): make it build
Signed-off-by: Anhad Singh <[email protected]>
1 parent dd504ba commit da9661a

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

host-recipes/rust

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
name=rust
22
revision=1
33
from_source=rust-host
4-
hostdeps="llvm gcc"
4+
hostdeps="llvm gcc rust-libc"
55
source_deps="rust-libc"
66
imagedeps="python git wget gcc"
77
allow_network="yes"
88

9-
#unset CARGO_HOME
10-
119
build() {
1210
# Rust memes.
13-
# cp -rp "${source_dir}/." ./
11+
cp -rp "${source_dir}/." ./
1412

15-
./x.py build --stage 2 -j${parallelism}
13+
CARGO_HOME=/tmp/cargo ./x.py build --stage 2 -j${parallelism}
1614
}
1715

1816
package() {
19-
DESTDIR="${dest_dir}" ./x.py install -j${parallelism}
17+
CARGO_HOME=/tmp/cargo DESTDIR="${dest_dir}" ./x.py install -j${parallelism}
2018

2119
find ${dest_dir} -name "*.old" -delete
2220

host-recipes/rust-libc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name=rust-libc
2+
from_source=rust-libc
3+
revision=1

source-recipes/rust-libc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name=rust-libc
22
version=fe4e9cda46b0be8421b0f56df0b63b8c4dcaf5e6
33
tarball_url="https://github.com/Andy-Python-Programmer/libc/archive/${version}.tar.gz"
4-
tarball_blake2b="xadfdf"
4+
tarball_blake2b="7a97d83784dfb6cdfd189d880f367facd2e06e43468248b41aa0239d3043172dfb508eca0209a7adb0ec12fda06887bfbdc37f41ebcb65b1a48967754c940b8f"

src/aero_kernel/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ pub fn relocate_self() {
133133
for section in kernel_elf.section_iter() {
134134
if let Ok(SectionData::Rela64(rela)) = section.get_data(kernel_elf) {
135135
for item in rela {
136-
if !item.get_type() == STT_GNU_IFUNC {
136+
if item.get_type() != STT_GNU_IFUNC {
137137
continue;
138138
}
139139

0 commit comments

Comments
 (0)