diff --git a/tools/build_steps.sh b/tools/build_steps.sh index 0715c121..3b9d5091 100644 --- a/tools/build_steps.sh +++ b/tools/build_steps.sh @@ -33,7 +33,7 @@ function get_plat_tag { local mb_ml_ver=${MB_ML_VER:-1} local mb_ml_libc=${MB_ML_LIBC:-manylinux} case $plat in - i686|x86_64|arm64|universal2|intel|aarch64|s390x|ppc64le) ;; + i686|x86_64|arm64|universal2|intel|aarch64|s390x|ppc64le|loongarch64) ;; *) echo Did not recognize plat $plat; return 1 ;; esac local uname=${2:-$(uname)} @@ -148,6 +148,9 @@ function do_build_lib { local bitness=64 local target="POWER8" ;; + Linux-loongarch64) + local target="GENERIC" + ;; *) echo "Strange plat value $plat"; exit 1 ;; esac case $interface64 in @@ -170,6 +173,12 @@ function do_build_lib { pushd OpenBLAS patch_source echo start building + if [ "$plat" == "loongarch64" ]; then + # https://github.com/OpenMathLib/OpenBLAS/blob/develop/.github/workflows/loongarch64.yml#L65 + echo -n > utest/test_dsdot.c + echo "Due to the qemu versions 7.2 causing utest cases to fail," + echo "the utest dsdot:dsdot_n_1 have been temporarily disabled." + fi if [ -v dynamic_list ]; then CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \ make BUFFERSIZE=20 DYNAMIC_ARCH=1 QUIET_MAKE=1 \