From 6f48688609fcacc3fb0c1c701fe7f5070f30efee Mon Sep 17 00:00:00 2001 From: William Cohen Date: Fri, 15 Jul 2011 15:07:33 -0400 Subject: [PATCH] Fix sdt.h to avoid warning on arm arches. --- systemtap-sdt.patch | 30 ++++++++++++++++++++++++++++++ systemtap.spec | 9 ++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 systemtap-sdt.patch diff --git a/systemtap-sdt.patch b/systemtap-sdt.patch new file mode 100644 index 0000000..f933c85 --- /dev/null +++ b/systemtap-sdt.patch @@ -0,0 +1,30 @@ +From c02332052959e4213a59ce0ff40354f51506103a Mon Sep 17 00:00:00 2001 +From: Mark Wielaard +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 { static const bool __sdt_signed = true; }; + #define __SDT_COND_SIGNED(T) \ +-template<> struct __sdt_type { static const bool __sdt_signed = ((T)(-1) < 0); }; ++template<> struct __sdt_type { 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 + diff --git a/systemtap.spec b/systemtap.spec index 5ad2314..2af530d 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -16,7 +16,7 @@ Name: systemtap Version: 1.5 -Release: 6%{?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) @@ -189,6 +191,8 @@ cd .. %patch2 -p1 %patch3 -p1 +%patch25 -p1 + %build %if %{with_bundled_elfutils} @@ -504,6 +508,9 @@ exit 0 %changelog +* Fri Jul 15 2011 William Cohen - 1.5-7 +- Fix sdt.h to avoid warning on arm arches. + * Mon Jul 11 2011 William Cohen - 1.5-6 - there is no crash available on arm arches