aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2016-08-30 13:05:45 -0700
committerAndrew Waterman <waterman@eecs.berkeley.edu>2016-08-30 13:05:45 -0700
commit4635ab67966c763a84f7217bc2c20b65dcabc7ec (patch)
treef7c2035a0cf3b805aa7b0b55ee0dcaab091882ec
parent816a2527a0c2181a5d2150b3412399b523afc106 (diff)
downloadriscv-tools-4635ab67966c763a84f7217bc2c20b65dcabc7ec.zip
riscv-tools-4635ab67966c763a84f7217bc2c20b65dcabc7ec.tar.gz
riscv-tools-4635ab67966c763a84f7217bc2c20b65dcabc7ec.tar.bz2
Add a "--with-xlen=*" argument to build.sh (#39)priv-1.7
A few people have run into trouble building a consistent 32-bit userspace. With any luck, this will aid them.
-rwxr-xr-xbuild.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index b79ad23..9a67525 100755
--- a/build.sh
+++ b/build.sh
@@ -3,14 +3,24 @@
# Script to build RISC-V ISA simulator, proxy kernel, and GNU toolchain.
# Tools will be installed to $RISCV.
+with_xlen=64
+while [[ "$1" != "" ]]
+do
+ case "$1" in
+ --with-xlen=*) with_xlen="$(echo "$1" | cut -d= -f2-)" ;;
+ *) echo "Unknown argument $1" >2; exit 1;;
+ esac
+ shift
+done
+
. build.common
echo "Starting RISC-V Toolchain build process"
build_project riscv-fesvr --prefix=$RISCV
build_project riscv-isa-sim --prefix=$RISCV --with-fesvr=$RISCV
-build_project riscv-gnu-toolchain --prefix=$RISCV
-CC= CXX= build_project riscv-pk --prefix=$RISCV/riscv64-unknown-elf --host=riscv64-unknown-elf
-build_project riscv-tests --prefix=$RISCV/riscv64-unknown-elf
+build_project riscv-gnu-toolchain --prefix=$RISCV --with-xlen="$with_xlen"
+CC= CXX= build_project riscv-pk --prefix=$RISCV/riscv"$with_xlen"-unknown-elf --host=riscv"$with_xlen"-unknown-elf
+build_project riscv-tests --prefix=$RISCV/riscv"$with_xlen"-unknown-elf
echo -e "\\nRISC-V Toolchain installation completed!"