From ae1539616f876bffd1c5749951c88506bd5ea35d Mon Sep 17 00:00:00 2001 From: cc <18856836718@163.com> Date: Sat, 13 Apr 2024 16:01:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20GGCforOpenEuler=20BishengC?= =?UTF-8?q?ompiler=20=E9=83=A8=E7=BD=B2=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/BiShengCompiler/install.sh | 9 +++++---- component/GCCforOpenEuler/install.sh | 10 ++++++---- component/NonInvasiveSwitching/install.sh | 8 ++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/component/BiShengCompiler/install.sh b/component/BiShengCompiler/install.sh index c17dd9f..999e892 100644 --- a/component/BiShengCompiler/install.sh +++ b/component/BiShengCompiler/install.sh @@ -13,13 +13,14 @@ if [[ ${verify_signature} -eq "0" ]]; then clang_path=$(which clang) if [[ ${clang_path} != ${HOME}/.local/BiShengCompiler-3.2.0-aarch64-linux/bin/clang ]]; then - sed -i '/#*export BISHENG_COMPILER_HOME=${HOME}\/.local/d' ${HOME}/.bashrc - sed -i '/#*export PATH=${BISHENG_COMPILER_HOME}:${PATH}/d' ${HOME}/.bashrc + sed -i '/.*export BISHENG_COMPILER_HOME=${HOME}\/.local/d' ${HOME}/.bashrc + sed -i '/.*export .*=${BISHENG_COMPILER_HOME}.*/d' ${HOME}/.bashrc echo "change ${HOME}/.bashrc" cat >> ${HOME}/.bashrc <<'EOF' -export BISHENG_COMPILER_HOME=${HOME}/.local/BiShengCompiler-3.2.0-aarch64-linux/bin -export PATH=${BISHENG_COMPILER_HOME}:${PATH} +export BISHENG_COMPILER_HOME=${HOME}/.local/BiShengCompiler-3.2.0-aarch64-linux +export PATH=${BISHENG_COMPILER_HOME}/bin:${PATH} +export LD_LIBRARY_PATH=${BISHENG_COMPILER_HOME}/lib:${BISHENG_COMPILER_HOME}/lib/aarch64-unknown-linux-gnu:${LD_LIBRARY_PATH} EOF echo "source ${HOME}/.bashrc" set +x diff --git a/component/GCCforOpenEuler/install.sh b/component/GCCforOpenEuler/install.sh index 79a0409..c973053 100644 --- a/component/GCCforOpenEuler/install.sh +++ b/component/GCCforOpenEuler/install.sh @@ -13,13 +13,15 @@ if [[ ${verify_signature} -eq "0" ]]; then gcc_path=$(which gcc) if [[ ${gcc_path} != ${HOME}/.local/gcc-10.3.1-2023.12-aarch64-linux/bin/gcc ]]; then - sed -i '/#*export GCC_HOME=${HOME}\/.local/d' ${HOME}/.bashrc - sed -i '/#*export PATH=${GCC_HOME}:${PATH}/d' ${HOME}/.bashrc + sed -i '/.*export GCC_HOME=${HOME}\/.local/d' ${HOME}/.bashrc + sed -i '/.*export .*=${GCC_HOME}.*/d' ${HOME}/.bashrc echo "change ${HOME}/.bashrc" cat >> ${HOME}/.bashrc <<'EOF' -export GCC_HOME=${HOME}/.local/gcc-10.3.1-2023.12-aarch64-linux/bin -export PATH=${GCC_HOME}:${PATH} +export GCC_HOME=${HOME}/.local/gcc-10.3.1-2023.12-aarch64-linux +export PATH=${GCC_HOME}/bin:${PATH} +export INCLUDE=${GCC_HOME}/include:${INCLUDE} +export LD_LIBRARY_PATH=${GCC_HOME}/lib64:${LD_LIBRARY_PATH} EOF echo "source ${HOME}/.bashrc" set +x diff --git a/component/NonInvasiveSwitching/install.sh b/component/NonInvasiveSwitching/install.sh index 3ca3d01..f56792e 100644 --- a/component/NonInvasiveSwitching/install.sh +++ b/component/NonInvasiveSwitching/install.sh @@ -3,19 +3,19 @@ set -e function main() { cat > "${HOME}"/.local/wrap-bin/clang <<'EOF' set -x -"${HOME}"/.local/BiShengCompiler-3.2.0-aarch64-linux/bin/clang "$@" -mcpu=tsv110 --O2 -g +"${HOME}"/.local/BiShengCompiler-3.2.0-aarch64-linux/bin/clang "$@" -mcpu=tsv110 -O3 -g EOF cat > "${HOME}"/.local/wrap-bin/clang++ <<'EOF' set -x -"${HOME}"/.local/BiShengCompiler-3.2.0-aarch64-linux/bin/clang++ "$@" -mcpu=tsv110 --O2 -g +"${HOME}"/.local/BiShengCompiler-3.2.0-aarch64-linux/bin/clang++ "$@" -mcpu=tsv110 -O3 -g EOF cat > "${HOME}"/.local/wrap-bin/gcc <<'EOF' set -x -"${HOME}"/.local/BiShengCompiler-3.2.0-aarch64-linux/bin/clang "$@" -mcpu=tsv110 --O2 -g +"${HOME}"/.local/BiShengCompiler-3.2.0-aarch64-linux/bin/clang "$@" -mcpu=tsv110 -O3 -g EOF cat > "${HOME}"/.local/wrap-bin/g++ <<'EOF' set -x -"${HOME}"/.local/BiShengCompiler-3.2.0-aarch64-linux/bin/clang++ "$@" -mcpu=tsv110 --O2 -g +"${HOME}"/.local/BiShengCompiler-3.2.0-aarch64-linux/bin/clang++ "$@" -mcpu=tsv110 -O3 -g EOF chmod +x "${HOME}"/.local/wrap-bin/clang chmod +x "${HOME}"/.local/wrap-bin/clang++ -- Gitee