rpms/gdb/devel gdb.spec,1.269,1.270
Jan Kratochvil (jkratoch)
fedora-extras-commits at redhat.com
Mon Feb 25 09:26:32 UTC 2008
- Previous message (by thread): rpms/cdrkit/devel cdrkit-1.1.6-werror.patch, NONE, 1.1 cdrkit.spec, 1.11, 1.12
- Next message (by thread): rpms/lftp/devel .cvsignore, 1.32, 1.33 lftp.spec, 1.67, 1.68 sources, 1.32, 1.33 lftp-3.5.14-progress_overflow.patch, 1.2, NONE lftp-3.6.1-empty_argument.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jkratoch
Update of /cvs/pkgs/rpms/gdb/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13538
Modified Files:
gdb.spec
Log Message:
* Mon Feb 25 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.7.1-15
- New --with parameters `testsuite' and `debug'.
- Testsuite is now run during the build only on explicit `--with testsuite'.
- Testsuite now possibly produces two outputs for the two GDB target arches.
Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.269
retrieving revision 1.270
diff -u -r1.269 -r1.270
--- gdb.spec 21 Feb 2008 21:41:59 -0000 1.269
+++ gdb.spec 25 Feb 2008 09:25:51 -0000 1.270
@@ -1,9 +1,9 @@
-# Define this if you want to skip the strip step and preserve debug info.
-# Useful for testing.
-#define __debug_install_post : > %{_builddir}/%{?buildsubdir}/debugfiles.list
+# rpmbuild parameters:
+# --with testsuite: Run the testsuite (biarch if possible). Default is without.
+# --with debug: Build without optimizations and without splitting the debuginfo.
Summary: A GNU source-level debugger for C, C++, Java and other languages
-Name: gdb
+Name: gdb%{?_with_debug:-debug}
# Set version to contents of gdb/version.in.
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
@@ -11,7 +11,7 @@
Version: 6.7.1
# The release always contains a leading reserved number, start it at 1.
-Release: 14%{?dist}
+Release: 15%{?dist}
License: GPL
Group: Development/Debuggers
@@ -23,6 +23,13 @@
%define gdb_src gdb-%{version}
%define gdb_build build-%{_target_platform}
+%if 0%{?_with_debug:1}
+# Define this if you want to skip the strip step and preserve debug info.
+# Useful for testing.
+%define __debug_install_post : > %{_builddir}/%{?buildsubdir}/debugfiles.list
+%define debug_package %{nil}
+%endif
+
# Make sure we get rid of the old package gdb64, now that we have unified
# support for 32-64 bits in one single 64-bit gdb.
%ifarch ppc64
@@ -368,9 +375,8 @@
Requires: rpm-libs
BuildRequires: rpm-devel
-# BuildRequires are provided here only for the complete testsuite run.
-# Omit them on local user builds. %{_topdir} checks for mock (and so even Koji).
-%if "%{_topdir}" == "/builddir/build"
+# BuildRequires are set here only for the complete testsuite run.
+%if 0%{?_with_testsuite:1}
# gcc-objc++ is not covered by the GDB testsuite.
BuildRequires: gcc gcc-c++ gcc-gfortran gcc-java gcc-objc
# Copied from gcc-4.1.2-32
@@ -565,6 +571,9 @@
# line needs to be cleaned up.
export CFLAGS="$RPM_OPT_FLAGS"
+%if 0%{?_with_debug:1}
+CFLAGS="$CFLAGS -O0 -ggdb2"
+%endif
enable_build_warnings="--enable-gdb-build-warnings=,-Wno-unused"
%ifarch %{ix86} alpha ia64 ppc s390 s390x x86_64 ppc64
@@ -587,6 +596,9 @@
%else
--without-libunwind \
%endif
+%if 0%{?_with_debug:1}
+ --enable-static --disable-shared --enable-debug \
+%endif
%{_target_platform}
make %{?_smp_mflags}
@@ -599,10 +611,11 @@
# Initially we're in the %{gdb_src} directory.
cd %{gdb_build}
-# For now do testing only on these platforms.
-%ifarch %{ix86} x86_64 s390x s390 ppc ia64 ppc64
+%if 0%{!?_with_testsuite:1}
+echo ====================TESTSUITE DISABLED=========================
+%else
echo ====================TESTING=========================
-cd gdb/testsuite
+cd gdb
gcc -o ./orphanripper %{SOURCE2} -Wall -lutil
# Need to use a single --ignore option, second use overrides first.
# "chng-syms.exp" for possibly avoiding Linux kernel crash - Bug 207002.
@@ -614,13 +627,56 @@
# ULIMIT required for `gdb.base/auxv.exp'.
ulimit -H -c
ulimit -c unlimited || :
- ./orphanripper make -k check RUNTESTFLAGS='--ignore "bigcore.exp chng-syms.exp checkpoint.exp threadcrash.exp readline-overflow.exp"' || :
+
+ # Setup $CHECK as `check//unix/' or `check//unix/-m64' for explicit bitsize.
+ # Simple `check' is not used for $CHECK as different escaping rules apply
+ # for the --ignore list delimiting spaces.
+ echo 'int main (void) { return 0; }' >biarch.c
+ gcc $RPM_OPT_FLAGS -o biarch biarch.c
+ mv -f biarch biarch-native
+ # Do not try -m64 for biarch as GDB cannot handle inferior larger than itself.
+ for BI in -m32 -m31 ""
+ do
+ if gcc 2>/dev/null $RPM_OPT_FLAGS $BI -o biarch biarch.c
+ then
+ break
+ fi
+ done
+ CHECK="check`echo " $RPM_OPT_FLAGS "|sed -n 's#^.* \(-m[36][241]\) .*$#//unix/\1#p'`"
+ if ! cmp -s biarch-native biarch
+ then
+ CHECK="$CHECK check//unix/$BI"
+ fi
+
+ # Disable some problematic testcases.
+ # RUNTESTFLAGS='--ignore ...' is not used below as it gets separated by the
+ # `check//...' target spawn and too much escaping there would be dense.
+ for test in \
+ gdb.base/readline-overflow.exp \
+ gdb.base/chng-syms.exp \
+ gdb.base/checkpoint.exp \
+ gdb.base/bigcore.exp \
+ gdb.threads/threadcrash.exp \
+ ; do
+ mv -f ../../gdb/testsuite/$test ../gdb/testsuite/$test-DISABLED || :
+ done
+
+ for CURRENT in $CHECK
+ do
+ ./orphanripper make -k $CURRENT || :
+ done
)
-for t in sum log; do
- ln gdb.$t gdb-%{_target_platform}.$t || :
+for t in sum log
+do
+ for file in testsuite*/gdb.$t
+ do
+ suffix="${file#testsuite.unix.}"
+ suffix="${suffix%/gdb.$t}"
+ ln $file gdb-%{_target_platform}$suffix.$t || :
+ done
done
# `tar | bzip2 | uuencode' may have some piping problems in Brew.
-tar cjf gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}.{sum,log}
+tar cjf gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}*.{sum,log}
uuencode gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}.tar.bz2
cd ../..
echo ====================TESTING END=====================
@@ -704,6 +760,11 @@
%{_mandir}/*/gdbserver.1*
%changelog
+* Mon Feb 25 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.7.1-15
+- New --with parameters `testsuite' and `debug'.
+ - Testsuite is now run during the build only on explicit `--with testsuite'.
+- Testsuite now possibly produces two outputs for the two GDB target arches.
+
* Thu Feb 21 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.7.1-14
- Rename `set debug build-id' as `set build-id-verbose', former level 1 moved
to level 2, default value is now 1, use `set build-id-verbose 0' now to
- Previous message (by thread): rpms/cdrkit/devel cdrkit-1.1.6-werror.patch, NONE, 1.1 cdrkit.spec, 1.11, 1.12
- Next message (by thread): rpms/lftp/devel .cvsignore, 1.32, 1.33 lftp.spec, 1.67, 1.68 sources, 1.32, 1.33 lftp-3.5.14-progress_overflow.patch, 1.2, NONE lftp-3.6.1-empty_argument.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list