Skip to content
Snippets Groups Projects
Commit 0192461e authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Fix gcc

parent 2f600514
No related branches found
No related tags found
No related merge requests found
[target.x86_64-unknown-redox]
linker = "libc-artifacts/gcc.sh"
rustflags = [
"--verbose",
"-Z", "print-link-args"
]
#!/bin/bash #!/bin/bash
ROOT="$PWD" # Configuration
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\""
export TARGET=x86_64-unknown-redox export TARGET=x86_64-unknown-redox
# Automatic variables
ROOT="$PWD"
REPO="$ROOT/repo/$TARGET" REPO="$ROOT/repo/$TARGET"
export CC="$ROOT/libc-artifacts/gcc.sh"
# Variables to be overriden by recipes
export CARGOFLAGS=--verbose
set -e set -e
...@@ -51,13 +50,13 @@ function op { ...@@ -51,13 +50,13 @@ function op {
;; ;;
build) build)
pushd build > /dev/null 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 xargo build --target "$TARGET" --release $CARGOFLAGS
popd > /dev/null popd > /dev/null
;; ;;
test) test)
pushd build > /dev/null 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 xargo test --no-run --target "$TARGET" --release $CARGOFLAGS
popd > /dev/null popd > /dev/null
;; ;;
...@@ -81,7 +80,7 @@ function op { ...@@ -81,7 +80,7 @@ function op {
for bin in $bins for bin in $bins
do do
cp -v "$bin" "../stage/bin/$(basename $bin)" cp -v "$bin" "../stage/bin/$(basename $bin)"
strip -v "../stage/bin/$(basename $bin)" #strip -v "../stage/bin/$(basename $bin)"
done done
fi fi
fi fi
......
Subproject commit 4bff613d3c4214ef4081427ab0a74d8f6f724935 Subproject commit fd716b6dc0be2755a71ad40ddb6dfce49d5ffa91
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment