On 11/10/2015 11:00 PM, Andreas Tobler wrote:
the attached patch removes the hard-coded requirement for the link
operation with -ldl. On FreeBSD we do not need that, it breaks compilation.


  # Common libraries that we need to link against for all sanitizer libs.
-link_sanitizer_common='-lpthread -ldl -lm'
+link_sanitizer_common='-lpthread -lm'

  # At least for glibc, shm_open is in librt.  But don't pull that
  # in if it still doesn't give us the function we want.  This
@@ -130,6 +130,12 @@
  # Other sanitizers do not override clock_* API
  ])

+# Do a configure time check for -ldl
+AC_CHECK_LIB(dl, dlsym,
+  [link_libasan="-ldl $link_libasan"
+link_libtsan="-ldl $link_libtsan"
+])
+

Why not add this to link_sanitizer_common, just after the similar check for shm_open? I'm not entirely sure how libsanitizer is structured, but I see references to dlsym inside the sanitizer_common directory.


Bernd

Reply via email to