mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-21 20:34:17 +08:00
Update to use new Xargo, add netutils
This commit is contained in:
parent
89581d6fea
commit
ec4dc48b76
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "libc-artifacts"]
|
||||
path = libc-artifacts
|
||||
url = https://github.com/redox-os/libc-artifacts.git
|
||||
2
Xargo.toml
Normal file
2
Xargo.toml
Normal file
@ -0,0 +1,2 @@
|
||||
[target.x86_64-unknown-redox.dependencies.std]
|
||||
features = []
|
||||
4
cook.sh
4
cook.sh
@ -1,9 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
export RUST_TARGET_PATH="$PWD/targets"
|
||||
export RUSTFLAGS="--cfg redox"
|
||||
export CARGOFLAGS=
|
||||
export CFLAGS="-fno-stack-protector -U_FORTIFY_SOURCE"
|
||||
TARGET=x86_64-unknown-redox
|
||||
ROOT="$PWD"
|
||||
REPO="$PWD/repo/$TARGET"
|
||||
|
||||
set -e
|
||||
@ -33,6 +34,7 @@ function op {
|
||||
;;
|
||||
build)
|
||||
pushd build > /dev/null
|
||||
cp -r "$ROOT/Xargo.toml" "$ROOT/libc-artifacts" .
|
||||
xargo build --target "$TARGET" --release $CARGOFLAGS
|
||||
popd > /dev/null
|
||||
;;
|
||||
|
||||
1
libc-artifacts
Submodule
1
libc-artifacts
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit b0e2a74a505d0bc6ffea05d81fe239b1beb5c246
|
||||
1
recipes/netutils/recipe.sh
Normal file
1
recipes/netutils/recipe.sh
Normal file
@ -0,0 +1 @@
|
||||
GIT=https://github.com/redox-os/netutils.git
|
||||
6
setup.sh
6
setup.sh
@ -12,10 +12,4 @@ then
|
||||
cargo install -f xargo
|
||||
fi
|
||||
|
||||
echo "Building libstd"
|
||||
./cook.sh libstd unfetch
|
||||
./cook.sh libstd fetch
|
||||
./cook.sh libstd build
|
||||
cp recipes/libstd/build/target/x86_64-unknown-redox/release/deps/*.rlib ~/.xargo/lib/rustlib/x86_64-unknown-redox/lib/
|
||||
|
||||
echo "cook.sh is ready to use"
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
"env": "",
|
||||
"vendor": "unknown",
|
||||
"target-family": "redox",
|
||||
"pre-link-args": ["-m64", "-nostdlib", "-static"],
|
||||
"post-link-args": [],
|
||||
"pre-link-args": ["-m64", "-Wl,--as-needed", "-Wl,-z,noexecstack", "-nostartfiles", "-nostdlib", "-static"],
|
||||
"late-link-args": ["libc-artifacts/lib/crt0.o", "libc-artifacts/lib/libm.a", "libc-artifacts/lib/libc.a", "libc-artifacts/lib/libgcc.a"],
|
||||
"features": "",
|
||||
"dynamic-linking": false,
|
||||
"executables": true,
|
||||
@ -22,5 +22,8 @@
|
||||
"no-compiler-rt": true,
|
||||
"no-default-libraries": true,
|
||||
"position-independent-executables": false,
|
||||
"has-elf-tls": true
|
||||
"lib-allocation-crate": "alloc_system",
|
||||
"exe-allocation-crate": "alloc_system",
|
||||
"has-elf-tls": true,
|
||||
"panic-strategy": "abort"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user