diff options
Diffstat (limited to 'scripts/test')
-rwxr-xr-x | scripts/test | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/scripts/test b/scripts/test index e389728..a93fe90 100755 --- a/scripts/test +++ b/scripts/test | |||
@@ -2,7 +2,14 @@ | |||
2 | set -e | 2 | set -e |
3 | set -x | 3 | set -x |
4 | 4 | ||
5 | unset CC | 5 | if [ "$ARCH" = "" ]; then |
6 | ARCH=`uname -m` | ||
7 | fi | ||
8 | |||
9 | if [ "$ARCH" = "mingw32" -o "$ARCH" = "mingw64" -o "$ARCH" = "arm32" ]; then | ||
10 | unset CC | ||
11 | fi | ||
12 | |||
6 | ENABLE_ASM="${ENABLE_ASM:=ON}" | 13 | ENABLE_ASM="${ENABLE_ASM:=ON}" |
7 | 14 | ||
8 | if type apt-get >/dev/null 2>&1; then | 15 | if type apt-get >/dev/null 2>&1; then |
@@ -15,10 +22,6 @@ fi | |||
15 | 22 | ||
16 | VERSION=`cat VERSION` | 23 | VERSION=`cat VERSION` |
17 | 24 | ||
18 | if [ "$ARCH" = "" ]; then | ||
19 | ARCH=`uname -m` | ||
20 | fi | ||
21 | |||
22 | # test macOS | 25 | # test macOS |
23 | if [ `uname` = "Darwin" ]; then | 26 | if [ `uname` = "Darwin" ]; then |
24 | # test autotools | 27 | # test autotools |
@@ -129,6 +132,21 @@ elif [ "$ARCH" = "arm32" -o "$ARCH" = "arm64" ]; then | |||
129 | 132 | ||
130 | file apps/openssl/.libs/openssl | 133 | file apps/openssl/.libs/openssl |
131 | 134 | ||
135 | elif [ "$ARCH" = "loong64" ]; then | ||
136 | sudo apt install -y qemu-user-static binfmt-support g++-14-loongarch64-linux-gnu | ||
137 | sudo ln -sf /usr/loongarch64-linux-gnu/lib64/ld-linux-loongarch-lp64d.so.1 /lib64 | ||
138 | |||
139 | CC=loongarch64-linux-gnu-gcc-14 | ||
140 | CXX=loongarch64-linux-gnu++-14 | ||
141 | AR=loongarch64-linux-gnu-ar | ||
142 | STRIP=loongarch64-linux-gnu-strip-14 | ||
143 | RANLIB=loongarch64-linux-gnu-ranlib | ||
144 | |||
145 | ./configure --host=loongarch64-linux-gnu | ||
146 | LD_LIBRARY_PATH=/usr/loongarch64-linux-gnu/lib make -j 4 check | ||
147 | |||
148 | file apps/openssl/openssl | ||
149 | |||
132 | elif [ "$ARCH" = "mips32" -o "$ARCH" = "mips64" ]; then | 150 | elif [ "$ARCH" = "mips32" -o "$ARCH" = "mips64" ]; then |
133 | sudo apt-get install -y qemu-user-static binfmt-support | 151 | sudo apt-get install -y qemu-user-static binfmt-support |
134 | 152 | ||