diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 0000000000000000000000000000000000000000..43363244eb45346bbe20351545cda8ffc3eaad2e --- /dev/null +++ b/.cargo/config @@ -0,0 +1,6 @@ +[target.x86_64-unknown-redox] +linker = "libc-artifacts/gcc.sh" +rustflags = [ + "--verbose", + "-Z", "print-link-args" +] diff --git a/cook.sh b/cook.sh index 232a56522f27f200a9b6e257f1487e60a2e1f401..cf6b555f340b82fe4abae86facae44e82997b30d 100755 --- a/cook.sh +++ b/cook.sh @@ -1,16 +1,15 @@ #!/bin/bash -ROOT="$PWD" -export CARGOFLAGS=--verbose -export CFLAGS="-static -nostartfiles -nostdlib -nodefaultlibs \ - -undef -imacros $ROOT/libc-artifacts/define.h \ - -isystem $ROOT/libc-artifacts/usr/include \ - -L $ROOT/libc-artifacts/usr/lib \ - $ROOT/libc-artifacts/usr/lib/crt0.o -lm -lc -lgcc \ - -fno-stack-protector -U_FORTIFY_SOURCE" -export CARGO_BUILD_RUSTFLAGS="--verbose -Z print-link-args -C linker=gcc -C link-args=\"\$CFLAGS\"" +# Configuration export TARGET=x86_64-unknown-redox + +# Automatic variables +ROOT="$PWD" REPO="$ROOT/repo/$TARGET" +export CC="$ROOT/libc-artifacts/gcc.sh" + +# Variables to be overriden by recipes +export CARGOFLAGS=--verbose set -e @@ -51,13 +50,13 @@ function op { ;; build) pushd build > /dev/null - cp -r "$ROOT/Xargo.toml" "$ROOT/libc-artifacts" . + cp -r "$ROOT/Xargo.toml" "$ROOT/.cargo" "$ROOT/libc-artifacts" . xargo build --target "$TARGET" --release $CARGOFLAGS popd > /dev/null ;; test) pushd build > /dev/null - cp -r "$ROOT/Xargo.toml" "$ROOT/libc-artifacts" . + cp -r "$ROOT/Xargo.toml" "$ROOT/.cargo" "$ROOT/libc-artifacts" . xargo test --no-run --target "$TARGET" --release $CARGOFLAGS popd > /dev/null ;; @@ -81,7 +80,7 @@ function op { for bin in $bins do cp -v "$bin" "../stage/bin/$(basename $bin)" - strip -v "../stage/bin/$(basename $bin)" + #strip -v "../stage/bin/$(basename $bin)" done fi fi diff --git a/libc-artifacts b/libc-artifacts index 4bff613d3c4214ef4081427ab0a74d8f6f724935..fd716b6dc0be2755a71ad40ddb6dfce49d5ffa91 160000 --- a/libc-artifacts +++ b/libc-artifacts @@ -1 +1 @@ -Subproject commit 4bff613d3c4214ef4081427ab0a74d8f6f724935 +Subproject commit fd716b6dc0be2755a71ad40ddb6dfce49d5ffa91