From 12b0c3b92076a31eec80bbd2caa86437a08417e7 Mon Sep 17 00:00:00 2001 From: Dark Dragon Date: Thu, 9 Apr 2026 13:20:29 +0200 Subject: [PATCH] Remove float equality test from configure.ac It fails on arm64 and only succeeds on amd64 because of luck. It is skipped when cross-compiling anyways. Based on the comment, weight_test.cc tests the same functionality but succeeds on arm64, so the autoconf failure is a false negative. Removing this test to fix build for arm64. --- configure.ac | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/configure.ac b/configure.ac index 9ab882429..94ff4824c 100644 --- a/configure.ac +++ b/configure.ac @@ -149,40 +149,6 @@ AC_ARG_WITH([libfstdir], AC_SUBST([libfstdir], $with_libfstdir) -# Flags may be changed after configuring, so this is checked again by -# weight_test.cc. The check here is to save time in the common case, -# or when someone does not run `make check`. -AC_RUN_IFELSE([AC_LANG_PROGRAM([ - #include - - template - bool FloatEqIsReflexive(T m) { - volatile T x = 1.111; - x *= m; - - T y = 1.111; - y *= m; - - return x == y; - } - ], [ - volatile double test_value = 1.1; - if (!FloatEqIsReflexive(static_cast(test_value))) { - printf("float FAIL\n"); - return 1; - } - if (!FloatEqIsReflexive(test_value)) { - printf("double FAIL\n"); - return 1; - } - ])], - [echo "Float equality is good"], - [AC_MSG_FAILURE(m4_normalize([ - Test float equality failed! - Compile with -msse -mfpmath=sse if using g++. - ]))], - [echo "Ignoring test for cross-compilation"]) - AC_CHECK_LIB([dl], dlopen, [DL_LIBS=-ldl]) AC_SUBST([DL_LIBS])