]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Makefile.am (AM_CXXFLAGS): Remove -Wno-variadic-macros.
authorJakub Jelinek <jakub@redhat.com>
Fri, 23 Nov 2012 00:31:54 +0000 (01:31 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 23 Nov 2012 00:31:54 +0000 (01:31 +0100)
* tsan/Makefile.am (AM_CXXFLAGS): Remove -Wno-variadic-macros.
* Makefile.am (SUBDIRS): Guard tsan addition with TSAN_SUPPORTED
automake conditional instead of !MULTISUBDIR32.
* configure.tgt: Set TSAN_SUPPORTED=yes for x86_64/i686-linux
for 64-bit multilib.
* configure.ac: Check for void * size, source in configure.tgt,
define TSAN_SUPPORTED conditional instead of MULTILIBDIR32.
* configure: Regenerated.
* Makefile.in: Regenerated.
* tsan/Makefile.in: Regenerated.

From-SVN: r193741

libsanitizer/ChangeLog
libsanitizer/Makefile.am
libsanitizer/Makefile.in
libsanitizer/configure
libsanitizer/configure.ac
libsanitizer/configure.tgt
libsanitizer/tsan/Makefile.am
libsanitizer/tsan/Makefile.in

index 3d6bde32c4937c0cc0e0b19d7e330480c64bc553..ce59f906aafef9473136d58796db169949fc6e8f 100644 (file)
@@ -1,3 +1,16 @@
+2012-11-23  Jakub Jelinek  <jakub@redhat.com>
+
+       * tsan/Makefile.am (AM_CXXFLAGS): Remove -Wno-variadic-macros.
+       * Makefile.am (SUBDIRS): Guard tsan addition with TSAN_SUPPORTED
+       automake conditional instead of !MULTISUBDIR32.
+       * configure.tgt: Set TSAN_SUPPORTED=yes for x86_64/i686-linux
+       for 64-bit multilib.
+       * configure.ac: Check for void * size, source in configure.tgt,
+       define TSAN_SUPPORTED conditional instead of MULTILIBDIR32.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+       * tsan/Makefile.in: Regenerated.
+
 2012-11-22  Wei Mi  <wmi@google.com>
 
        * tsan: New directory. Import tsan runtime from llvm.
index d2192b2d38f02987135e646b22d3eefc44c0bc4f..64d3d2eab9a3bf1ee968f76cae7c5a945d60fb59 100644 (file)
@@ -1,9 +1,9 @@
 ACLOCAL_AMFLAGS = -I .. -I ../config
 
-if MULTISUBDIR32 
-SUBDIRS = interception sanitizer_common asan 
-else
+if TSAN_SUPPORTED
 SUBDIRS = interception sanitizer_common asan tsan 
+else
+SUBDIRS = interception sanitizer_common asan 
 endif
 
 # Work around what appears to be a GNU make bug handling MAKEFLAGS
index 09eb6e2897afbfaf0c747c8e6bdfeb5b5a17a31e..21c27113c38d889caed3a5b687df670e03b9a361 100644 (file)
@@ -244,8 +244,8 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I .. -I ../config
-@MULTISUBDIR32_FALSE@SUBDIRS = interception sanitizer_common asan tsan 
-@MULTISUBDIR32_TRUE@SUBDIRS = interception sanitizer_common asan 
+@TSAN_SUPPORTED_FALSE@SUBDIRS = interception sanitizer_common asan 
+@TSAN_SUPPORTED_TRUE@SUBDIRS = interception sanitizer_common asan tsan 
 
 # Work around what appears to be a GNU make bug handling MAKEFLAGS
 # values defined in terms of make variables, as is the case for CC and
index 519b1db893256576329c188b51730951b8da6058..198a94d32724b19148c41fbdae69bc0434adc026 100755 (executable)
@@ -604,8 +604,8 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
-MULTISUBDIR32_FALSE
-MULTISUBDIR32_TRUE
+TSAN_SUPPORTED_FALSE
+TSAN_SUPPORTED_TRUE
 enable_static
 enable_shared
 CXXCPP
@@ -1878,6 +1878,184 @@ fi
   return $ac_retval
 
 } # ac_fn_cxx_try_link
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
+else
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+                       if test $ac_lo -le $ac_mid; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
+else
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+  fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_c_compute_int
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -10900,7 +11078,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10903 "configure"
+#line 11081 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11006,7 +11184,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11009 "configure"
+#line 11187 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14263,17 +14441,56 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if test "${ac_cv_sizeof_void_p+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_void_p" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (void *)
+See \`config.log' for more details." "$LINENO" 5; }; }
+   else
+     ac_cv_sizeof_void_p=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+
 if test "${multilib}" = "yes"; then
   multilib_arg="--enable-multilib"
 else
   multilib_arg=
 fi
- if test "x$with_multisubdir" = "x32"; then
-  MULTISUBDIR32_TRUE=
-  MULTISUBDIR32_FALSE='#'
+
+# Get target configury.
+unset TSAN_SUPPORTED
+. ${srcdir}/configure.tgt
+ if test "x$TSAN_SUPPORTED" = "xyes"; then
+  TSAN_SUPPORTED_TRUE=
+  TSAN_SUPPORTED_FALSE='#'
 else
-  MULTISUBDIR32_TRUE='#'
-  MULTISUBDIR32_FALSE=
+  TSAN_SUPPORTED_TRUE='#'
+  TSAN_SUPPORTED_FALSE=
 fi
 
 
@@ -14283,7 +14500,7 @@ ac_config_files="$ac_config_files Makefile"
 ac_config_files="$ac_config_files interception/Makefile sanitizer_common/Makefile asan/Makefile"
 
 
-if test "x$with_multisubdir" != "x32"; then
+if test "x$TSAN_SUPPORTED" = "xyes"; then
   ac_config_files="$ac_config_files tsan/Makefile"
 
 fi
@@ -14449,8 +14666,8 @@ if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
   as_fn_error "conditional \"am__fastdepCCAS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${MULTISUBDIR32_TRUE}" && test -z "${MULTISUBDIR32_FALSE}"; then
-  as_fn_error "conditional \"MULTISUBDIR32\" was never defined.
+if test -z "${TSAN_SUPPORTED_TRUE}" && test -z "${TSAN_SUPPORTED_FALSE}"; then
+  as_fn_error "conditional \"TSAN_SUPPORTED\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
index 0f9e185aa2a92c249e7befd22c2b91cdd744caa6..45183db609fe64ef7204f513a362f9c7c14d1e3b 100644 (file)
@@ -67,12 +67,18 @@ AM_PROG_LIBTOOL
 AC_SUBST(enable_shared)
 AC_SUBST(enable_static)
 
+AC_CHECK_SIZEOF([void *])
+
 if test "${multilib}" = "yes"; then
   multilib_arg="--enable-multilib"
 else
   multilib_arg=
 fi
-AM_CONDITIONAL(MULTISUBDIR32, [test "x$with_multisubdir" = "x32"])
+
+# Get target configury.
+unset TSAN_SUPPORTED
+. ${srcdir}/configure.tgt
+AM_CONDITIONAL(TSAN_SUPPORTED, [test "x$TSAN_SUPPORTED" = "xyes"])
 
 AC_CONFIG_FILES([Makefile])
 
@@ -89,7 +95,7 @@ _EOF
    AS_UNSET([ml_norecursion])
 ])
 
-if test "x$with_multisubdir" != "x32"; then
+if test "x$TSAN_SUPPORTED" = "xyes"; then
   AC_CONFIG_FILES(AC_FOREACH([DIR], [tsan], [DIR/Makefile ]), 
     [cat > vpsed$$ << \_EOF
 s!`test -f '$<' || echo '$(srcdir)/'`!!
index 988312ec95f5b4db57b6e559ce095b0689e22d00..1506a20dab151e7b2fc5c7d84d66009793c7a5f1 100644 (file)
 
 # Filter out unsupported systems.
 case "${target}" in
-  x86_64-*-linux* | i?86-*-linux* | sparc*-*-linux*)
+  x86_64-*-linux* | i?86-*-linux*)
+       if test x$ac_cv_sizeof_void_p = x8; then
+               TSAN_SUPPORTED=yes
+       fi
+       ;;
+  sparc*-*-linux*)
        ;;
   *)
        UNSUPPORTED=1
index 96b4fab8244f47f2424301f26b5256b1858ef9f5..a307502c97ae0f39a4d468b389bb866303ba9f2e 100644 (file)
@@ -1,7 +1,7 @@
 AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include
 
 DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long  -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -Wno-c99-extensions 
+AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long  -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros
 ACLOCAL_AMFLAGS = -I m4
 
 toolexeclib_LTLIBRARIES = libtsan.la
index 71439d601aaa051003edc0883e788c8b214b6b96..a893bccd5ef5651aa8ee0b1b2407eb9cc95ba142 100644 (file)
@@ -238,7 +238,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include
-AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long  -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -Wno-c99-extensions 
+AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long  -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros
 ACLOCAL_AMFLAGS = -I m4
 toolexeclib_LTLIBRARIES = libtsan.la
 tsan_files = \