- Remove the gdb/gdbtui binaries duplicity.

This commit is contained in:
Jan Kratochvil 2008-06-20 08:37:16 +00:00
parent dd1aa7b0b3
commit 666c0bad8d
3 changed files with 130 additions and 1 deletions

View File

@ -0,0 +1,88 @@
2008-06-18 Jan Kratochvil <jan.kratochvil@redhat.com>
* configure.ac (--enable-tui): AC_MSG_ERROR for explicit --enable-tui.
* configure: Regenerated.
--- ./gdb/configure.ac 9 Jun 2008 15:03:59 -0000 1.70
+++ ./gdb/configure.ac 18 Jun 2008 17:14:21 -0000
@@ -260,11 +260,11 @@ fi
AC_ARG_ENABLE(tui,
[ --enable-tui enable full-screen terminal user interface (TUI)],
[case $enableval in
- yes | no)
+ yes | no | auto)
;;
*)
AC_MSG_ERROR([bad value $enableval for --enable-tui]) ;;
- esac],enable_tui=yes)
+ esac],enable_tui=auto)
# Enable gdbtk.
AC_ARG_ENABLE(gdbtk,
@@ -1576,7 +1576,7 @@ AC_PATH_X
# Check whether we should enable the TUI, but only do so if we really
# can.
-if test x"$enable_tui" = xyes; then
+if test x"$enable_tui" != xno; then
if test -d $srcdir/tui; then
if test "$ac_cv_search_waddstr" != no; then
CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
@@ -1589,7 +1589,11 @@ if test x"$enable_tui" = xyes; then
CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
else
- AC_MSG_WARN([no enhanced curses library found; disabling TUI])
+ if test x"$enable_tui" = xyes; then
+ AC_MSG_ERROR([no enhanced curses library found; disable TUI])
+ else
+ AC_MSG_WARN([no enhanced curses library found; disabling TUI])
+ fi
fi
fi
fi
--- ./gdb/configure 9 Jun 2008 15:03:58 -0000 1.250
+++ ./gdb/configure 18 Jun 2008 17:14:12 -0000
@@ -7540,7 +7540,7 @@ fi
if test "${enable_tui+set}" = set; then
enableval="$enable_tui"
case $enableval in
- yes | no)
+ yes | no | auto)
;;
*)
{ { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tui" >&5
@@ -7548,7 +7548,7 @@ echo "$as_me: error: bad value $enableva
{ (exit 1); exit 1; }; } ;;
esac
else
- enable_tui=yes
+ enable_tui=auto
fi;
# Enable gdbtk.
@@ -28324,7 +28324,7 @@ fi
# Check whether we should enable the TUI, but only do so if we really
# can.
-if test x"$enable_tui" = xyes; then
+if test x"$enable_tui" != xno; then
if test -d $srcdir/tui; then
if test "$ac_cv_search_waddstr" != no; then
CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
@@ -28337,8 +28337,14 @@ if test x"$enable_tui" = xyes; then
CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
else
- { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
+ if test x"$enable_tui" = xyes; then
+ { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5
+echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
+ fi
fi
fi
fi

View File

@ -0,0 +1,24 @@
Provide `gdb --tui' functionality for the hardlink `gdbtui'.
--- ./gdb/gdb.c 1 Jan 2008 22:53:09 -0000 1.6
+++ ./gdb/gdb.c 20 Jun 2008 08:02:57 -0000
@@ -30,5 +30,19 @@ main (int argc, char **argv)
args.argv = argv;
args.use_windows = 0;
args.interpreter_p = INTERP_CONSOLE;
+
+ if (argv[0])
+ {
+ char *s;
+
+ s = strrchr (argv[0], '/');
+ if (s)
+ s++;
+ else
+ s = argv[0];
+ if (strcmp (s, "gdbtui") == 0)
+ args.interpreter_p = INTERP_TUI;
+ }
+
return gdb_main (&args);
}

View File

@ -13,7 +13,7 @@ Version: 6.8
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 11%{?_with_upstream:.upstream}%{?dist}
Release: 12%{?_with_upstream:.upstream}%{?dist}
License: GPLv3+
Group: Development/Debuggers
@ -373,6 +373,11 @@ Patch323: gdb-6.8-disable-randomization.patch
# Fix compatibility with recent glibc headers.
Patch324: gdb-6.8-glibc-headers-compat.patch
# Force build failure for missing libraries for --enable-tui.
# Create a single binary `gdb' autodetecting --tui by its argv[0].
Patch325: gdb-6.8-forced-enable-tui.patch
Patch326: gdb-6.8-tui-singlebinary.patch
BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
BuildRequires: flex bison sharutils expat-devel
Requires: readline
@ -556,6 +561,8 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch322 -p1
%patch323 -p1
%patch324 -p1
%patch325 -p1
%patch326 -p1
%patch124 -p1
find -name "*.orig" | xargs rm -f
@ -620,6 +627,7 @@ CFLAGS="$CFLAGS -O0 -ggdb2"
--disable-rpath \
--with-system-readline \
--with-expat \
--enable-tui \
%ifarch ia64
--with-libunwind \
%else
@ -735,6 +743,12 @@ make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
cp $RPM_BUILD_DIR/%{gdb_src}/gdb/gdb_gcore.sh $RPM_BUILD_ROOT%{_prefix}/bin/gcore
chmod 755 $RPM_BUILD_ROOT%{_prefix}/bin/gcore
# Remove the gdb/gdbtui binaries duplicity.
test -x $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui
ln -sf gdb $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui
cmp $RPM_BUILD_ROOT%{_mandir}/*/gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1
ln -sf gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1
# Remove the files that are part of a gdb build but that are owned and
# provided by other packages.
# These are part of binutils
@ -808,6 +822,9 @@ fi
%endif
%changelog
* Fri Jun 20 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-12
- Remove the gdb/gdbtui binaries duplicity.
* Tue Jun 17 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-11
- Fix the testsuite run for ia64 (where no -m64 is present).
- Test a crash on libraries missing the .text section.