Compare commits

...

2 Commits
master ... f13

Author SHA1 Message Date
William Cohen 353f5bc6a6 Fix sdt.h to avoid warning on arm arches. 2011-07-15 15:10:43 -04:00
William Cohen 1c152d2d2f Correct the exclusion of crash-devel for arm. 2011-07-15 11:29:15 -04:00
2 changed files with 42 additions and 2 deletions

30
systemtap-sdt.patch Normal file
View File

@ -0,0 +1,30 @@
From c02332052959e4213a59ce0ff40354f51506103a Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Wed, 6 Jul 2011 23:07:51 +0200
Subject: [PATCH] Silence sys/sdt.h comparison of unsigned expression < 0 is always false.
Some arm g++ setups would complain about the wchar_t "signedness detection":
sys/sdt.h:102: error: comparison of unsigned expression < 0 is always false
jistone said: "((T)(-1) < 1)" would still get the right boolean value,
and shouldn't trigger range errors like "unsigned is never < 0".
---
includes/sys/sdt.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
index f7e1360..0a9fd40 100644
--- a/includes/sys/sdt.h
+++ b/includes/sys/sdt.h
@@ -77,7 +77,7 @@ struct __sdt_type
#define __SDT_ALWAYS_SIGNED(T) \
template<> struct __sdt_type<T> { static const bool __sdt_signed = true; };
#define __SDT_COND_SIGNED(T) \
-template<> struct __sdt_type<T> { static const bool __sdt_signed = ((T)(-1) < 0); };
+template<> struct __sdt_type<T> { static const bool __sdt_signed = ((T)(-1) < 1); };
__SDT_ALWAYS_SIGNED(signed char)
__SDT_ALWAYS_SIGNED(short)
__SDT_ALWAYS_SIGNED(int)
--
1.7.3.4

View File

@ -1,6 +1,6 @@
%{!?with_sqlite: %global with_sqlite 1}
%{!?with_docs: %global with_docs 0}
%ifarch ppc %{sparc} %{arm}# crash is not available
%ifarch ppc %{sparc} %{arm} # crash is not available
%{!?with_crash: %global with_crash 0}
%else
%{!?with_crash: %global with_crash 1}
@ -16,7 +16,7 @@
Name: systemtap
Version: 1.5
Release: 1%{?dist}
Release: 7%{?dist}
# for version, see also configure.ac
Summary: Instrumentation System
Group: Development/System
@ -24,6 +24,8 @@ License: GPLv2+
URL: http://sourceware.org/systemtap/
Source: ftp://sourceware.org/pub/%{name}/releases/%{name}-%{version}.tar.gz
Patch25: systemtap-sdt.patch
Obsoletes: systemtap-client < 1.5
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -183,6 +185,8 @@ find . \( -name configure -o -name config.h.in \) -print | xargs touch
cd ..
%endif
%patch25 -p1
%build
%if %{with_bundled_elfutils}
@ -498,6 +502,12 @@ exit 0
%changelog
* Fri Jul 15 2011 William Cohen <wcohen@redhat.com> - 1.5-7
- Fix sdt.h to avoid warning on arm arches.
* Mon Jul 11 2011 William Cohen <wcohen@redhat.com> - 1.5-6
- there is no crash available on arm arches
* Mon May 23 2011 Stan Cox <scox@redhat.com> - 1.5-1
- Upstream release.