aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Xia <rxia@sifive.com>2017-01-16 20:23:45 -0800
committerRichard Xia <rxia@sifive.com>2017-01-17 16:41:48 -0800
commit46ea20f78416b04c4bdeaa8169f72f77a027db74 (patch)
tree5a70b59fe57404a1d8894b3fa23156a32284a32c
parent80fa4bc807a33cbdd31bd1c046174ca8dd256409 (diff)
parentcd78e37f72cfc2a452a0c11744586084fbae1dcd (diff)
downloadriscv-tools-46ea20f78416b04c4bdeaa8169f72f77a027db74.zip
riscv-tools-46ea20f78416b04c4bdeaa8169f72f77a027db74.tar.gz
riscv-tools-46ea20f78416b04c4bdeaa8169f72f77a027db74.tar.bz2
Merge remote-tracking branch 'origin/master' into mmio-hackmmio-hack
-rw-r--r--.travis.yml3
-rw-r--r--README.md18
-rwxr-xr-xbuild-rv32ima.sh4
-rw-r--r--build.common26
m---------riscv-fesvr0
m---------riscv-gnu-toolchain0
m---------riscv-isa-sim0
m---------riscv-opcodes0
m---------riscv-pk0
m---------riscv-tests0
10 files changed, 19 insertions, 32 deletions
diff --git a/.travis.yml b/.travis.yml
index d216aca..dd5c935 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,6 +27,7 @@ addons:
env:
global:
- RISCV="/home/travis/riscv_install"
+ - MAKEFLAGS="-j3"
- PATH="/home/travis/riscv_install/bin:$PATH"
before_install:
@@ -38,8 +39,6 @@ before_install:
- cd ..
# actually use new gcc
- export CXX=g++-4.8 CC=gcc-4.8
- # only have 2 cores on the travis machine
- - sed -i.bak 's/JOBS=16/JOBS=8/' build.common
# extra time duing long builds
install: travis_wait
diff --git a/README.md b/README.md
index 462a3e1..efdb294 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ This repo provides guides and references:
Ubuntu packages needed:
- $ sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc
+ $ sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev
_Note:_ This requires a compiler with C++11 support (e.g. GCC >= 4.8).
@@ -30,7 +30,7 @@ To use a compiler different than the default, use:
$ CC=gcc-5 CXX=g++-5 ./build.sh
-_Note for OS X:_ We recommend using [Homebrew](http://brew.sh) to install the dependencies (`gawk gnu-sed gmp mpfr libmpc isl`) or even to install the tools [directly](https://github.com/riscv/homebrew-riscv). This repo will build with Apple's command-line developer tools (clang) in addition to gcc.
+_Note for OS X:_ We recommend using [Homebrew](http://brew.sh) to install the dependencies (`gawk gnu-sed gmp mpfr libmpc isl wget`) or even to install the tools [directly](https://github.com/riscv/homebrew-riscv). This repo will build with Apple's command-line developer tools (clang) in addition to gcc.
# <a name="newlibman"></a>The RISC-V GCC/Newlib Toolchain Installation Manual
@@ -206,12 +206,7 @@ environment variable now:
$ export PATH=$PATH:$RISCV/bin
-One more thing: If your machine doesn't have the capacity to
-handle 16 make jobs (or conversely, it can handle more), edit
-`build.common` to change the number specified by
-`JOBS`.
-
- O$ sed -i 's/JOBS=16/JOBS=[number]/' build.common
+The number of parallel compiler runs is set by `$MAKEFLAGS`.
With everything else set up, run the build script. Recall that if you're using a new-version of gcc that isn't the default on your system, you'll need to precede the `./build.sh` with `CC=gcc-4.8 CXX=g++-4.8`:
@@ -414,13 +409,6 @@ environment variable now:
$ export PATH=$PATH:$RISCV/bin
-One more thing: If your machine doesn't have the capacity to
-handle 16 make jobs (or conversely, it can handle more), edit
-`build.common` to change the number specified by
-`JOBS`.
-
- O$ sed -i 's/JOBS=16/JOBS=[number]/' build.common
-
Since we only need to build a few tools, we will use a
modified build script, listed in its entirety below. Remember that we'll build
`riscv64-unknown-linux-gnu-gcc` shortly afterwards. If you want to build the full
diff --git a/build-rv32ima.sh b/build-rv32ima.sh
index 8f75705..65e93ae 100755
--- a/build-rv32ima.sh
+++ b/build-rv32ima.sh
@@ -8,8 +8,8 @@
echo "Starting RISC-V Toolchain build process"
build_project riscv-fesvr --prefix=$RISCV
-build_project riscv-isa-sim --prefix=$RISCV --with-fesvr=$RISCV --with-isa=RV32IMA
-build_project riscv-gnu-toolchain --prefix=$RISCV --with-arch=RV32IMA
+build_project riscv-isa-sim --prefix=$RISCV --with-fesvr=$RISCV --with-isa=rv32ima
+build_project riscv-gnu-toolchain --prefix=$RISCV --with-arch=rv32ima --with-abi=ilp32
CC= CXX= build_project riscv-pk --prefix=$RISCV --host=riscv32-unknown-elf
echo -e "\\nRISC-V Toolchain installation completed!"
diff --git a/build.common b/build.common
index ec7cf11..3b6a1c4 100644
--- a/build.common
+++ b/build.common
@@ -1,8 +1,6 @@
# Script to build RISC-V ISA simulator, proxy kernel, and GNU toolchain.
# Tools will be installed to $RISCV.
-JOBS=16
-
if [ "x$RISCV" = "x" ]
then
echo "Please set the RISCV environment variable to your preferred install path."
@@ -18,19 +16,21 @@ PATH="$RISCV/bin:$PATH"
set -e
function build_project {
+ PROJECT="$1"
+ shift
echo
- if [ -e "$1/build" ]
+ if [ -e "$PROJECT/build" ]
then
- echo "Removing existing $1/build directory"
- rm -rf $1/build
+ echo "Removing existing $PROJECT/build directory"
+ rm -rf "$PROJECT/build"
fi
- mkdir -p $1/build
- cd $1/build
- echo "Configuring project $1"
- ../configure $2 $3 $4 $5 $6 > build.log
- echo "Building project $1"
- $MAKE -j$JOBS >> build.log
- echo "Installing project $1"
- $MAKE -j$JOBS install >> build.log
+ mkdir -p "$PROJECT/build"
+ cd "$PROJECT/build"
+ echo "Configuring project $PROJECT"
+ ../configure $* > build.log
+ echo "Building project $PROJECT"
+ $MAKE >> build.log
+ echo "Installing project $PROJECT"
+ $MAKE install >> build.log
cd - > /dev/null
}
diff --git a/riscv-fesvr b/riscv-fesvr
-Subproject 74b2093719e3710e604eb60bd0517af3b95a93f
+Subproject 0b85715f43196e858cc965559914efba7561f45
diff --git a/riscv-gnu-toolchain b/riscv-gnu-toolchain
-Subproject 80007506c6d284d632a08bee8526e88132ea277
+Subproject 914224e0913c9ceab49ad9531a7fedc231f65c1
diff --git a/riscv-isa-sim b/riscv-isa-sim
-Subproject 6a9fab647a98381f7f6beb9710470d0b7984b94
+Subproject 6bb4f12de3c153fb566a661d85b2cea5937bb90
diff --git a/riscv-opcodes b/riscv-opcodes
-Subproject c86d2ee8dca8fb1186f036f64b7e3a49bdfc626
+Subproject 7650b391d47dd0b73d541d39c48041aa5351797
diff --git a/riscv-pk b/riscv-pk
-Subproject f892b43a2bb1c2405b9941aaefdb25e3b4efe1f
+Subproject f6b2274af4a91763ecdb94600d7d54d5f7f262b
diff --git a/riscv-tests b/riscv-tests
-Subproject 690cd59bb28efdc4db8609b582db44497251c48
+Subproject 6a1a38d421fd3e24bdc179d58d33572636b903b