re PR sanitizer/57316 (build failure in libsanitizer)
2014-01-23 Yury Gribov <y.gribov@samsung.com> Jakub Jelinek <jakub@redhat.com> PR sanitizer/57316 * configure.ac: Check for missing syscalls. * Makefile.am: Likewise. * configure: Regenerate. * Makefile.in: Regenerate. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r206966
This commit is contained in:
parent
652fea3922
commit
4a7eaf5f94
5 changed files with 84 additions and 7 deletions
|
@ -1,3 +1,12 @@
|
|||
2014-01-23 Yury Gribov <y.gribov@samsung.com>
|
||||
Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR sanitizer/57316
|
||||
* configure.ac: Check for missing syscalls.
|
||||
* Makefile.am: Likewise.
|
||||
* configure: Regenerate.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2014-01-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sanitizer_common/sanitizer_symbolizer_libbacktrace.h
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
ACLOCAL_AMFLAGS = -I .. -I ../config
|
||||
|
||||
if SANITIZER_SUPPORTED
|
||||
SUBDIRS = sanitizer_common
|
||||
if !USING_MAC_INTERPOSE
|
||||
SUBDIRS += interception
|
||||
|
@ -11,6 +12,7 @@ SUBDIRS += lsan asan ubsan
|
|||
if TSAN_SUPPORTED
|
||||
SUBDIRS += tsan
|
||||
endif
|
||||
endif
|
||||
|
||||
## May be used by toolexeclibdir.
|
||||
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
|
||||
|
|
|
@ -35,9 +35,9 @@ POST_UNINSTALL = :
|
|||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
@USING_MAC_INTERPOSE_FALSE@am__append_1 = interception
|
||||
@LIBBACKTRACE_SUPPORTED_TRUE@am__append_2 = libbacktrace
|
||||
@TSAN_SUPPORTED_TRUE@am__append_3 = tsan
|
||||
@SANITIZER_SUPPORTED_TRUE@@USING_MAC_INTERPOSE_FALSE@am__append_1 = interception
|
||||
@LIBBACKTRACE_SUPPORTED_TRUE@@SANITIZER_SUPPORTED_TRUE@am__append_2 = libbacktrace
|
||||
@SANITIZER_SUPPORTED_TRUE@@TSAN_SUPPORTED_TRUE@am__append_3 = tsan
|
||||
subdir = .
|
||||
DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/configure $(am__configure_deps) \
|
||||
|
@ -250,8 +250,9 @@ top_build_prefix = @top_build_prefix@
|
|||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
ACLOCAL_AMFLAGS = -I .. -I ../config
|
||||
SUBDIRS = sanitizer_common $(am__append_1) $(am__append_2) lsan asan \
|
||||
ubsan $(am__append_3)
|
||||
@SANITIZER_SUPPORTED_TRUE@SUBDIRS = sanitizer_common $(am__append_1) \
|
||||
@SANITIZER_SUPPORTED_TRUE@ $(am__append_2) lsan asan ubsan \
|
||||
@SANITIZER_SUPPORTED_TRUE@ $(am__append_3)
|
||||
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
|
||||
|
||||
# Work around what appears to be a GNU make bug handling MAKEFLAGS
|
||||
|
|
51
libsanitizer/configure
vendored
51
libsanitizer/configure
vendored
|
@ -612,6 +612,8 @@ ALLOC_FILE
|
|||
VIEW_FILE
|
||||
BACKTRACE_SUPPORTED
|
||||
FORMAT_FILE
|
||||
SANITIZER_SUPPORTED_FALSE
|
||||
SANITIZER_SUPPORTED_TRUE
|
||||
USING_MAC_INTERPOSE_FALSE
|
||||
USING_MAC_INTERPOSE_TRUE
|
||||
link_liblsan
|
||||
|
@ -12017,7 +12019,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 12020 "configure"
|
||||
#line 12022 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -12123,7 +12125,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 12126 "configure"
|
||||
#line 12128 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -15586,6 +15588,47 @@ fi
|
|||
|
||||
backtrace_supported=yes
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for necessary platform features" >&5
|
||||
$as_echo_n "checking for necessary platform features... " >&6; }
|
||||
case "$target" in
|
||||
*-*-linux*)
|
||||
# Some old Linux distributions miss required syscalls.
|
||||
sanitizer_supported=no
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <sys/syscall.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
syscall (__NR_gettid);
|
||||
syscall (__NR_futex);
|
||||
syscall (__NR_exit_group);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
sanitizer_supported=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
;;
|
||||
*)
|
||||
sanitizer_supported=yes
|
||||
;;
|
||||
esac
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sanitizer_supported" >&5
|
||||
$as_echo "$sanitizer_supported" >&6; }
|
||||
if test "$sanitizer_supported" = yes; then
|
||||
SANITIZER_SUPPORTED_TRUE=
|
||||
SANITIZER_SUPPORTED_FALSE='#'
|
||||
else
|
||||
SANITIZER_SUPPORTED_TRUE='#'
|
||||
SANITIZER_SUPPORTED_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
# Test for __sync support.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking __sync extensions" >&5
|
||||
$as_echo_n "checking __sync extensions... " >&6; }
|
||||
|
@ -16456,6 +16499,10 @@ if test -z "${USING_MAC_INTERPOSE_TRUE}" && test -z "${USING_MAC_INTERPOSE_FALSE
|
|||
as_fn_error "conditional \"USING_MAC_INTERPOSE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${SANITIZER_SUPPORTED_TRUE}" && test -z "${SANITIZER_SUPPORTED_FALSE}"; then
|
||||
as_fn_error "conditional \"SANITIZER_SUPPORTED\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${LIBBACKTRACE_SUPPORTED_TRUE}" && test -z "${LIBBACKTRACE_SUPPORTED_FALSE}"; then
|
||||
as_fn_error "conditional \"LIBBACKTRACE_SUPPORTED\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
|
|
@ -132,6 +132,24 @@ AM_CONDITIONAL(USING_MAC_INTERPOSE, $MAC_INTERPOSE)
|
|||
|
||||
backtrace_supported=yes
|
||||
|
||||
AC_MSG_CHECKING([for necessary platform features])
|
||||
case "$target" in
|
||||
*-*-linux*)
|
||||
# Some old Linux distributions miss required syscalls.
|
||||
sanitizer_supported=no
|
||||
AC_TRY_COMPILE([#include <sys/syscall.h>],[
|
||||
syscall (__NR_gettid);
|
||||
syscall (__NR_futex);
|
||||
syscall (__NR_exit_group);
|
||||
], [sanitizer_supported=yes])
|
||||
;;
|
||||
*)
|
||||
sanitizer_supported=yes
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($sanitizer_supported)
|
||||
AM_CONDITIONAL(SANITIZER_SUPPORTED, test "$sanitizer_supported" = yes)
|
||||
|
||||
# Test for __sync support.
|
||||
AC_CACHE_CHECK([__sync extensions],
|
||||
[libsanitizer_cv_sys_sync],
|
||||
|
|
Loading…
Add table
Reference in a new issue