Dominique Leuenberger 2022-04-22 22:25:06 +00:00 committed by Git OBS Bridge
commit e44f8ce826
2 changed files with 44 additions and 39 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Apr 20 09:39:21 UTC 2022 - Adam Majer <adam.majer@suse.de>
- fix build on SLE12
-------------------------------------------------------------------
Wed Apr 13 15:17:54 UTC 2022 - Dirk Müller <dmueller@suse.com>
- spec-cleaner suggested cleanups
- drop unnecessary procps buildrequires
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Apr 12 19:27:44 UTC 2022 - Dirk Müller <dmueller@suse.com> Tue Apr 12 19:27:44 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -16,18 +16,18 @@
# #
%if 0%{?!make_build:1}
%define make_build make -O %{?_smp_mflags} V=1 VERBOSE=1
%endif
# during building the major version of glibc is built into the suppression file # during building the major version of glibc is built into the suppression file
%define glibc_main_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f1) %define glibc_main_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f1)
%define glibc_major_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f2) %define glibc_major_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f2)
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "client-headers" %if "%{flavor}" == "client-headers"
%define psuffix -client-headers-source %define psuffix -client-headers-source
%endif %endif
%bcond_without docs %bcond_without docs
Name: valgrind%{?psuffix} Name: valgrind%{?psuffix}
Version: 3.19.0 Version: 3.19.0
Release: 0 Release: 0
@ -42,31 +42,31 @@ Patch0: valgrind.xen.patch
Patch2: armv6-support.diff Patch2: armv6-support.diff
Patch9: parallel-lto.patch Patch9: parallel-lto.patch
Patch10: dhat-use-datadir.patch Patch10: dhat-use-datadir.patch
%if "%{flavor}" == ""
%if %{with docs}
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxslt
%endif
BuildRequires: automake BuildRequires: automake
%if 0%{?suse_version} < 1320
BuildRequires: gcc8-c++
%else
BuildRequires: gcc-c++
%endif
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: procps %if "%{flavor}" == ""
Requires: glibc >= %{glibc_main_version}.%{glibc_major_version} Requires: glibc >= %{glibc_main_version}.%{glibc_major_version}
Requires: glibc < %{glibc_main_version}.%{lua:print(rpm.expand("%{glibc_major_version}")+1)} Requires: glibc < %{glibc_main_version}.%{lua:print(rpm.expand("%{glibc_major_version}")+1)}
Provides: callgrind = %{version} Provides: callgrind = %{version}
Obsoletes: callgrind < %{version} Obsoletes: callgrind < %{version}
ExclusiveArch: aarch64 %ix86 x86_64 ppc ppc64 ppc64le s390x armv7l armv7hl armv6l armv6hl ExclusiveArch: aarch64 %{ix86} x86_64 ppc ppc64 ppc64le s390x armv7l armv7hl armv6l armv6hl
%if %{with docs}
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxslt
%endif
%if 0%{?suse_version} < 1500
BuildRequires: gcc8-c++
%global cpp_version -8
%else
BuildRequires: gcc-c++
%endif
%ifarch x86_64 ppc64 %ifarch x86_64 ppc64
%if 0%{?suse_version} < 1320 BuildRequires: glibc-devel-32bit
%if 0%{?suse_version} < 1500
BuildRequires: gcc8-c++-32bit BuildRequires: gcc8-c++-32bit
%else %else
BuildRequires: gcc-c++-32bit BuildRequires: gcc-c++-32bit
%endif %endif
BuildRequires: glibc-devel-32bit
%endif %endif
%else %else
%endif %endif
@ -145,7 +145,6 @@ directory. A debugged application runs slower and needs much more
memory, but is usually still usable. Valgrind is still in development, memory, but is usually still usable. Valgrind is still in development,
but it has been successfully used to optimize several KDE applications. but it has been successfully used to optimize several KDE applications.
%endif %endif
%prep %prep
@ -153,21 +152,11 @@ but it has been successfully used to optimize several KDE applications.
%autopatch -p1 %autopatch -p1
%build %build
%if "%{flavor}" == ""
%define _lto_cflags %{nil} %define _lto_cflags %{nil}
%if 0%{?suse_version} < 1320
export CC="%{_bindir}/gcc-8"
export CXX="%{_bindir}/g++-8"
%endif
export FLAGS="%{optflags}" export FLAGS="%{optflags}"
%ifarch %arm
# Valgrind doesn't support compiling for Thumb yet. Remove when it gets
# native thumb support.
FLAGS=${FLAGS/-mthumb/-mthumb-interwork -marm}
%endif
# not a good idea to build valgrind with fortify, as it does not link glibc # not a good idea to build valgrind with fortify, as it does not link glibc
FLAGS="${FLAGS/-D_FORTIFY_SOURCE=2/}" FLAGS="${FLAGS/-D_FORTIFY_SOURCE=2/}"
FLAGS="${FLAGS/-D_FORTIFY_SOURCE=3/}"
FLAGS="${FLAGS/-fstack-protector-strong/}" FLAGS="${FLAGS/-fstack-protector-strong/}"
FLAGS="${FLAGS/-fstack-protector/}" FLAGS="${FLAGS/-fstack-protector/}"
# -m64 / -m32 is set explicitly everywhere, do not override it # -m64 / -m32 is set explicitly everywhere, do not override it
@ -175,6 +164,8 @@ FLAGS="${FLAGS/-m64/}"
export CFLAGS="$FLAGS" export CFLAGS="$FLAGS"
export CXXFLAGS="$FLAGS" export CXXFLAGS="$FLAGS"
export FFLAGS="$FLAGS" export FFLAGS="$FLAGS"
export CXX="g++%{?cpp_version}"
export CC="gcc%{?cpp_version}"
autoreconf -fi autoreconf -fi
export GDB=%{_bindir}/gdb export GDB=%{_bindir}/gdb
@ -185,19 +176,20 @@ export GDB=%{_bindir}/gdb
%endif %endif
%{nil} %{nil}
make %{?_smp_mflags} %if "%{flavor}" == ""
%make_build
%if %{with docs} %if %{with docs}
pushd docs pushd docs
#make all-docs #make all-docs
# building the docs needs network access at the moment :-( # building the docs needs network access at the moment :-(
make FAQ.txt man-pages html-docs %make_build FAQ.txt man-pages html-docs
popd popd
%endif %endif
%endif %endif
%install %install
%if "%{flavor}" == "" %if "%{flavor}" == ""
make DESTDIR=%{buildroot} install %{?_smp_mflags} %make_install
rm %{buildroot}/%{_libdir}/valgrind/lib*.a # drop unreproducible unused files to fix boo#1118163 rm %{buildroot}/%{_libdir}/valgrind/lib*.a # drop unreproducible unused files to fix boo#1118163
mkdir -p %{buildroot}/%{_defaultdocdir} mkdir -p %{buildroot}/%{_defaultdocdir}
@ -224,11 +216,11 @@ install -m 644 -t %{buildroot}/%{_includedir}/valgrind \
%check %check
%if "%{flavor}" == "" %if "%{flavor}" == ""
# OBS doesn't have a z13 # OBS doesn't have a z13
%ifnarch s390x %arm %ifnarch s390x %{arm}
# has too many spurious failures # has too many spurious failures
# make %{?_smp_mflags} regtest # make %{?_smp_mflags} regtest
#patent pending self test #patent pending self test
VALGRIND_LIB=$PWD/.in_place VALGRIND_LIB_INNER=$PWD/.in_place ./coregrind/valgrind /usr/bin/perl -wc tests/vg_regtest VALGRIND_LIB=$PWD/.in_place VALGRIND_LIB_INNER=$PWD/.in_place ./coregrind/valgrind %{_bindir}/perl -wc tests/vg_regtest
%endif %endif
%endif %endif
@ -246,7 +238,7 @@ VALGRIND_LIB=$PWD/.in_place VALGRIND_LIB_INNER=$PWD/.in_place ./coregrind/valgri
%{_bindir}/* %{_bindir}/*
%doc README* NEWS AUTHORS %doc README* NEWS AUTHORS
%doc %{_defaultdocdir}/%{name}/* %doc %{_defaultdocdir}/%{name}/*
%doc %{_mandir}/*/* %{_mandir}/*/*
%dir %{_libexecdir}/valgrind %dir %{_libexecdir}/valgrind
%ifarch aarch64 %ifarch aarch64
%{_libexecdir}/valgrind/*-arm64-linux %{_libexecdir}/valgrind/*-arm64-linux
@ -254,7 +246,7 @@ VALGRIND_LIB=$PWD/.in_place VALGRIND_LIB_INNER=$PWD/.in_place ./coregrind/valgri
%ifarch x86_64 %ifarch x86_64
%{_libexecdir}/valgrind/*-amd64-linux %{_libexecdir}/valgrind/*-amd64-linux
%endif %endif
%ifarch %ix86 %ifarch %{ix86}
%{_libexecdir}/valgrind/*-x86-linux %{_libexecdir}/valgrind/*-x86-linux
%endif %endif
%ifarch ppc %ifarch ppc
@ -269,7 +261,7 @@ VALGRIND_LIB=$PWD/.in_place VALGRIND_LIB_INNER=$PWD/.in_place ./coregrind/valgri
%ifarch s390x %ifarch s390x
%{_libexecdir}/valgrind/*-s390x-linux %{_libexecdir}/valgrind/*-s390x-linux
%endif %endif
%ifarch %arm %ifarch %{arm}
%{_libexecdir}/valgrind/*-arm-linux %{_libexecdir}/valgrind/*-arm-linux
%endif %endif
%dir %{_datadir}/valgrind %dir %{_datadir}/valgrind
@ -323,9 +315,11 @@ VALGRIND_LIB=$PWD/.in_place VALGRIND_LIB_INNER=$PWD/.in_place ./coregrind/valgri
%ifarch x86_64 ppc64 s390x %ifarch x86_64 ppc64 s390x
%files 32bit %files 32bit
%endif %endif
%ifarch %ix86 x86_64
%ifarch %{ix86} x86_64
%{_libexecdir}/valgrind/*-x86-linux %{_libexecdir}/valgrind/*-x86-linux
%endif %endif
%ifarch ppc ppc64 %ifarch ppc ppc64
%{_libexecdir}/valgrind/*-ppc32-linux %{_libexecdir}/valgrind/*-ppc32-linux
%endif %endif