11#! /bin/bash -e
22
3+ # ################################################################################
4+ # This bash script downloads and builds Protobuf, Clang/LLVM, GDB (optional), #
5+ # builds and installs ICSC, runs ICSCS examples. #
6+ # To build GDB with Python3 compatible with SystemC pretty printers use: #
7+ # ./install.sh gdb #
8+ # ################################################################################
9+
310test -z $ICSC_HOME && { echo " ICSC_HOME is not configured" ; exit 1; }
411echo " Using ICSC_HOME = $ICSC_HOME "
512
@@ -11,6 +18,7 @@ export GCC_INSTALL_PREFIX="$(realpath "$(dirname $(which g++))"/..)"
1118echo " Downloading and building Protobuf/LLVM at $CWD_DIR /build_deps..."
1219mkdir build_deps -p && cd build_deps
1320
21+ # ################################################################################
1422# Download, unpack, build, install Protobuf 3.13
1523wget -N https://github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz --no-check-certificate
1624tar -xf v3.13.0.tar.gz --skip-old-files
@@ -22,6 +30,7 @@ tar -xf v3.13.0.tar.gz --skip-old-files
2230 make install
2331)
2432
33+ # ################################################################################
2534# Download, unpack, build, install Clang and LLVM
2635wget -N https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/clang-12.0.1.src.tar.xz --no-check-certificate
2736wget -N https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/llvm-12.0.1.src.tar.xz --no-check-certificate
@@ -36,17 +45,21 @@ ln -sf ../../clang-12.0.1.src llvm-12.0.1.src/tools/clang
3645 make install
3746)
3847
48+ # ################################################################################
3949# Download, unpack, build, install GDB with Python3
40- # wget -N https://ftp.gnu.org/gnu/gdb/gdb-11.2.tar.gz --no-check-certificate
41- # tar -xf gdb-11.2.tar.gz --skip-old-files
42- # (
43- # cd gdb-11.2
44- # ./configure --prefix="$ICSC_HOME" --with-python="$(which python3)"
45- # make -j12
46- # make install
47- # )
48-
50+ if [[ $1 == gdb ]]
51+ then
52+ wget -N https://ftp.gnu.org/gnu/gdb/gdb-11.2.tar.gz --no-check-certificate
53+ tar -xf gdb-11.2.tar.gz --skip-old-files
54+ (
55+ cd gdb-11.2
56+ ./configure --prefix=" $ICSC_HOME " --with-python=" $( which python3) "
57+ make -j12
58+ make install
59+ )
60+ fi
4961
62+ # ################################################################################
5063# Build and install ISCC
5164cd $CWD_DIR
5265(
@@ -77,6 +90,6 @@ cd $ICSC_HOME
7790 mkdir build -p && cd build
7891 cmake ../ # prepare Makefiles
7992 cd designs/examples # run examples only
80- ctest -j4 # compile and run Verilog generation
93+ ctest -j12 # compile and run Verilog generation
8194 # use "-jN" key to run in "N" processes
8295)
0 commit comments