]> git.saurik.com Git - bison.git/commitdiff
build: add Valgrind suppression file for GNU/Linux
authorAkim Demaille <akim@lrde.epita.fr>
Thu, 13 Jun 2013 14:08:33 +0000 (16:08 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Fri, 14 Jun 2013 07:58:12 +0000 (09:58 +0200)
* build-aux/linux-gnu.valgrind: New.
* build-aux/local.mk: Ship it.
* configure.ac: Use it.

build-aux/linux-gnu.valgrind [new file with mode: 0644]
build-aux/local.mk
configure.ac

diff --git a/build-aux/linux-gnu.valgrind b/build-aux/linux-gnu.valgrind
new file mode 100644 (file)
index 0000000..3130fbc
--- /dev/null
@@ -0,0 +1,16 @@
+# Linux seattle 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012
+# x86_64 GNU/Linux
+{
+   index
+   Memcheck:Cond
+   fun:index
+   fun:expand_dynamic_string_token
+   fun:_dl_map_object
+   fun:map_doit
+   fun:_dl_catch_error
+   fun:do_preload
+   fun:dl_main
+   fun:_dl_sysdep_start
+   fun:_dl_start
+   obj:/lib/ld-2.11.3.so
+}
index 8922ea5fec77274a29014aa383b292fd947c2a67..f92b3bd771a9b844d04062e60014008111ef786d 100644 (file)
@@ -16,6 +16,7 @@
 EXTRA_DIST +=                                   \
   build-aux/cross-options.pl                    \
   build-aux/darwin11.4.0.valgrind               \
 EXTRA_DIST +=                                   \
   build-aux/cross-options.pl                    \
   build-aux/darwin11.4.0.valgrind               \
+  build-aux/linux-gnu.valgrind                  \
   build-aux/move-if-change                      \
   build-aux/prev-version.txt                    \
   build-aux/update-b4-copyright
   build-aux/move-if-change                      \
   build-aux/prev-version.txt                    \
   build-aux/update-b4-copyright
index 734825afbb00af6f8c3c4970c7e35d719e37e98f..f7319a153d52f6c6f6bb53fe7fd98fd5684f75c9 100644 (file)
@@ -230,10 +230,16 @@ case $VALGRIND:$host_os in
   '':*) ;;
   *:darwin*)
     # See README-hacking.
   '':*) ;;
   *:darwin*)
     # See README-hacking.
-    # VALGRIND+=' --suppressions=$(abs_top_srcdir)/build-aux/darwin11.4.0.valgrind'
+    # VALGRIND+='-q --suppressions=$(abs_top_srcdir)/build-aux/darwin11.4.0.valgrind'
     VALGRIND=;;
   *:*)
     VALGRIND=;;
   *:*)
-    AC_SUBST([VALGRIND_PREBISON], ["$VALGRIND -q"]);;
+    suppfile=build-aux/$host_os.valgrind
+    if test -f "$srcdir/$suppfile"; then
+      VALGRIND="$VALGRIND --gen-suppressions=all"
+      VALGRIND="$VALGRIND --suppressions=\$(abs_top_srcdir)/$suppfile"
+    fi
+    AC_SUBST([VALGRIND_PREBISON], ["$VALGRIND -q"])
+    ;;
 esac
 
 AM_MISSING_PROG([AUTOM4TE], [autom4te])
 esac
 
 AM_MISSING_PROG([AUTOM4TE], [autom4te])