2019-12-14 21:51:44 +08:00
|
|
|
%ifarch %{ix86}
|
|
|
|
|
%define arch_val x86
|
|
|
|
|
%define arch_old_val %{nil}
|
|
|
|
|
%endif
|
|
|
|
|
%ifarch x86_64
|
|
|
|
|
%define arch_val amd64
|
|
|
|
|
%define arch_old_val x86
|
|
|
|
|
%endif
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
%define arch_val arm64
|
|
|
|
|
%define arch_old_val %{nil}
|
|
|
|
|
%endif
|
2022-12-16 09:56:17 +08:00
|
|
|
%ifarch loongarch64
|
|
|
|
|
%define arch_val loongarch64
|
|
|
|
|
%define arch_old_val %{nil}
|
|
|
|
|
%endif
|
2019-12-14 21:51:44 +08:00
|
|
|
|
|
|
|
|
Name: valgrind
|
2021-08-02 15:55:25 +08:00
|
|
|
Version: 3.16.0
|
2023-08-29 19:59:58 +08:00
|
|
|
Release: 7
|
2019-12-14 21:51:44 +08:00
|
|
|
Epoch: 1
|
|
|
|
|
Summary: An instrumentation framework for building dynamic analysis tools
|
|
|
|
|
License: GPLv2+
|
|
|
|
|
URL: http://www.valgrind.org/
|
|
|
|
|
Source0: ftp://sourceware.org/pub/%{name}/%{name}-%{version}.tar.bz2
|
|
|
|
|
|
|
|
|
|
Patch1: valgrind-3.9.0-cachegrind-improvements.patch
|
|
|
|
|
Patch2: valgrind-3.9.0-helgrind-race-supp.patch
|
|
|
|
|
Patch3: valgrind-3.9.0-ldso-supp.patch
|
2022-04-25 16:16:36 +08:00
|
|
|
Patch4: backport-Generate-a-ENOSYS-sys_ni_syscall-for-clone3-on-all-linux-arches.patch
|
2022-03-02 17:46:21 +08:00
|
|
|
Patch5: valgrind-Implement-linux-rseq-syscall-as-ENOSYS.patch
|
2022-12-16 09:56:17 +08:00
|
|
|
Patch6: Add-LOONGARCH64-Linux-support.patch
|
2023-01-03 11:23:33 +08:00
|
|
|
Patch7: valgrind-Sync-LoongArch-with-glibc-2.36.patch
|
2023-08-29 19:59:58 +08:00
|
|
|
%if "%{toolchain}" == "clang"
|
|
|
|
|
Patch8: Add-AArch64-clang-longjmp-support.patch
|
|
|
|
|
%endif
|
2019-12-14 21:51:44 +08:00
|
|
|
|
|
|
|
|
BuildRequires: glibc glibc-devel gdb procps gcc-c++ perl(Getopt::Long)
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Valgrind is an instrumentation framework for building dynamic analysis tools. There are
|
|
|
|
|
Valgrind tools that can automatically detect many memory management and threading bugs,
|
|
|
|
|
and profile your programs in detail. You can also use Valgrind to build new tools.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
This files contains the development files for %{name}.
|
|
|
|
|
|
|
|
|
|
%package_help
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
|
|
|
|
|
|
%build
|
2023-08-29 19:59:58 +08:00
|
|
|
CC=%{__cc}
|
2019-12-14 21:51:44 +08:00
|
|
|
%ifarch x86_64
|
|
|
|
|
mkdir -p shared/libgcc/32
|
|
|
|
|
ar r shared/libgcc/32/libgcc_s.a
|
|
|
|
|
ar r shared/libgcc/libgcc_s_32.a
|
2023-08-29 19:59:58 +08:00
|
|
|
CC="%{__cc} -B `pwd`/shared/libgcc/"
|
2019-12-14 21:51:44 +08:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%undefine _hardened_build
|
|
|
|
|
%undefine _strict_symbol_defs_build
|
2022-12-06 17:11:56 +08:00
|
|
|
optflags="`echo " %{optflags} -Wl,-z,now -fPIE -fPIC"`"
|
|
|
|
|
OPTFLAGS="`echo " $optflags " | sed 's/ -m\(64\|3[21]\) / /g;s/ -fexceptions / /g;s/ -fstack-protector\([-a-z]*\) / / g;s/ -Wp,-D_FORTIFY_SOURCE=2 / /g;s/ -O2 / /g;s/ -mcpu=\([a-z0-9]\+\) / /g;s/^ //;s/ $//'`"
|
|
|
|
|
|
2019-12-14 21:51:44 +08:00
|
|
|
%configure CC="$CC" CFLAGS="$OPTFLAGS" CXXFLAGS="$OPTFLAGS" --with-mpicc=/bin/false GDB=%{_bindir}/gdb
|
|
|
|
|
%make_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%make_install
|
|
|
|
|
|
|
|
|
|
pushd %{buildroot}%{_libdir}/valgrind/
|
|
|
|
|
rm -f *.supp.in *.a
|
|
|
|
|
%if "%{arch_old_val}" != ""
|
|
|
|
|
rm -f *-%{arch_old_val}-* || :
|
|
|
|
|
for i in *-%{arch_val}-*; do
|
|
|
|
|
j=`echo $i | sed 's/-%{arch_val}-/-%{arch_old_val}-/'`
|
|
|
|
|
ln -sf ../../lib/valgrind/$j $j
|
|
|
|
|
done
|
|
|
|
|
%endif
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
pushd %{buildroot}%{_includedir}/%{name}
|
|
|
|
|
rm -rf config.h libvex*h pub_tool_*h vki/
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license COPYING AUTHORS
|
|
|
|
|
%doc %{_datadir}/doc/%{name}/{html,*.pdf}
|
|
|
|
|
%exclude %{_datadir}/doc/%{name}/*.ps
|
|
|
|
|
%{_bindir}/*
|
|
|
|
|
%dir %{_libdir}/%{name}
|
|
|
|
|
%{_libdir}/%{name}/*[^ao]
|
|
|
|
|
%attr(0755,root,root) %{_libdir}/valgrind/vgpreload*-%{arch_val}-*so
|
|
|
|
|
%if "%{arch_old_val}" != ""
|
|
|
|
|
%{_libdir}/%{name}/vgpreload*-%{arch_old_val}-*so
|
|
|
|
|
%endif
|
2021-02-03 10:02:19 +08:00
|
|
|
%{_libexecdir}/valgrind/*
|
2019-12-14 21:51:44 +08:00
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_includedir}/%{name}
|
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%doc NEWS README_*
|
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-08-29 19:59:58 +08:00
|
|
|
* Tue Aug 29 2023 liyunfei <liyunfei33@huawei.com> - 1:3.16.0-7
|
|
|
|
|
- Add clang compile support on AArch64
|
|
|
|
|
|
2023-01-03 11:23:33 +08:00
|
|
|
* Tue Jan 03 2023 chenfeiyang <chenfeiyang@loongson.cn> - 1:3.16.0-6
|
|
|
|
|
- Sync LoongArch with glibc 2.36
|
|
|
|
|
|
2022-12-16 09:56:17 +08:00
|
|
|
* Fri Dec 16 2022 chenfeiyang <chenfeiyang@loongson.cn> - 1:3.16.0-5
|
|
|
|
|
- Add LOONGARCH64/Linux support
|
|
|
|
|
|
2022-12-06 17:11:56 +08:00
|
|
|
* Thu Aug 25 2022 liyanan <liyanan32@h-partners.com> - 1:3.16.0-4
|
|
|
|
|
- Add BIND_NOW and PIE safe complie option
|
|
|
|
|
|
2022-03-02 17:46:21 +08:00
|
|
|
* Wed Mar 02 2022 qinyu <qiny16@huawei.com> - 3.16.0-3
|
|
|
|
|
- Implement linux rseq syscall as ENOSYS
|
|
|
|
|
|
2022-04-25 16:16:36 +08:00
|
|
|
* Wed Feb 09 2022 gaoxingwang <gaoxingwang@huawei.com> - 3.16.0-2
|
|
|
|
|
- backport patch :Generate a ENOSYS (sys_ni_syscall) for clone3 on all linux arches
|
|
|
|
|
|
2021-08-02 15:55:25 +08:00
|
|
|
* Mon Aug 02 2021 shixuantong <shixuantong@huawei.com> - 3.16.0-1
|
|
|
|
|
- upgrade version to 3.16.0
|
|
|
|
|
|
2021-02-03 10:02:19 +08:00
|
|
|
* Wed Feb 3 2021 wangjie<wangjie294@huawei.com> - 3.15.0-1
|
|
|
|
|
- upgrade 3.15.0
|
|
|
|
|
|
2019-12-14 21:51:44 +08:00
|
|
|
* Sat Dec 7 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.13.0-29
|
|
|
|
|
- Package init
|