Update to use new Xargo, add netutils

This commit is contained in:
Jeremy Soller 2016-12-28 19:32:39 -07:00
parent 89581d6fea
commit ec4dc48b76
7 changed files with 16 additions and 10 deletions

3
.gitmodules vendored Normal file
View 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
View File

@ -0,0 +1,2 @@
[target.x86_64-unknown-redox.dependencies.std]
features = []

View File

@ -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

@ -0,0 +1 @@
Subproject commit b0e2a74a505d0bc6ffea05d81fe239b1beb5c246

View File

@ -0,0 +1 @@
GIT=https://github.com/redox-os/netutils.git

View File

@ -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"

View File

@ -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"
}