summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2010-05-23 13:40:00 +0000
committerFabian Groffen <grobian@gentoo.org>2010-05-23 13:40:00 +0000
commit379eebe20da76c15af36e47b3dff39508cc50f5c (patch)
tree68d07b7213f2204b215163fa16d5dd1021c87fa8 /sys-devel
parentx86 stable wrt security bug #317615 (diff)
downloadgentoo-2-379eebe20da76c15af36e47b3dff39508cc50f5c.tar.gz
gentoo-2-379eebe20da76c15af36e47b3dff39508cc50f5c.tar.bz2
gentoo-2-379eebe20da76c15af36e47b3dff39508cc50f5c.zip
Fix compilation on Darwin 9, disable sourcing of global /etc/gdb.conf
(Portage version: 2.2.00.15842-prefix/cvs/Darwin powerpc)
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gdb-apple/ChangeLog14
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch19
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1461-dyld-info.patch22
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch23
-rw-r--r--sys-devel/gdb-apple/gdb-apple-1461.ebuild5
5 files changed, 62 insertions, 21 deletions
diff --git a/sys-devel/gdb-apple/ChangeLog b/sys-devel/gdb-apple/ChangeLog
index 39dc2634c479..8eff0537dd99 100644
--- a/sys-devel/gdb-apple/ChangeLog
+++ b/sys-devel/gdb-apple/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for sys-devel/gdb-apple
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb-apple/ChangeLog,v 1.8 2010/05/21 16:03:55 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb-apple/ChangeLog,v 1.9 2010/05/23 13:40:00 grobian Exp $
+
+ 23 May 2010; Fabian Groffen <grobian@gentoo.org> gdb-apple-1461.ebuild,
+ +files/gdb-apple-no-global-gdbinit.patch:
+ Add patch to disable the Apple local modification to source /etc/gdb.conf
+ on startup. This is mainly annoying because it contains 'set history save
+ on', which results in a .gdb_history file in each and every working
+ directory you run gdb from.
+
+ 23 May 2010; Fabian Groffen <grobian@gentoo.org> gdb-apple-1461.ebuild,
+ files/gdb-apple-1461-darwin8.patch, +files/gdb-apple-1461-dyld-info.patch:
+ Split off dyld-info part of darwin8 patch, since it is necessary for
+ darwin9 too
*gdb-apple-1461 (21 May 2010)
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch b/sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch
index 93aded6e2e8b..40ef761e8f70 100644
--- a/sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch
+++ b/sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch
@@ -1,22 +1,3 @@
---- gdb-1461.2/src/gdb/macosx/macosx-nat-dyld.c
-+++ gdb-1461.2/src/gdb/macosx/macosx-nat-dyld.c
-@@ -731,7 +731,7 @@
- {
- #if !defined (TASK_DYLD_INFO) || !defined (NM_NEXTSTEP)
- return 0;
--#endif
-+#else
-
- if (target_is_remote () || value == NULL)
- return 0;
-@@ -791,6 +791,7 @@
- }
- #endif /* NM_NEXTSTEP */
- return 0;
-+#endif
- }
-
- /* Searches the target address space for dyld itself, returning it in
--- gdb-1461.2/src/gdb/macosx/macosx-nat-inferior.c
+++ gdb-1461.2/src/gdb/macosx/macosx-nat-inferior.c
@@ -60,13 +60,17 @@
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1461-dyld-info.patch b/sys-devel/gdb-apple/files/gdb-apple-1461-dyld-info.patch
new file mode 100644
index 000000000000..75b910432278
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-1461-dyld-info.patch
@@ -0,0 +1,22 @@
+If dyld-info is not available, don't try to compile unreachable code
+using it either.
+
+--- gdb-1461.2/src/gdb/macosx/macosx-nat-dyld.c
++++ gdb-1461.2/src/gdb/macosx/macosx-nat-dyld.c
+@@ -731,7 +731,7 @@
+ {
+ #if !defined (TASK_DYLD_INFO) || !defined (NM_NEXTSTEP)
+ return 0;
+-#endif
++#else
+
+ if (target_is_remote () || value == NULL)
+ return 0;
+@@ -791,6 +791,7 @@
+ }
+ #endif /* NM_NEXTSTEP */
+ return 0;
++#endif
+ }
+
+ /* Searches the target address space for dyld itself, returning it in
diff --git a/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch b/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch
new file mode 100644
index 000000000000..0c132ec5b384
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch
@@ -0,0 +1,23 @@
+Sourcing /etc/gdb.conf is annoying mainly because Apple put
+ set history save on
+in there, which means everywhere you run it, you end up with a
+.gdb_history file.
+
+--- src/gdb/main.c
++++ src/gdb/main.c
+@@ -675,6 +675,7 @@
+ memset (&cwdbuf, 0, sizeof (struct stat));
+ /* APPLE LOCAL end move inits up */
+ /* APPLE LOCAL begin global gdbinit */
++#ifdef WANT_GLOBAL_GDBINIT
+ memset (&globalbuf, 0, sizeof (struct stat));
+ stat (gdbinit_global, &globalbuf);
+ if (!inhibit_gdbinit)
+@@ -683,6 +684,7 @@
+ source_file (gdbinit_global, 0);
+ }
+ do_cleanups (ALL_CLEANUPS);
++#endif
+ /* APPLE LOCAL end global gdbinit */
+
+ /* APPLE LOCAL: Set the $_Xcode convenience variable at '0' before sourcing
diff --git a/sys-devel/gdb-apple/gdb-apple-1461.ebuild b/sys-devel/gdb-apple/gdb-apple-1461.ebuild
index 4e45db0f5af0..3c95f63bfad0 100644
--- a/sys-devel/gdb-apple/gdb-apple-1461.ebuild
+++ b/sys-devel/gdb-apple/gdb-apple-1461.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb-apple/gdb-apple-1461.ebuild,v 1.1 2010/05/21 16:03:55 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb-apple/gdb-apple-1461.ebuild,v 1.2 2010/05/23 13:40:00 grobian Exp $
EAPI="3"
@@ -26,7 +26,9 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/gdb-${APPLE_PV}/src
src_prepare() {
+ epatch "${FILESDIR}"/${PN}-no-global-gdbinit.patch
epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ epatch "${FILESDIR}"/${P}-dyld-info.patch
[[ ${CHOST} == *-darwin8 ]] && epatch "${FILESDIR}"/${P}-darwin8.patch
# for FSF gcc / gcc-apple:42
@@ -37,6 +39,7 @@ src_configure() {
replace-flags -O? -O2
econf \
--disable-werror \
+ --disable-debug-symbols-framework \
$(use_enable nls) \
|| die
}