aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2018-09-07 13:30:32 -0700
committerGitHub <noreply@github.com>2018-09-07 13:30:32 -0700
commit1a64970db9a4673a55238934f63fc29d7f4e5ed2 (patch)
tree766bd597ea861b5814c873ea6779c9fbc71d5401
parent309be117a0d0846aeaef37b2426561135e0abc6d (diff)
parent9f737e46823e1f8b25ede7a18017d9eb09cb5b73 (diff)
downloadriscv-tools-1a64970db9a4673a55238934f63fc29d7f4e5ed2.zip
riscv-tools-1a64970db9a4673a55238934f63fc29d7f4e5ed2.tar.gz
riscv-tools-1a64970db9a4673a55238934f63fc29d7f4e5ed2.tar.bz2
Merge pull request #241 from riscv/autotools_version
Check autotools/automake version for OpenOCD build
-rwxr-xr-xbuild.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 556bf1f..4fa357e 100755
--- a/build.sh
+++ b/build.sh
@@ -7,7 +7,17 @@
echo "Starting RISC-V Toolchain build process"
+check_version() {
+ $1 --version | awk "NR==1 {if (\$NF>$2) {exit 0} exit 1}" || (
+ echo $3 requires at least version $2 of $1. Aborting.
+ exit 1
+ )
+}
+
+check_version automake 1.14 "OpenOCD build"
+check_version autoconf 2.64 "OpenOCD build"
build_project riscv-openocd --prefix=$RISCV --enable-remote-bitbang --enable-jtag_vpi --disable-werror
+
build_project riscv-fesvr --prefix=$RISCV
build_project riscv-isa-sim --prefix=$RISCV --with-fesvr=$RISCV
build_project riscv-gnu-toolchain --prefix=$RISCV