[tor-commits] [tor/master] Silence unneeded clang warns that triggered in prob distr tests.

nickm at torproject.org nickm at torproject.org
Wed Mar 13 14:37:42 UTC 2019


commit 8b64ff7a3f2d9eb0837248a6c9b0e8b438374369
Author: George Kadianakis <desnacked at riseup.net>
Date:   Mon Feb 25 15:29:41 2019 +0200

    Silence unneeded clang warns that triggered in prob distr tests.
    
    See https://trac.torproject.org/projects/tor/ticket/29528#comment:3
    and https://bugs.llvm.org/show_bug.cgi?id=19535
---
 configure.ac | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index 75bb0c7bd..8f0563753 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1196,6 +1196,11 @@ if test "$fragile_hardening" = "yes"; then
       AC_MSG_ERROR([The compiler supports -fsanitize=undefined, but for some reason I was not able to link when using it. Are you missing run-time support? With GCC you need libasan.*, and with Clang you need libclang_rt.ubsan*])
     fi
 
+   TOR_TRY_COMPILE_WITH_CFLAGS([-fno-sanitize=float-divide-by-zero], also_link, CFLAGS_UBSAN="-fno-sanitize=float-divide-by-zero", true)
+    if test "$tor_cv_cflags__fno_sanitize_float_divide_by_zero" = "yes" && test "$tor_can_link__fno_sanitize_float_divide_by_zero" != "yes"; then
+      AC_MSG_ERROR([The compiler supports -fno-sanitize=float-divide-by-zero, but for some reason I was not able to link when using it. Are you missing run-time support? With GCC you need libasan.*, and with Clang you need libclang_rt.ubsan*])
+    fi
+
 TOR_CHECK_CFLAGS([-fno-omit-frame-pointer])
 fi
 





More information about the tor-commits mailing list