summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2016-10-12 00:18:01 +0200
committerRonald G. Minnich <rminnich@gmail.com>2016-10-15 00:34:27 +0200
commit3401f5a20c6918adbe97b7e9df7d5bf25583163f (patch)
tree4f3648f1d81683ab38550d86398af074756a87da
parent2f72a618f11ce9a0f5cc671c078e236ed78c8156 (diff)
RISCV: change make-spike-elf to use the coreboot toolchain.
Change-Id: I81ced8c6e02b00a3835e3b42c9cf2669b1b2bd3e Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> [jn: Added XGCC_BIN variable to avoid requiring the tools in $PATH] Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/16955 Tested-by: build bot (Jenkins)
-rwxr-xr-xutil/riscvtools/make-spike-elf.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/riscvtools/make-spike-elf.sh b/util/riscvtools/make-spike-elf.sh
index 20ae23c5a3..9632436e50 100755
--- a/util/riscvtools/make-spike-elf.sh
+++ b/util/riscvtools/make-spike-elf.sh
@@ -21,9 +21,10 @@ FLAT_FILE="$1"
OBJECT_FILE=$(mktemp /tmp/coreboot-spike.XXXXXX.o)
ELF_FILE="$2"
TOOL_PATH="$(dirname "$0")"
+XGCC_BIN="$TOOL_PATH/../crossgcc/xgcc/bin"
-riscv64-unknown-linux-gnu-objcopy -I binary -O elf64-littleriscv \
+"$XGCC_BIN/riscv64-elf-objcopy" -I binary -O elf64-littleriscv \
-B riscv "$FLAT_FILE" "$OBJECT_FILE"
-riscv64-unknown-linux-gnu-ld "$OBJECT_FILE" -T "$TOOL_PATH/spike-elf.ld" \
+"$XGCC_BIN/riscv64-elf-ld" "$OBJECT_FILE" -T "$TOOL_PATH/spike-elf.ld" \
-o "$ELF_FILE"
rm "$OBJECT_FILE"