ports/164521: [MAINTAINER] Update gdb to 7.4
Luca Pizzamiglio
luca.pizzamiglio at gmail.com
Thu Jan 26 16:20:10 UTC 2012
>Number: 164521
>Category: ports
>Synopsis: [MAINTAINER] Update gdb to 7.4
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 26 16:20:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Luca Pizzamiglio
>Release: FreeBSD 8.2-STABLE
>Organization:
>Environment:
FreeBSD pizzamig 8.2-STABLE FreeBSD 8.2-STABLE #4: Fri Sep 30 11:07:25 CEST 2011 root at pizzamig:/usr/obj/usr/src/sys/PIZZAMIG i386
>Description:
This patch:
* updates the port devel/gdb to the version 7.4
* adds devel/readline as mandatory dependency (the previous version is not compatible anymore)
* fixes a problem with multihread applications (thanks Lee Thomas)
* fixes a misconfiguration issue if the devel/binutils port is installed
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -Nru devel/gdb.orig/Makefile devel/gdb/Makefile
--- devel/gdb.orig/Makefile 2011-11-18 07:34:51.000000000 +0100
+++ devel/gdb/Makefile 2012-01-25 18:40:17.000000000 +0100
@@ -7,8 +7,7 @@
#
PORTNAME= gdb
-PORTVERSION= 7.3.1
-PORTREVISION= 1
+PORTVERSION= 7.4
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:S,$,:gdb,}
MASTER_SITE_SUBDIR=gdb/:gdb
@@ -40,6 +39,11 @@
ONLY_FOR_ARCHS= i386 amd64 # untested elsewhere, might work
+# Forcing to use the readline.6
+LIB_DEPENDS+= readline.6:${PORTSDIR}/devel/readline
+CFLAGS+= -isystem ${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
OPTIONS= DEBUG "Build with debugging symbols" off \
EXPAT "Enable XML parsing for metadata" off \
PYTHON "Enable Python support" off \
@@ -70,13 +74,6 @@
CONFIGURE_ARGS+= --without-python
.endif
-# XXX: add OSVERSION check after readline is removed from base
-.if exists(${LOCALBASE}/lib/libreadline.so)
-LIB_DEPENDS+= readline.6:${PORTSDIR}/devel/readline
-CFLAGS+= -isystem ${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-.endif
-
.if ${ARCH} == "amd64"
CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
.endif
diff -Nru devel/gdb.orig/distinfo devel/gdb/distinfo
--- devel/gdb.orig/distinfo 2011-09-26 15:53:11.000000000 +0200
+++ devel/gdb/distinfo 2012-01-24 16:34:32.000000000 +0100
@@ -1,2 +1,2 @@
-SHA256 (gdb-7.3.1.tar.bz2) = 6d7bff716fde98d03866a1b747c0929ee7dba49bca13e01d975e0b0fa9b33a28
-SIZE (gdb-7.3.1.tar.bz2) = 19500995
+SHA256 (gdb-7.4.tar.bz2) = de7e2db7f0475eca7f9ffa9251abaddd3d37e0eed0b3759f71abfd810a3fd20f
+SIZE (gdb-7.4.tar.bz2) = 20614020
diff -Nru devel/gdb.orig/files/fbsd-threads.c devel/gdb/files/fbsd-threads.c
--- devel/gdb.orig/files/fbsd-threads.c 2011-11-06 19:12:32.000000000 +0100
+++ devel/gdb/files/fbsd-threads.c 2012-01-26 12:34:00.000000000 +0100
@@ -358,11 +358,8 @@
/* Set the process wide mask saying which events we're interested in. */
td_event_emptyset (&events);
-
-/* XXX PR ports/162093
- * td_event_addset (&events, TD_CREATE);
- * td_event_addset (&events, TD_DEATH);
-*/
+ td_event_addset (&events, TD_CREATE);
+ td_event_addset (&events, TD_DEATH);
err = td_ta_set_event_p (thread_agent, &events);
if (err != TD_OK)
@@ -377,7 +374,6 @@
td_create_bp_addr = 0;
td_death_bp_addr = 0;
-#if 0
/* Set up the thread creation event. */
err = enable_thread_event (thread_agent, TD_CREATE, &td_create_bp_addr);
if (err != TD_OK)
@@ -395,7 +391,6 @@
thread_db_err_str (err));
return;
}
-#endif
}
static void
@@ -738,11 +733,15 @@
if (ourstatus->value.sig == TARGET_SIGNAL_TRAP)
check_event(ret);
/* this is a hack, if an event won't cause gdb to stop, for example,
- SIGARLM, gdb resumes the process immediatly without setting
+ SIGALRM, gdb resumes the process immediatly without setting
inferior_ptid to the new thread returned here, this is a bug
because inferior_ptid may already not exist there, and passing
- a none existing thread to fbsd_thread_resume causes error. */
- if (!fbsd_thread_alive (ops, inferior_ptid))
+ a non-existing thread to fbsd_thread_resume causes error. However,
+ if the exiting thread is the currently selected thread,
+ then that is handled later in handle_inferior_event(), and we must
+ not delete the currently selected thread.
+ */
+ if (!fbsd_thread_alive (ops, inferior_ptid) && !ptid_equal(inferior_ptid, ret))
{
delete_thread (inferior_ptid);
inferior_ptid = ret;
diff -Nru devel/gdb.orig/files/patch-bfd-configure devel/gdb/files/patch-bfd-configure
--- devel/gdb.orig/files/patch-bfd-configure 1970-01-01 01:00:00.000000000 +0100
+++ devel/gdb/files/patch-bfd-configure 2012-01-24 17:22:07.000000000 +0100
@@ -0,0 +1,17 @@
+--- bfd/configure.orig 2011-03-28 13:18:25.000000000 +0200
++++ bfd/configure 2012-01-12 16:58:05.000000000 +0100
+@@ -12177,7 +12177,13 @@
+
+ # Enable -Werror by default when using gcc
+ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+- ERROR_ON_WARNING=yes
++ if test "${CC}" = clang ; then
++ echo "clang compiler - disabling -Werror"
++ ERROR_ON_WARNING=no
++ else
++ echo "gcc compiler - enabling -Werror"
++ ERROR_ON_WARNING=yes
++ fi
+ fi
+
+ NO_WERROR=
diff -Nru devel/gdb.orig/files/patch-gdb-Makefile.in devel/gdb/files/patch-gdb-Makefile.in
--- devel/gdb.orig/files/patch-gdb-Makefile.in 2011-09-26 15:53:11.000000000 +0200
+++ devel/gdb/files/patch-gdb-Makefile.in 2012-01-24 16:45:56.000000000 +0100
@@ -9,12 +9,12 @@
nbsd-tdep.o obsd-tdep.o \
sol2-tdep.o \
solib-frv.o solib-irix.o solib-svr4.o solib-target.o \
-@@ -768,7 +768,7 @@
+@@ -782,7 +782,7 @@
gnulib/stdint.in.h remote.h gdb.h sparc-nat.h \
- gdbthread.h dwarf2-frame.h nbsd-nat.h dcache.h \
+ gdbthread.h dwarf2-frame.h dwarf2-frame-tailcall.h nbsd-nat.h dcache.h \
amd64-nat.h s390-tdep.h arm-linux-tdep.h exceptions.h macroscope.h \
--gdbarch.h bsd-uthread.h gdb_thread_db.h gdb_stat.h memory-map.h memrange.h \
-+gdbarch.h gdb_thread_db.h gdb_stat.h memory-map.h memrange.h \
+-gdbarch.h bsd-uthread.h gdb_stat.h memory-map.h memrange.h \
++gdbarch.h gdb_stat.h memory-map.h memrange.h \
mdebugread.h m88k-tdep.h stabsread.h hppa-linux-offsets.h linux-fork.h \
ser-unix.h inf-ptrace.h terminal.h ui-out.h frame-base.h \
f-lang.h dwarf2loc.h value.h sparc-tdep.h defs.h target-descriptions.h \
diff -Nru devel/gdb.orig/files/patch-gdb-configure devel/gdb/files/patch-gdb-configure
--- devel/gdb.orig/files/patch-gdb-configure 1970-01-01 01:00:00.000000000 +0100
+++ devel/gdb/files/patch-gdb-configure 2012-01-24 17:00:48.000000000 +0100
@@ -0,0 +1,11 @@
+--- gdb/configure.orig 2012-01-24 16:59:13.000000000 +0100
++++ gdb/configure 2012-01-24 16:59:40.000000000 +0100
+@@ -15294,7 +15294,7 @@
+ OLD_LDFLAGS=$LDFLAGS
+ OLD_LIBS=$LIBS
+ CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
+-LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
++LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
+ intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
+ # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
+ if test "$plugins" = "yes"; then
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list