[ltrace/f17] Look for __cxa_demangle in libstdc++ as well, fix test case - Resolves: #827422

Petr Machata pmachata at fedoraproject.org
Fri Jun 1 18:02:54 UTC 2012


commit d4035c47a0cbf9bd033adde5966c909b7bdfadaf
Author: Petr Machata <pmachata at redhat.com>
Date:   Fri Jun 1 20:01:33 2012 +0200

    Look for __cxa_demangle in libstdc++ as well, fix test case
    - Resolves: #827422

 ltrace-0.5-demangle.patch   |   58 --------
 ltrace-0.6.0-demangle.patch |  340 +++++++++++++++++++++++++++++++++++++++++++
 ltrace-0.6.0-selinux.patch  |    6 +-
 ltrace.spec                 |   13 +-
 4 files changed, 352 insertions(+), 65 deletions(-)
---
diff --git a/ltrace-0.6.0-demangle.patch b/ltrace-0.6.0-demangle.patch
new file mode 100644
index 0000000..28c6549
--- /dev/null
+++ b/ltrace-0.6.0-demangle.patch
@@ -0,0 +1,340 @@
+diff -urp ltrace-0.5/configure.ac ltrace-0.5-pm/configure.ac
+--- ltrace-0.5/configure.ac	2006-06-14 06:55:21.000000000 +0200
++++ ltrace-0.5-pm/configure.ac	2010-09-08 14:56:29.000000000 +0200
+@@ -82,6 +82,14 @@ AC_CHECK_LIB([supc++], [__cxa_demangle],
+ AC_SUBST(libsupcxx_LIBS)
+ 
+ 
++# HAVE_LIBSTDC__
++AC_CHECK_LIB([stdc++], [__cxa_demangle], [
++	AC_DEFINE([HAVE_LIBSTDC__], [1], [we have libstdc++])
++	libstdcxx_LIBS="-lstdc++"], [
++	libstdcxx_LIBS=""])
++AC_SUBST(libstdcxx_LIBS)
++
++
+ # HAVE_LIBUNWIND
+ AC_ARG_WITH(libunwind,
+   AS_HELP_STRING([--with-libunwind], [Use libunwind frame unwinding support]),
+diff -up ltrace-0.5/demangle.c\~ ltrace-0.5/demangle.c
+--- ltrace-0.5/demangle.c~	2006-02-20 22:48:07.000000000 +0100
++++ ltrace-0.5/demangle.c	2010-09-08 15:21:44.000000000 +0200
+@@ -28,9 +28,8 @@ static void my_demangle_dict_clear(void)
+ const char *
+ my_demangle(const char *function_name) {
+ 	const char *tmp, *fn_copy;
+-#if !defined HAVE_LIBIBERTY && defined HAVE_LIBSUPC__
++#ifdef USE_CXA_DEMANGLE
+ 	extern char *__cxa_demangle(const char *, char *, size_t *, int *);
+-	int status = 0;
+ #endif
+ 
+ 	debug(DEBUG_FUNCTION, "my_demangle(name=%s)", function_name);
+@@ -42,7 +42,8 @@ const char *my_demangle(const char *func
+ 		fn_copy = strdup(function_name);
+ #ifdef HAVE_LIBIBERTY
+ 		tmp = cplus_demangle(function_name, DMGL_ANSI | DMGL_PARAMS);
+-#elif defined HAVE_LIBSUPC__
++#elif defined USE_CXA_DEMANGLE
++		int status = 0;
+ 		tmp = __cxa_demangle(function_name, NULL, NULL, &status);
+ #endif
+ 		if (!tmp)
+diff --git a/testsuite/ltrace.minor/demangle.exp b/testsuite/ltrace.minor/demangle.exp
+index c2d3aeb..9dd7694 100644
+--- a/testsuite/ltrace.minor/demangle.exp
++++ b/testsuite/ltrace.minor/demangle.exp
+@@ -32,6 +32,9 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
+ } elseif [ regexp {Couldn't get .hash data} $exec_output ] {
+ 	fail "Couldn't get .hash data!"
+ 	return
++} elseif [ regexp {invalid option} $exec_output ] {
++	unsupported "Demangle support not compiled in."
++	return
+ }
+ 
+ # read function declarations from demangle.cpp and verify them in demangle.ltrace.
+diff -up ltrace-0.6.0/common.h\~ ltrace-0.6.0/common.h
+--- ltrace-0.6.0/common.h~	2011-02-14 16:48:25.000000000 +0100
++++ ltrace-0.6.0/common.h	2012-06-01 18:12:55.119200197 +0200
+@@ -14,7 +14,10 @@
+ #include "ltrace-elf.h"
+ #include "read_config_file.h"
+ 
+-#if defined HAVE_LIBIBERTY || defined HAVE_LIBSUPC__
++#if defined HAVE_LIBSUPC__ || defined HAVE_LIBSTDC__
++# define USE_CXA_DEMANGLE
++#endif
++#if defined HAVE_LIBIBERTY || defined USE_CXA_DEMANGLE
+ # define USE_DEMANGLE
+ #endif
+ 
+diff -urp ltrace-0.6.0-pm/config.h.in ltrace-0.6.0/config.h.in
+--- ltrace-0.6.0-pm/config.h.in	2012-06-01 18:22:23.885160252 +0200
++++ ltrace-0.6.0/config.h.in	2012-06-01 18:23:01.000000000 +0200
+@@ -48,6 +48,9 @@
+ /* we have libiberty */
+ #undef HAVE_LIBIBERTY
+ 
++/* we have libstdc++ */
++#undef HAVE_LIBSTDC__
++
+ /* we have libsupc++ */
+ #undef HAVE_LIBSUPC__
+ 
+diff -urp ltrace-0.6.0-pm/configure ltrace-0.6.0/configure
+--- ltrace-0.6.0-pm/configure	2012-06-01 18:22:23.882160233 +0200
++++ ltrace-0.6.0/configure	2012-06-01 18:23:01.657397968 +0200
+@@ -616,6 +624,7 @@ LIBOBJS
+ libunwind_arch_LIBS
+ libunwind_ptrace_LIBS
+ libunwind_LIBS
++libstdcxx_LIBS
+ libsupcxx_LIBS
+ liberty_LIBS
+ MAINT
+@@ -11029,6 +11690,57 @@ fi
+ 
+ 
+ 
++# HAVE_LIBSTDC__
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cxa_demangle in -lstdc++" >&5
++$as_echo_n "checking for __cxa_demangle in -lstdc++... " >&6; }
++if ${ac_cv_lib_stdcpp___cxa_demangle+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lstdc++  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char __cxa_demangle ();
++int
++main ()
++{
++return __cxa_demangle ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_stdcpp___cxa_demangle=yes
++else
++  ac_cv_lib_stdcpp___cxa_demangle=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdcpp___cxa_demangle" >&5
++$as_echo "$ac_cv_lib_stdcpp___cxa_demangle" >&6; }
++if test "x$ac_cv_lib_stdcpp___cxa_demangle" = xyes; then :
++
++
++$as_echo "#define HAVE_LIBSTDC__ 1" >>confdefs.h
++
++	libstdcxx_LIBS="-lstdc++"
++else
++
++	libstdcxx_LIBS=""
++fi
++
++
++
++
+ # HAVE_LIBUNWIND
+ 
+ # Check whether --with-libunwind was given.
+diff -urp ltrace-0.6.0-pm/Makefile.in ltrace-0.6.0/Makefile.in
+--- ltrace-0.6.0-pm/Makefile.in	2011-02-14 17:01:20.000000000 +0100
++++ ltrace-0.6.0/Makefile.in	2012-06-01 18:23:03.130407239 +0200
+@@ -267,6 +270,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/linux-gnu/alpha/Makefile.in ltrace-0.6.0/sysdeps/linux-gnu/alpha/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/linux-gnu/alpha/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/linux-gnu/alpha/Makefile.in	2012-06-01 18:23:02.547403569 +0200
+@@ -171,6 +174,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/linux-gnu/arm/Makefile.in ltrace-0.6.0/sysdeps/linux-gnu/arm/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/linux-gnu/arm/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/linux-gnu/arm/Makefile.in	2012-06-01 18:23:02.594403865 +0200
+@@ -171,6 +174,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/linux-gnu/i386/Makefile.in ltrace-0.6.0/sysdeps/linux-gnu/i386/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/linux-gnu/i386/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/linux-gnu/i386/Makefile.in	2012-06-01 18:23:02.637404136 +0200
+@@ -171,6 +174,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/linux-gnu/ia64/Makefile.in ltrace-0.6.0/sysdeps/linux-gnu/ia64/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/linux-gnu/ia64/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/linux-gnu/ia64/Makefile.in	2012-06-01 18:23:02.680404406 +0200
+@@ -171,6 +174,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/linux-gnu/m68k/Makefile.in ltrace-0.6.0/sysdeps/linux-gnu/m68k/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/linux-gnu/m68k/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/linux-gnu/m68k/Makefile.in	2012-06-01 18:23:02.721404665 +0200
+@@ -171,6 +174,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/linux-gnu/Makefile.in ltrace-0.6.0/sysdeps/linux-gnu/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/linux-gnu/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/linux-gnu/Makefile.in	2012-06-01 18:23:02.505403305 +0200
+@@ -208,6 +211,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/linux-gnu/mipsel/Makefile.in ltrace-0.6.0/sysdeps/linux-gnu/mipsel/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/linux-gnu/mipsel/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/linux-gnu/mipsel/Makefile.in	2012-06-01 18:23:02.764404935 +0200
+@@ -171,6 +174,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/linux-gnu/ppc/Makefile.in ltrace-0.6.0/sysdeps/linux-gnu/ppc/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/linux-gnu/ppc/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/linux-gnu/ppc/Makefile.in	2012-06-01 18:23:02.808405212 +0200
+@@ -171,6 +174,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/linux-gnu/s390/Makefile.in ltrace-0.6.0/sysdeps/linux-gnu/s390/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/linux-gnu/s390/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/linux-gnu/s390/Makefile.in	2012-06-01 18:23:02.850405476 +0200
+@@ -171,6 +174,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/linux-gnu/sparc/Makefile.in ltrace-0.6.0/sysdeps/linux-gnu/sparc/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/linux-gnu/sparc/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/linux-gnu/sparc/Makefile.in	2012-06-01 18:23:02.891405735 +0200
+@@ -171,6 +174,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/linux-gnu/x86_64/Makefile.in ltrace-0.6.0/sysdeps/linux-gnu/x86_64/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/linux-gnu/x86_64/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/linux-gnu/x86_64/Makefile.in	2012-06-01 18:23:02.934406004 +0200
+@@ -171,6 +174,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/sysdeps/Makefile.in ltrace-0.6.0/sysdeps/Makefile.in
+--- ltrace-0.6.0-pm/sysdeps/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/sysdeps/Makefile.in	2012-06-01 18:23:02.457403003 +0200
+@@ -189,6 +192,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/testsuite/ltrace.main/Makefile.in ltrace-0.6.0/testsuite/ltrace.main/Makefile.in
+--- ltrace-0.6.0-pm/testsuite/ltrace.main/Makefile.in	2011-02-14 17:01:20.000000000 +0100
++++ ltrace-0.6.0/testsuite/ltrace.main/Makefile.in	2012-06-01 18:23:03.005406452 +0200
+@@ -164,6 +167,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/testsuite/ltrace.minor/Makefile.in ltrace-0.6.0/testsuite/ltrace.minor/Makefile.in
+--- ltrace-0.6.0-pm/testsuite/ltrace.minor/Makefile.in	2011-02-14 17:01:20.000000000 +0100
++++ ltrace-0.6.0/testsuite/ltrace.minor/Makefile.in	2012-06-01 18:23:03.035406642 +0200
+@@ -164,6 +167,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/testsuite/ltrace.torture/Makefile.in ltrace-0.6.0/testsuite/ltrace.torture/Makefile.in
+--- ltrace-0.6.0-pm/testsuite/ltrace.torture/Makefile.in	2011-02-14 17:01:20.000000000 +0100
++++ ltrace-0.6.0/testsuite/ltrace.torture/Makefile.in	2012-06-01 18:23:03.066406835 +0200
+@@ -164,6 +167,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
+diff -urp ltrace-0.6.0-pm/testsuite/Makefile.in ltrace-0.6.0/testsuite/Makefile.in
+--- ltrace-0.6.0-pm/testsuite/Makefile.in	2011-02-14 17:01:19.000000000 +0100
++++ ltrace-0.6.0/testsuite/Makefile.in	2012-06-01 18:23:02.974406256 +0200
+@@ -207,6 +210,7 @@ libdir = @libdir@
+ libelf_LD_LIBRARY_PATH = @libelf_LD_LIBRARY_PATH@
+ liberty_LIBS = @liberty_LIBS@
+ libexecdir = @libexecdir@
++libstdcxx_LIBS = @libstdcxx_LIBS@
+ libsupcxx_LIBS = @libsupcxx_LIBS@
+ libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
+ libunwind_LIBS = @libunwind_LIBS@
diff --git a/ltrace-0.6.0-selinux.patch b/ltrace-0.6.0-selinux.patch
index 4b85e22..8f2c380 100644
--- a/ltrace-0.6.0-selinux.patch
+++ b/ltrace-0.6.0-selinux.patch
@@ -28,7 +28,7 @@ index 7fcfda5..42d6158 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -82,6 +82,11 @@ AC_CHECK_LIB([supc++], [__cxa_demangle], [
- AC_SUBST(libsupcxx_LIBS)
+ AC_SUBST(libstdcxx_LIBS)
  
  
 +dnl Check security_get_boolean_active availability.
@@ -197,8 +197,8 @@ diff -up ./config.h.in~ ./config.h.in
 +/* Define to 1 if you have the `selinux' library (-lselinux). */
 +#undef HAVE_LIBSELINUX
 +
- /* we have libsupc++ */
- #undef HAVE_LIBSUPC__
+ /* we have libstdc++ */
+ #undef HAVE_LIBSTDC__
  
 @@ -72,6 +75,9 @@
  /* Define to 1 if you have the `rmdir' function. */
diff --git a/ltrace.spec b/ltrace.spec
index c6d9e97..e69a834 100644
--- a/ltrace.spec
+++ b/ltrace.spec
@@ -1,7 +1,7 @@
 Summary: Tracks runtime library calls from dynamically linked executables
 Name: ltrace
 Version: 0.6.0
-Release: 11%{?dist}
+Release: 12%{?dist}
 URL: http://ltrace.alioth.debian.org/
 License: GPLv2+
 Group: Development/Debuggers
@@ -17,7 +17,7 @@ Source: %{name}-%{version}.tar.bz2
 
 Patch1: ltrace-0.5-ia64-sigill.patch
 Patch2: ltrace-0.6.0-exec-stripped.patch
-Patch3: ltrace-0.5-demangle.patch
+Patch3: ltrace-0.6.0-demangle.patch
 Patch4: ltrace-0.5-etc-memmove.patch
 Patch5: ltrace-0.6.0-return-string-n.patch
 Patch6: ltrace-0.6.0-threads.patch
@@ -46,7 +46,7 @@ execution of processes.
 %setup -q
 %patch1 -p1
 %patch2 -p1
-#%patch3 -p1
+%patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
@@ -60,7 +60,6 @@ execution of processes.
 %patch14 -p1
 %patch15 -p1
 %patch16 -p1
-sed -i -e 's/-o root -g root//' Makefile.in
 
 %build
 # This ugly hack is necessary to build and link files for correct
@@ -88,6 +87,12 @@ echo ====================TESTING END=====================
 %config(noreplace) %{_sysconfdir}/ltrace.conf
 
 %changelog
+* Fri Jun  1 2012 Petr Machata <pmachata at redhat.com> - 0.6.0-12
+- Look for __cxa_demangle in libstdc++ as well
+- Demangle test case should report it's unsupported if demangling
+  support isn't compiled in
+- Resolves: #827422
+
 * Thu May  3 2012 Petr Machata <pmachata at redhat.com> - 0.6.0-11
 - Check -n argument for validity (ltrace-0.6.0-dash-n.patch)
 - Resolves: #818529


More information about the scm-commits mailing list