Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 350482 Details for
Bug 470884
dev-libs/elfutils: build fails on uclibc
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Check if mtrace() is available and disable it if it is not.
0004-Check-for-mtrace-and-disable-if-not-available.patch (text/plain), 4.14 KB, created by
Anthony Basile
on 2013-06-09 01:32:22 UTC
(
hide
)
Description:
Check if mtrace() is available and disable it if it is not.
Filename:
MIME Type:
Creator:
Anthony Basile
Created:
2013-06-09 01:32:22 UTC
Size:
4.14 KB
patch
obsolete
>From 33f1c85059ee68e84c1d083a1fb02f9020bdbc97 Mon Sep 17 00:00:00 2001 >From: "Anthony G. Basile" <blueness@gentoo.org> >Date: Sat, 8 Jun 2013 20:28:03 -0400 >Subject: [PATCH 4/6] Check for mtrace and disable if not available > >mtrace() is a diagnostic function which sets up hooks for malloc >and friends, but it is not provided in uClibc. We check if it is >available, and if it is not, we disable it. > >Signed-off-by: Anthony G. Basile <blueness@gentoo.org> >--- > configure.ac | 3 +++ > src/addr2line.c | 4 ++++ > src/ar.c | 4 ++++ > src/ld.c | 4 ++++ > src/nm.c | 4 ++++ > src/objdump.c | 4 ++++ > src/ranlib.c | 4 ++++ > src/size.c | 4 ++++ > src/strip.c | 4 ++++ > src/unstrip.c | 4 ++++ > 10 files changed, 39 insertions(+), 0 deletions(-) > >diff --git a/configure.ac b/configure.ac >index 5966453..20fd3bc 100644 >--- a/configure.ac >+++ b/configure.ac >@@ -233,6 +233,9 @@ AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl > AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])]) > AM_CONDITIONAL(DEMANGLE, test "$ac_cv_lib_stdcpp___cxa_demangle" = yes) > >+dnl Check for mtrace support >+AC_CHECK_HEADER([mcheck.h]) >+ > dnl Check if we have argp available from our libc > AC_LINK_IFELSE( > [AC_LANG_PROGRAM( >diff --git a/src/addr2line.c b/src/addr2line.c >index c7e4629..d464bfd 100644 >--- a/src/addr2line.c >+++ b/src/addr2line.c >@@ -30,7 +30,11 @@ > #include <dwarf.h> > #include <libintl.h> > #include <locale.h> >+#ifdef HAVE_MCHECK_H > #include <mcheck.h> >+#else >+#define mtrace() >+#endif > #include <stdbool.h> > #include <stdio.h> > #include <stdio_ext.h> >diff --git a/src/ar.c b/src/ar.c >index 2d6ad60..f6d5823 100644 >--- a/src/ar.c >+++ b/src/ar.c >@@ -28,7 +28,11 @@ > #include <libintl.h> > #include <limits.h> > #include <locale.h> >+#ifdef HAVE_MCHECK_H > #include <mcheck.h> >+#else >+#define mtrace() >+#endif > #include <search.h> > #include <stdbool.h> > #include <stdlib.h> >diff --git a/src/ld.c b/src/ld.c >index 73e4f04..a70dd54 100644 >--- a/src/ld.c >+++ b/src/ld.c >@@ -26,7 +26,11 @@ > #include <libelf.h> > #include <libintl.h> > #include <locale.h> >+#ifdef HAVE_MCHECK_H > #include <mcheck.h> >+#else >+#define mtrace() >+#endif > #include <stdio.h> > #include <stdio_ext.h> > #include <stdlib.h> >diff --git a/src/nm.c b/src/nm.c >index 18c374a..7f2b569 100644 >--- a/src/nm.c >+++ b/src/nm.c >@@ -33,7 +33,11 @@ > #include <libdw.h> > #include <libintl.h> > #include <locale.h> >+#ifdef HAVE_MCHECK_H > #include <mcheck.h> >+#else >+#define mtrace() >+#endif > #include <obstack.h> > #include <search.h> > #include <stdbool.h> >diff --git a/src/objdump.c b/src/objdump.c >index ebad25d..b1af2a5 100644 >--- a/src/objdump.c >+++ b/src/objdump.c >@@ -26,7 +26,11 @@ > #include <inttypes.h> > #include <libintl.h> > #include <locale.h> >+#ifdef HAVE_MCHECK_H > #include <mcheck.h> >+#else >+#define mtrace() >+#endif > #include <stdbool.h> > #include <stdio.h> > #include <stdio_ext.h> >diff --git a/src/ranlib.c b/src/ranlib.c >index 8435fc1..f351514 100644 >--- a/src/ranlib.c >+++ b/src/ranlib.c >@@ -29,7 +29,11 @@ > #include <gelf.h> > #include <libintl.h> > #include <locale.h> >+#ifdef HAVE_MCHECK_H > #include <mcheck.h> >+#else >+#define mtrace() >+#endif > #include <obstack.h> > #include <stdlib.h> > #include <stdio.h> >diff --git a/src/size.c b/src/size.c >index dfa46b1..e169f18 100644 >--- a/src/size.c >+++ b/src/size.c >@@ -28,7 +28,11 @@ > #include <libelf.h> > #include <libintl.h> > #include <locale.h> >+#ifdef HAVE_MCHECK_H > #include <mcheck.h> >+#else >+#define mtrace() >+#endif > #include <stdbool.h> > #include <stdio.h> > #include <stdio_ext.h> >diff --git a/src/strip.c b/src/strip.c >index 05adc20..c4c1f35 100644 >--- a/src/strip.c >+++ b/src/strip.c >@@ -30,7 +30,11 @@ > #include <libelf.h> > #include <libintl.h> > #include <locale.h> >+#ifdef HAVE_MCHECK_H > #include <mcheck.h> >+#else >+#define mtrace() >+#endif > #include <stdbool.h> > #include <stdio.h> > #include <stdio_ext.h> >diff --git a/src/unstrip.c b/src/unstrip.c >index f6660a3..655c580 100644 >--- a/src/unstrip.c >+++ b/src/unstrip.c >@@ -36,7 +36,11 @@ > #include <fnmatch.h> > #include <libintl.h> > #include <locale.h> >+#ifdef HAVE_MCHECK_H > #include <mcheck.h> >+#else >+#define mtrace() >+#endif > #include <stdbool.h> > #include <stdio.h> > #include <stdio_ext.h> >-- >1.7.8.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 470884
:
348828
|
348830
|
348832
|
348908
|
349604
|
349608
|
350476
|
350478
|
350480
| 350482 |
350484
|
350486
|
376194
|
376196
|
376198
|
459426
|
459428
|
459430
|
459432
|
459434