diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-01-25 19:02:58 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-01-25 19:02:58 -0800 |
commit | c598c77b838a8e84be9a683e104fbf8ac55d3cd5 (patch) | |
tree | 4f1ed1123788887379a0b64df66b1f69207c4cdd | |
parent | bbfe0a699344e53cabbda2113777804c5e42173a (diff) | |
download | riscv-tools-c598c77b838a8e84be9a683e104fbf8ac55d3cd5.zip riscv-tools-c598c77b838a8e84be9a683e104fbf8ac55d3cd5.tar.gz riscv-tools-c598c77b838a8e84be9a683e104fbf8ac55d3cd5.tar.bz2 |
update to library-based fesvr; assume $RISCV env var
-rwxr-xr-x | build-nogcc.sh | 20 | ||||
-rw-r--r-- | build.common | 40 | ||||
-rwxr-xr-x | build.sh | 80 | ||||
m--------- | riscv-fesvr | 0 | ||||
m--------- | riscv-gcc | 0 | ||||
m--------- | riscv-isa-sim | 0 | ||||
m--------- | riscv-pk | 0 |
7 files changed, 68 insertions, 72 deletions
diff --git a/build-nogcc.sh b/build-nogcc.sh new file mode 100755 index 0000000..b589bb3 --- /dev/null +++ b/build-nogcc.sh @@ -0,0 +1,20 @@ +#! /bin/bash +# +# Script to build RISC-V ISA simulator, proxy kernel, and GNU toolchain. +# Tools will be installed to $RISCV. + +. build.common + +if [ ! `which riscv-gcc` ] +then + echo "riscv-gcc doesn't appear to be installed; use the full-on build.sh" + exit 1 +fi + +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-pk --prefix=$RISCV/target --host=riscv + +echo -e "\\nRISC-V Toolchain installation completed!" diff --git a/build.common b/build.common new file mode 100644 index 0000000..50aaac0 --- /dev/null +++ b/build.common @@ -0,0 +1,40 @@ +# Script to build RISC-V ISA simulator, proxy kernel, and GNU toolchain. +# Tools will be installed to $RISCV. + +if [ "x$RISCV" = "x" ] +then + echo "Please set the RISCV environment variable to your preferred install path." + exit 1 +fi + +PATH="$RISCV/bin:$PATH" +#GCC_VERSION=`gcc -v 2>&1 | tail -1 | awk '{print $3}'` + +set -e + +function build_project { + echo + if [ -e "$1/build" ] + then + echo "Removing existing $1/build directory" + rm -rf $1/build + fi + mkdir -p $1/build + cd $1/build + echo "Configuring project $1" + ../configure $2 $3 $4 > build.log + echo "Building project $1" + make -j > build.log + echo "Installing project $1" + make install > build.log + cd - > /dev/null +} + +function build_gcc { + echo + cd riscv-gcc + echo "Building project riscv-gcc" + make clean + make newlib INSTALL_DIR=$RISCV > build.log + cd .. +} @@ -1,79 +1,15 @@ #! /bin/bash # -# script to build RISC-V ISA simulator, frontend server, proxy kernel and newlib based GNU toolchain -# NOTE: You must set INSTALL_PREFIX to the directory where you want things to be installed +# Script to build RISC-V ISA simulator, proxy kernel, and GNU toolchain. +# Tools will be installed to $RISCV. -INSTALL_PREFIX=UNCONFIGURED - -if [ "$INSTALL_PREFIX" = "UNCONFIGURED" ] -then - echo "ERROR: You must edit this script and define INSTALL_PREFIX!" - exit 1 -fi - -INSTALL_BINDIR=${INSTALL_PREFIX}/bin -PATH=$INSTALL_BINDIR:$PATH -GCC_VERSION=`gcc -v 2>&1 | tail -1 | awk '{print $3}'` - -set -e - -function build_project { - if [ -e "${PROJECT}/build" ] - then - echo "Removing existing ${PROJECT}/build directory" - rm -rf ${PROJECT}/build - fi - echo "Building project ${PROJECT}" - cd ${PROJECT} - mkdir build - cd build - ../configure --prefix=${INSTALL_PREFIX} $1 - make -j - echo "Installing project ${PROJECT}" - make install 2>&1 | tee make-install.log - cd ../.. -} +. build.common echo "Starting RISC-V Toolchain build process" -# build ISA simulator -PROJECT=riscv-isa-sim -if [ "$GCC_VERSION" == "4.4.3" ] -then - echo "Detected GCC version 4.4.3 - using GCC 4.1 instead" - export CC=gcc-4.1 - export CPP=cpp-4.1 - export CXX=g++-4.1 -fi -build_project -unset CC CPP CXX - -# build frontend server -PROJECT=riscv-fesvr -build_project - -# build GCC toolchain -cd riscv-gcc -echo "Building project riscv-gcc" -make clean -make newlib INSTALL_DIR=$INSTALL_PREFIX -cd .. - -# build proxy kernel -PROJECT=riscv-pk -build_project --host=riscv - -# rebuild ISA simulator, now it should find libraries necessary for disassembly -PROJECT=riscv-isa-sim -rm -rf ${PROJECT}/build -if [ "$GCC_VERSION" == "4.4.3" ] -then - echo "Detected GCC version 4.4.3 - using GCC 4.1 instead" - export CC=gcc-4.1 - export CPP=cpp-4.1 - export CXX=g++-4.1 -fi -build_project -unset CC CPP CXX +build_project riscv-fesvr --prefix=$RISCV +build_project riscv-isa-sim --prefix=$RISCV --with-fesvr=$RISCV +build_gcc +build_project riscv-pk --prefix=$RISCV/target --host=riscv -echo "RISC-V Toolchain installation completed!" +echo -e "\\nRISC-V Toolchain installation completed!" diff --git a/riscv-fesvr b/riscv-fesvr -Subproject dfe719726a2622e87e3d8799df249fa85529eea +Subproject 4bd2bbcdf8901ba27025c6bb62fdf1461af2d03 diff --git a/riscv-gcc b/riscv-gcc -Subproject 50c3209500d2bc4b90a84c6f4f6ee8e63ab1b63 +Subproject a160ee76b907b2130f53c9bd2a53dc77a9db0de diff --git a/riscv-isa-sim b/riscv-isa-sim -Subproject 79603491352555ab5508565845da01826cfd943 +Subproject de5b42e92377c5c8662fae095a9300162c0d95e diff --git a/riscv-pk b/riscv-pk -Subproject 6336ef155fabdd15eecf11949b7e13a49e27973 +Subproject e0e1662fc1a89c2189217e43a9364e63110c685 |