@@ -40,7 +40,9 @@ case "${with_gcc}" in
4040 if [ -f gcc-${gcc_ver} .tar.gz ]; then
4141 echo " gcc-${gcc_ver} .tar.gz is found"
4242 else
43- download_pkg_from_ABACUS_org " ${gcc_sha256} " " gcc-${gcc_ver} .tar.gz"
43+ # download_pkg_from_ABACUS_org "${gcc_sha256}" "gcc-${gcc_ver}.tar.gz"
44+ url=https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-${gcc_ver} /gcc-${gcc_ver} .tar.gz
45+ download_pkg_from_url " ${gcc_sha256} " " gcc-${gcc_ver} .tar.gz" " ${url} "
4446 fi
4547 if [ " ${PACK_RUN} " = " __TRUE__" ]; then
4648 echo " --pack-run mode specified, skip installation"
@@ -119,13 +121,17 @@ case "${with_gcc}" in
119121 write_checksums " ${install_lock_file} " " ${SCRIPT_DIR} /stage0/$( basename ${SCRIPT_NAME} ) "
120122 fi
121123 fi
122- check_install ${pkg_install_dir} /bin/gcc " gcc" && CC=" ${pkg_install_dir} /bin/gcc" || exit 1
123- check_install ${pkg_install_dir} /bin/g++ " gcc" && CXX=" ${pkg_install_dir} /bin/g++" || exit 1
124- check_install ${pkg_install_dir} /bin/gfortran " gcc" && FC=" ${pkg_install_dir} /bin/gfortran" || exit 1
125- F90=" ${FC} "
126- F77=" ${FC} "
127- GCC_CFLAGS=" -I'${pkg_install_dir} /include'"
128- GCC_LDFLAGS=" -L'${pkg_install_dir} /lib64' -L'${pkg_install_dir} /lib' -Wl,-rpath,'${pkg_install_dir} /lib64' -Wl,-rpath,'${pkg_install_dir} /lib64'"
124+ if [ " ${PACK_RUN} " = " __TRUE__" ]; then
125+ echo " --pack-run mode specified, skip system check"
126+ else
127+ check_install ${pkg_install_dir} /bin/gcc " gcc" && CC=" ${pkg_install_dir} /bin/gcc" || exit 1
128+ check_install ${pkg_install_dir} /bin/g++ " gcc" && CXX=" ${pkg_install_dir} /bin/g++" || exit 1
129+ check_install ${pkg_install_dir} /bin/gfortran " gcc" && FC=" ${pkg_install_dir} /bin/gfortran" || exit 1
130+ F90=" ${FC} "
131+ F77=" ${FC} "
132+ GCC_CFLAGS=" -I'${pkg_install_dir} /include'"
133+ GCC_LDFLAGS=" -L'${pkg_install_dir} /lib64' -L'${pkg_install_dir} /lib' -Wl,-rpath,'${pkg_install_dir} /lib64' -Wl,-rpath,'${pkg_install_dir} /lib64'"
134+ fi
129135 ;;
130136 __SYSTEM__)
131137 echo " ==================== Finding GCC from system paths ===================="
0 commit comments