]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Add PowerPC without Power8 optimizations to GitHub Actions' configure and cmake workf...
authorMika Lindqvist <postmaster@raasu.org>
Sun, 13 Jun 2021 17:24:09 +0000 (20:24 +0300)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 11 Aug 2021 10:02:55 +0000 (12:02 +0200)
.github/workflows/cmake.yml
.github/workflows/configure.yml
configure

index a172451bbfbd6a52fab57e73112ab749fa2a094e..18377740fce8405f355c40a37fd3b5d9b6d6ad35 100644 (file)
@@ -170,6 +170,15 @@ jobs:
             ldflags: -static
             codecov: ubuntu_gcc_ppc
 
+          - name: Ubuntu GCC PPC No Power8
+            os: ubuntu-latest
+            compiler: powerpc-linux-gnu-gcc
+            cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc.cmake -DWITH_POWER8=OFF
+            asan-options: detect_leaks=0
+            packages: qemu qemu-user gcc-powerpc-linux-gnu libc-dev-powerpc-cross
+            qemu-run: qemu-ppc
+            codecov: ubuntu_gcc_ppc_no_power8
+
           - name: Ubuntu GCC PPC64
             os: ubuntu-latest
             compiler: powerpc64-linux-gnu-gcc
index 9d9dc3598533ae9b9381ab7bbc2373e0346b2fbd..3892932b8c6c689e76813a7a85d2f20ae659894f 100644 (file)
@@ -120,6 +120,14 @@ jobs:
             cflags: -static
             ldflags: -static
 
+          - name: Ubuntu GCC PPC No Power8
+            os: ubuntu-latest
+            compiler: powerpc-linux-gnu-gcc
+            configure-args: --warn --without-power8
+            chost: powerpc-linux-gnu
+            packages: qemu qemu-user gcc-powerpc-linux-gnu libc-dev-powerpc-cross
+            qemu-run: qemu-ppc
+
           - name: Ubuntu GCC PPC64
             os: ubuntu-latest
             compiler: powerpc64-linux-gnu-gcc
index e48dfdc565b4abc147f81fd2c00274bfc7a57b46..26281338ee6abad750d791985960df9a5d97d011 100755 (executable)
--- a/configure
+++ b/configure
@@ -92,6 +92,7 @@ build32=0
 build64=0
 buildacle=1
 buildaltivec=1
+buildpower8=1
 buildneon=1
 builddfltccdeflate=0
 builddfltccinflate=0
@@ -158,6 +159,7 @@ case "$1" in
       echo '    [--without-acle]            Compiles without ARM C Language Extensions' | tee -a configure.log
       echo '    [--without-neon]            Compiles without ARM Neon SIMD instruction set' | tee -a configure.log
       echo '    [--without-altivec]         Compiles without PPC AltiVec support' | tee -a configure.log
+      echo '    [--without-power8]          Compiles without Power8 instruction set' | tee -a configure.log
       echo '    [--with-dfltcc-deflate]     Use DEFLATE CONVERSION CALL instruction for compression on IBM Z' | tee -a configure.log
       echo '    [--with-dfltcc-inflate]     Use DEFLATE CONVERSION CALL instruction for decompression on IBM Z' | tee -a configure.log
       echo '    [--without-crc32-vx]        Build without vectorized CRC32 on IBM Z' | tee -a configure.log
@@ -187,6 +189,7 @@ case "$1" in
     --without-acle) buildacle=0; shift ;;
     --without-neon) buildneon=0; shift ;;
     --without-altivec) buildaltivec=0 ; shift ;;
+    --without-power8) buildpower8=0 ; shift ;;
     --with-dfltcc-deflate) builddfltccdeflate=1; shift ;;
     --with-dfltcc-inflate) builddfltccinflate=1; shift ;;
     --without-crc32-vx) buildcrc32vx=0; shift ;;
@@ -1108,7 +1111,7 @@ check_power8_intrinsics() {
 #include <sys/auxv.h>
 int main() { return (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07); }
 EOF
-    if try $CC -c $CFLAGS -mcpu=power8 $test.c; then
+    if test $buildpower8 -eq 1 && try $CC -c $CFLAGS -mcpu=power8 $test.c; then
         HAVE_POWER8_INTRIN=1
         echo "Check whether POWER8 instructions are available ... Yes." | tee -a configure.log
     else