]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
ARM: enable neon and acle when available
authorSebastian Pop <s.pop@samsung.com>
Wed, 23 Jan 2019 20:17:49 +0000 (14:17 -0600)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 1 Mar 2019 10:35:24 +0000 (11:35 +0100)
this patch changes the default for cmake and configure to enable neon and acle
when no flags have been specified.  This mimics the default for x86.  The flags
--neon and --acle are changed to the opposite --without-neon and --without-acle
allowing the user to disable detection of neon and acle.

.travis.yml
CMakeLists.txt
configure

index 6ca3fb7eabae999959446eef3187214275e60bf5..49fbf461526dda4bb9a11d71b4a4cc2de6a780a8 100644 (file)
@@ -79,7 +79,6 @@ matrix:
             - gcc-aarch64-linux-gnu
             - libc-dev-arm64-cross
       # For all aarch64 implementations NEON is mandatory, while crypto/crc are not.
-      # So for aarch64 NEON should be automatically enabled, and "acle" should be explicitly defined
       env: CHOST=aarch64-linux-gnu BUILDDIR=. TOOL="./configure --warn --zlib-compat"
     - os: linux
       compiler: aarch64-linux-gnu-gcc
@@ -89,12 +88,6 @@ matrix:
             - qemu
             - gcc-aarch64-linux-gnu
             - libc-dev-arm64-cross
-      # AArch64 toolchain in Trusty is 4.8.2, which doesn't support acle intrinsics.
-      # Until TravisCI provides Xenial dist (which comes with gcc-aarch64-5.3.1) 'acle' option cannot
-      # be enabled in subset. But the command
-      # "CHOST=aarch64-linux-gnu ./configure --warn --zlib-compat --acle"
-      # should work if manually test it in a dist with gcc-aarch64 5.1 or higher
-      # env: CHOST=aarch64-linux-gnu BUILDDIR=. TOOL="./configure --warn --zlib-compat --acle"
       env: CHOST=aarch64-linux-gnu BUILDDIR=. TOOL="./configure --warn --zlib-compat"
     # Hard-float subsets
     - os: linux
@@ -114,7 +107,7 @@ matrix:
             - qemu
             - gcc-arm-linux-gnueabihf
             - libc-dev-armhf-cross
-      env: CHOST=arm-linux-gnueabihf BUILDDIR=. TOOL="./configure --warn --zlib-compat --neon"
+      env: CHOST=arm-linux-gnueabihf BUILDDIR=. TOOL="./configure --warn --zlib-compat --without-neon"
     - os: linux
       compiler: arm-linux-gnueabihf-gcc
       addons:
index 36ef9393040419213a0f5a20a3f9e155ae5b864d..02d923f9dfbf23954cca79049b635faa4dbf86f9 100644 (file)
@@ -103,8 +103,8 @@ option(WITH_NEW_STRATEGIES "Use new strategies" ON)
 option(WITH_NATIVE_INSTRUCTIONS
     "Instruct the compiler to use the full instruction set on this host (gcc/clang -march=native)" OFF)
 if("${ARCH}" MATCHES "arm" OR "${ARCH}" MATCHES "aarch64")
-    option(WITH_ACLE "Build with ACLE CRC" OFF)
-    option(WITH_NEON "Build with NEON intrinsics" OFF)
+    option(WITH_ACLE "Build with ACLE CRC" ON)
+    option(WITH_NEON "Build with NEON intrinsics" ON)
 endif()
 
 if(${CMAKE_C_COMPILER} MATCHES "icc" OR ${CMAKE_C_COMPILER} MATCHES "icpc" OR ${CMAKE_C_COMPILER} MATCHES "icl")
index 7725476d97bb907fdd076b5b1ef08d14114b8f25..81ab0402fb3a02191d2ec73fca4cc367928821e4 100755 (executable)
--- a/configure
+++ b/configure
@@ -96,8 +96,8 @@ compat=0
 cover=0
 build32=0
 build64=0
-buildacle=0
-buildneon=0
+buildacle=1
+buildneon=1
 with_sanitizers=0
 with_msan=0
 with_fuzzers=0
@@ -171,8 +171,8 @@ case "$1" in
     --cover) cover=1; shift ;;
     -3* | --32) build32=1; shift ;;
     -6* | --64) build64=1; shift ;;
-    --acle) buildacle=1; shift ;;
-    --neon) buildneon=1; shift ;;
+    --without-acle) buildacle=0; shift ;;
+    --without-neon) buildneon=0; shift ;;
     -n | --native) native=1; shift ;;
     -a*=* | --archs=*) ARCHS=`echo $1 | sed 's/.*=//'`; shift ;;
     --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;;