[PATCH] D60644: [compiler-rt][builtins][sanitizers] Update compiler-rt test cases for compatibility with system's toolchain

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 26 08:40:22 PDT 2019


hubert.reinterpretcast added inline comments.


================
Comment at: compiler-rt/test/builtins/Unit/compiler_rt_logb_test.c:42
+  // compute to the same value as the compiler-rt value.
+#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+    defined (__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 23)
----------------
I think the test should continue to run on non-GLIBC systems.
```
  // Do not the run the compiler-rt logb test case if using GLIBC version
  // < 2.23. Older versions might not compute to the same value as the
  // compiler-rt value.
#if !defined(__GLIBC__) || (defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 23))
```

The `__GLIBC_PREREQ` checking used in the above is based on how `compiler-rt/test/sanitizer_common/TestCases/Linux/mprobe.cc` uses that macro.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60644/new/

https://reviews.llvm.org/D60644





More information about the llvm-commits mailing list