diff options
author | rahulp13 | 2022-02-21 17:57:31 +0530 |
---|---|---|
committer | rahulp13 | 2022-02-21 17:57:31 +0530 |
commit | ad05cd90275c4ab70c400b24a863f037db617c10 (patch) | |
tree | 1e159e6be7fef889e723d3947240303af782551a | |
parent | 83585b6d5273ca70a31f919118e50e03e68507df (diff) | |
download | nghdl-ad05cd90275c4ab70c400b24a863f037db617c10.tar.gz nghdl-ad05cd90275c4ab70c400b24a863f037db617c10.tar.bz2 nghdl-ad05cd90275c4ab70c400b24a863f037db617c10.zip |
Updated LLVM version and GHDL install commands
-rwxr-xr-x | Ubuntu/install-nghdl.sh | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/Ubuntu/install-nghdl.sh b/Ubuntu/install-nghdl.sh index 3e28bcc..f9a8968 100755 --- a/Ubuntu/install-nghdl.sh +++ b/Ubuntu/install-nghdl.sh @@ -21,6 +21,7 @@ ngspice="ngspice-nghdl" ghdl="ghdl-0.37" verilator="verilator-4.210" +llvm_version="9" config_dir="$HOME/.nghdl" config_file="config.ini" src_dir=`pwd` @@ -49,8 +50,8 @@ function installDependency echo "Installing GNAT..........................................." sudo apt install -y gnat - echo "Installing LLVM-8........................................." - sudo apt install -y llvm-8 + echo "Installing LLVM-${llvm_version}........................................" + sudo apt install -y llvm-${llvm_version} llvm-${llvm_version}-dev echo "Installing Clang.........................................." sudo apt-get install -y clang @@ -96,21 +97,22 @@ function installGHDL echo "Configuring $ghdl build as per requirements" chmod +x configure # Other configure flags can be found at - https://github.com/ghdl/ghdl/blob/master/configure - sudo ./configure --with-llvm-config=/usr/bin/llvm-config-8 + ./configure --with-llvm-config=/usr/bin/llvm-config-${llvm_version} echo "Building the install file for $ghdl LLVM" - sudo make + make sudo make install - set +e # Temporary disable exit on error - trap "" ERR # Do not trap on error of any command + # set +e # Temporary disable exit on error + # trap "" ERR # Do not trap on error of any command - echo "Removing unused part of $ghdl LLVM" - sudo rm -rf ../$ghdl + # echo "Removing unused part of $ghdl LLVM" + # sudo rm -rf ../$ghdl - set -e # Re-enable exit on error - trap error_exit ERR + # set -e # Re-enable exit on error + # trap error_exit ERR echo "GHDL installed successfully" + cd ../ } @@ -278,12 +280,24 @@ if [ $option == "--install" ];then elif [ $option == "--uninstall" ];then sudo rm -rf $HOME/ngspice-nghdl $HOME/.nghdl /usr/share/kicad/library/eSim_Nghdl.lib /usr/local/bin/nghdl /usr/bin/ngspice + + echo "Removing GHDL......................" + cd $ghdl/ + sudo make uninstall + cd ../ + sudo rm -rf $ghdl/ + # sudo rm -rf /usr/local/bin/ghdl /usr/local/bin/ghdl1-llvm /usr/local/lib/ghdl /usr/local/lib/libghdlvpi.so /usr/local/include/vpi_user.h + + echo "Removing Verilator................." + cd $verilator/ + sudo make uninstall + cd ../ + sudo rm -rf $verilator/ + echo "Removing libxaw7-dev..............." sudo apt purge -y libxaw7-dev - echo "Removing GHDL......................" - sudo rm -rf /usr/local/bin/ghdl /usr/local/bin/ghdl1-llvm /usr/local/lib/ghdl /usr/local/lib/libghdlvpi.so /usr/local/include/vpi_user.h echo "Removing LLVM......................" - sudo apt-get purge -y llvm-8 + sudo apt-get purge -y llvm-${llvm_version} llvm-${llvm_version}-dev echo "Removing GNAT......................" sudo apt purge -y gnat else |