3 # Switch to directory of this script
4 MYDIR
=$
(dirname $
(realpath
"$0"))
7 # Exit if anything fails
10 #######################################
12 rm -rf build
&& mkdir build
&& cd build
13 cmake ..
-DHWY_WARNINGS_ARE_ERRORS:BOOL
=ON
14 make -j && ctest
-j && cd ..
&& rm -rf build
16 #######################################
18 rm -rf build_dbg
&& mkdir build_dbg
&& cd build_dbg
19 CXX
=clang
++-9 CC
=clang-9 cmake ..
-DHWY_WARNINGS_ARE_ERRORS:BOOL
=ON
-DCMAKE_BUILD_TYPE=Debug
20 make -j && ctest
-j && cd ..
&& rm -rf build_dbg
22 #######################################
24 rm -rf build_32
&& mkdir build_32
&& cd build_32
25 CFLAGS
=-m32 CXXFLAGS
=-m32 LDFLAGS
=-m32 CXX
=g
++ CC
=gcc cmake ..
-DHWY_WARNINGS_ARE_ERRORS:BOOL
=ON
26 make -j && ctest
-j && cd ..
&& rm -rf build_32
28 #######################################
29 for VER
in 10 11 12; do
31 rm -rf build_g
$VER && mkdir build_g
$VER && cd build_g
$VER
32 CC
=gcc-
$VER CXX
=g
++-$VER cmake ..
-DHWY_WARNINGS_ARE_ERRORS:BOOL
=ON
33 make -j && make test && cd ..
&& rm -rf build_g
$VER
36 #######################################
38 export QEMU_LD_PREFIX
=/usr
/arm-linux-gnueabihf
39 rm -rf build_arm7
&& mkdir build_arm7
&& cd build_arm7
40 CC
=arm-linux-gnueabihf-gcc-11 CXX
=arm-linux-gnueabihf-g
++-11 cmake ..
-DHWY_CMAKE_ARM7:BOOL
=ON
-DHWY_WARNINGS_ARE_ERRORS:BOOL
=ON
41 make -j && ctest
-j && cd ..
&& rm -rf build_arm7
43 #######################################
45 export QEMU_LD_PREFIX
=/usr
/aarch64-linux-gnu
46 rm -rf build_arm8
&& mkdir build_arm8
&& cd build_arm8
47 CC
=aarch64-linux-gnu-gcc-11 CXX
=aarch64-linux-gnu-g
++-11 cmake ..
-DHWY_WARNINGS_ARE_ERRORS:BOOL
=ON
48 make -j && ctest
-j && cd ..
&& rm -rf build_arm8
50 #######################################
52 export QEMU_LD_PREFIX
=/usr
/powerpc64le-linux-gnu
53 rm -rf build_ppc8
&& mkdir build_ppc8
&& cd build_ppc8
54 CC
=powerpc64le-linux-gnu-gcc-12 CXX
=powerpc64le-linux-gnu-g
++-12 cmake ..
-DCMAKE_BUILD_TYPE=Release
-DHWY_WARNINGS_ARE_ERRORS:BOOL
=ON
-DCMAKE_CROSSCOMPILING_EMULATOR=/usr
/bin
/qemu-ppc64le-static
-DCMAKE_C_COMPILER_TARGET="powerpc64le-linux-gnu" -DCMAKE_CXX_COMPILER_TARGET="powerpc64le-linux-gnu" -DCMAKE_CROSSCOMPILING=true
-DCMAKE_CXX_FLAGS='-mcpu=power9 -mno-power9-vector -mpower8-vector'
55 clear && make -j && ctest
-j && cd ..
&& rm -rf build_ppc8
57 #######################################
59 export QEMU_LD_PREFIX
=/usr
/powerpc64le-linux-gnu
60 rm -rf build_ppc9
&& mkdir build_ppc9
&& cd build_ppc9
61 CC
=clang-15 CXX
=clang
++-15 cmake ..
-DCMAKE_BUILD_TYPE=Release
-DHWY_WARNINGS_ARE_ERRORS:BOOL
=ON
-DCMAKE_C_COMPILER_TARGET="powerpc64le-linux-gnu" -DCMAKE_CXX_COMPILER_TARGET="powerpc64le-linux-gnu" -DCMAKE_CROSSCOMPILING=true
-DCMAKE_CXX_FLAGS='-mcpu=power9'
62 clear && make -j && ctest
-j && cd ..
&& rm -rf build_ppc9
64 #######################################
65 echo POWER9 big endian GCC
66 export QEMU_LD_PREFIX
=/usr
/powerpc64-linux-gnu
67 rm -rf build_ppc9be
&& mkdir build_ppc9be
&& cd build_ppc9be
68 CC
=powerpc64-linux-gnu-gcc-11 CXX
=powerpc64-linux-gnu-g
++-11 cmake ..
-DCMAKE_BUILD_TYPE=Release
-DHWY_WARNINGS_ARE_ERRORS:BOOL
=ON
-DCMAKE_CROSSCOMPILING_EMULATOR=/usr
/bin
/qemu-ppc64
-DCMAKE_C_COMPILER_TARGET="powerpc64-linux-musl" -DCMAKE_CXX_COMPILER_TARGET="powerpc64-linux-musl" -DCMAKE_CROSSCOMPILING=true
-DCMAKE_CXX_FLAGS='-mcpu=power9'
69 clear && make -j && ctest
-j && cd ..
&& rm -rf build_ppc9be
71 #######################################
72 echo POWER10 requires QEMU
7_2 and gcc because clang
15 crashes
73 export QEMU_LD_PREFIX
=/usr
/powerpc64le-linux-gnu
74 rm -rf build_ppc10
&& mkdir build_ppc10
&& cd build_ppc10
75 CC
=powerpc64le-linux-gnu-gcc-12 CXX
=powerpc64le-linux-gnu-g
++-12 cmake ..
-DCMAKE_BUILD_TYPE=Release
-DHWY_WARNINGS_ARE_ERRORS:BOOL
=ON
-DCMAKE_C_COMPILER_TARGET="powerpc64le-linux-gnu" -DCMAKE_CXX_COMPILER_TARGET="powerpc64le-linux-gnu" -DCMAKE_CROSSCOMPILING=true
-DCMAKE_CXX_FLAGS='-mcpu=power10'
76 clear && make -j && ctest
-j && cd ..
&& rm -rf build_ppc10