]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove build script compiler checks for ctz builtins
authorNathan Moinvaziri <nathan@nathanm.com>
Mon, 26 Jan 2026 08:45:07 +0000 (00:45 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 6 Feb 2026 13:52:54 +0000 (14:52 +0100)
.github/workflows/cmake.yml
CMakeLists.txt
configure

index be128122aa727cee95d8a4e635b0525b069cf0c8..135bd5088e60860382f4006238a4faa253477991 100644 (file)
@@ -92,20 +92,6 @@ jobs:
             cmake-args: -DWITH_CHORBA=OFF
             codecov: ubuntu_gcc_no_chorba
 
-          - name: Ubuntu GCC No CTZLL
-            os: ubuntu-latest
-            compiler: gcc
-            cxx-compiler: g++
-            cmake-args: -DWITH_OPTIM=OFF -DHAVE_BUILTIN_CTZLL=OFF
-            codecov: ubuntu_gcc_no_ctzll
-
-          - name: Ubuntu GCC No CTZ
-            os: ubuntu-latest
-            compiler: gcc
-            cxx-compiler: g++
-            cmake-args: -DWITH_OPTIM=OFF -DHAVE_BUILTIN_CTZLL=OFF -DHAVE_BUILTIN_CTZ=OFF
-            codecov: ubuntu_gcc_no_ctz
-
           - name: Ubuntu GCC SSE2 UBSAN
             os: ubuntu-latest
             compiler: gcc
index 20c9c3f61a4d91a50d635e39b4d8d504c143157b..34f11a61a810c9de13aa6787dba30f349071f2c5 100644 (file)
@@ -615,42 +615,6 @@ if(HAVE_BUILTIN_ASSUME_ALIGNED)
 endif()
 set(CMAKE_REQUIRED_FLAGS)
 
-#
-# check for __builtin_ctz() support in the compiler
-#
-set(CMAKE_REQUIRED_FLAGS ${ZNOLTOFLAG})
-check_c_source_compiles(
-    "int main(void) {
-        unsigned int zero = 0;
-        long test = __builtin_ctz(zero);
-        (void)test;
-        return 0;
-    }"
-    HAVE_BUILTIN_CTZ
-)
-if(HAVE_BUILTIN_CTZ)
-    add_definitions(-DHAVE_BUILTIN_CTZ)
-endif()
-set(CMAKE_REQUIRED_FLAGS)
-
-#
-# check for __builtin_ctzll() support in the compiler
-#
-set(CMAKE_REQUIRED_FLAGS ${ZNOLTOFLAG})
-check_c_source_compiles(
-    "int main(void) {
-        unsigned int zero = 0;
-        long test = __builtin_ctzll(zero);
-        (void)test;
-        return 0;
-    }"
-    HAVE_BUILTIN_CTZLL
-)
-if(HAVE_BUILTIN_CTZLL)
-    add_definitions(-DHAVE_BUILTIN_CTZLL)
-endif()
-set(CMAKE_REQUIRED_FLAGS)
-
 #
 # check for ptrdiff_t support
 #
index b3f60efc032c93519ea3cb24713be8e31335d968..dc92bcdaef408d785ff027f2bad4dbc6482b307e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1142,32 +1142,6 @@ else
     echo "Checking for __builtin_assume_aligned() ... No." | tee -a configure.log
 fi
 
-# Check for __builtin_ctz() support in compiler
-cat > $test.c << EOF
-long f(unsigned int x) { return __builtin_ctz(x); }
-int main(void) { return 0; }
-EOF
-if try ${CC} ${CFLAGS} $test.c $LDSHAREDLIBC; then
-    echo "Checking for __builtin_ctz ... Yes." | tee -a configure.log
-    CFLAGS="$CFLAGS -DHAVE_BUILTIN_CTZ"
-    SFLAGS="$SFLAGS -DHAVE_BUILTIN_CTZ"
-else
-    echo "Checking for __builtin_ctz ... No." | tee -a configure.log
-fi
-
-# Check for __builtin_ctzll() support in compiler
-cat > $test.c << EOF
-long f(unsigned long long x) { return __builtin_ctzll(x); }
-int main(void) { return 0; }
-EOF
-if try ${CC} ${CFLAGS} $test.c $LDSHAREDLIBC; then
-    echo "Checking for __builtin_ctzll ... Yes." | tee -a configure.log
-    CFLAGS="$CFLAGS -DHAVE_BUILTIN_CTZLL"
-    SFLAGS="$SFLAGS -DHAVE_BUILTIN_CTZLL"
-else
-    echo "Checking for __builtin_ctzll ... No." | tee -a configure.log
-fi
-
 check_avx2_intrinsics() {
     # Check whether compiler supports AVX2 intrinsics
     cat > $test.c << EOF