Gentoo Archives: gentoo-commits

From: "Alistair Bush (ali_bush)" <ali_bush@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/mono-debugger/files: mono-debugger-2.8-system-bfd.patch
Date: Sat, 09 Oct 2010 21:03:21
Message-Id: 20101009200525.CCFB92004E@flycatcher.gentoo.org
1 ali_bush 10/10/09 20:05:25
2
3 Added: mono-debugger-2.8-system-bfd.patch
4 Log:
5 Version Bump.
6
7 (Portage version: 2.1.9.14/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 dev-util/mono-debugger/files/mono-debugger-2.8-system-bfd.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/mono-debugger/files/mono-debugger-2.8-system-bfd.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/mono-debugger/files/mono-debugger-2.8-system-bfd.patch?rev=1.1&content-type=text/plain
14
15 Index: mono-debugger-2.8-system-bfd.patch
16 ===================================================================
17 diff --git a/configure.in b/configure.in
18 index c643e64..402be56 100644
19 --- a/configure.in
20 +++ b/configure.in
21 @@ -64,6 +64,18 @@ case "$host" in
22 esac
23 AC_MSG_RESULT(ok)
24
25 +AC_ARG_WITH([system-libbfd],
26 + AS_HELP_STRING([--with-system-libbfd], [Use the system copy of libbfd and libopcodes.]))
27 +
28 +AS_IF([test "x$with_system_libbfd" = "xyes"],
29 + [
30 + AC_CHECK_HEADERS([bfd.h], [], [AC_MSG_ERROR([Missing bfd.h header])])
31 + AC_CHECK_LIB([bfd], [bfd_init], [:], [AC_MSG_ERROR([Missing libbfd library])])
32 + AC_CHECK_LIB([opcodes], [init_disassemble_info], [:], [AC_MSG_ERROR([Missing libopcodes library])])
33 + ])
34 +
35 +AM_CONDITIONAL([SYSTEM_LIBBFD], [test "x$with_system_libbfd" = "xyes"])
36 +
37 AC_ARG_WITH(bfd-target,
38 [ --with-bfd-target Manually override the BFD target],
39 if test x$with_bfd_target != "x"; then
40 diff --git a/sysdeps/Makefile.am b/sysdeps/Makefile.am
41 index 017026f..f63c181 100644
42 --- a/sysdeps/Makefile.am
43 +++ b/sysdeps/Makefile.am
44 @@ -1 +1,5 @@
45 +if !SYSTEM_LIBBFD
46 SUBDIRS = bfd server
47 +else
48 +SUBDIRS = server
49 +endif
50 diff --git a/sysdeps/server/Makefile.am b/sysdeps/server/Makefile.am
51 index dad57ab..8e7ac68 100644
52 --- a/sysdeps/server/Makefile.am
53 +++ b/sysdeps/server/Makefile.am
54 @@ -6,10 +6,9 @@ libmonodebuggerbfdglue_la_SOURCES = \
55 bfdglue.c \
56 bfdglue.h
57
58 +if !SYSTEM_LIBBFD
59 libmonodebuggerbfdglue_la_LIBADD = \
60 ../../sysdeps/bfd/opcodes/libopcodes.la ../../sysdeps/bfd/libbfd.la
61 -libmonodebuggerbfdglue_la_LDFLAGS = \
62 - -no-undefined -module -export-dynamic -shared
63
64 libmonodebuggerbfdglue_la_CPPFLAGS = \
65 -I$(top_srcdir)/sysdeps/bfd \
66 @@ -17,6 +16,17 @@ libmonodebuggerbfdglue_la_CPPFLAGS = \
67 -I$(top_srcdir)/sysdeps/bfd/opcodes \
68 @SERVER_DEPENDENCIES_CFLAGS@ @server_cflags@
69
70 +else
71 +libmonodebuggerbfdglue_la_LIBADD =
72 +
73 +libmonodebuggerbfdglue_la_CPPFLAGS = -lopcodes -lbfd \
74 + @SERVER_DEPENDENCIES_CFLAGS@ @server_cflags@
75 +
76 +endif
77 +
78 +libmonodebuggerbfdglue_la_LDFLAGS = \
79 + -no-undefined -module -export-dynamic -shared
80 +
81 EXTRA_libmonodebuggerserver_la_SOURCES = \
82 i386-arch.c \
83 i386-arch.h \
84 diff --git a/sysdeps/server/bfdglue.c b/sysdeps/server/bfdglue.c
85 index 9a741ac..e2138e7 100644
86 --- a/sysdeps/server/bfdglue.c
87 +++ b/sysdeps/server/bfdglue.c
88 @@ -1,3 +1,5 @@
89 +#include <config.h>
90 +
91 #include <bfdglue.h>
92 #include <signal.h>
93 #include <string.h>
94 @@ -246,7 +248,11 @@ bfd_glue_get_errormsg (void)
95 guint32
96 bfd_glue_get_section_size (asection *p)
97 {
98 +#ifdef HAVE_ASECTION_RAWSIZE
99 + return p->rawsize ? p->rawsize : p->size;
100 +#else
101 return p->_raw_size;
102 +#endif
103 }
104
105 BfdGlueSectionFlags
106 @@ -350,4 +356,4 @@ guint64
107 bfd_glue_get_start_address (bfd *abfd)
108 {
109 return bfd_get_start_address (abfd);
110 -}
111 \ No newline at end of file
112 +}