|
|
|
@ -4,11 +4,12 @@
|
|
|
|
|
|
|
|
|
|
Name: %{?scl_prefix}annobin
|
|
|
|
|
Summary: Annotate and examine compiled binary files
|
|
|
|
|
Version: 10.76
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Version: 11.08
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
License: GPLv3+
|
|
|
|
|
URL: https://sourceware.org/annobin/
|
|
|
|
|
# Maintainer: nickc@redhat.com
|
|
|
|
|
# Web Page: https://sourceware.org/annobin/
|
|
|
|
|
# Watermark Protocol: https://fedoraproject.org/wiki/Toolchain/Watermark
|
|
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
@ -26,14 +27,14 @@ URL: https://sourceware.org/annobin/
|
|
|
|
|
# time check for debuginfod support.
|
|
|
|
|
%bcond_with debuginfod
|
|
|
|
|
|
|
|
|
|
# Use "--without clangplugin" to disable the building of the annobin plugin for Clang.
|
|
|
|
|
%bcond_without clangplugin
|
|
|
|
|
# Use "--with clangplugin" to enable the building of the annobin plugin for Clang.
|
|
|
|
|
%bcond_with clangplugin
|
|
|
|
|
|
|
|
|
|
# Use "--without gccplugin" to disable the building of the annobin plugin for GCC.
|
|
|
|
|
%bcond_without gccplugin
|
|
|
|
|
|
|
|
|
|
# Use "--without llvmplugin" to disable the building of the annobin plugin for LLVM.
|
|
|
|
|
%bcond_without llvmplugin
|
|
|
|
|
# Use "--with llvmplugin" to enable the building of the annobin plugin for LLVM.
|
|
|
|
|
%bcond_with llvmplugin
|
|
|
|
|
|
|
|
|
|
# Set this to zero to disable the requirement for a specific version of gcc.
|
|
|
|
|
# This should only be needed if there is some kind of problem with the version
|
|
|
|
@ -56,7 +57,7 @@ URL: https://sourceware.org/annobin/
|
|
|
|
|
# uncommenting the lines below will result in annocheck not passing the rpminspect
|
|
|
|
|
# tests....
|
|
|
|
|
# %%if %%{without plugin_rebuild}
|
|
|
|
|
%undefine _annotated_build
|
|
|
|
|
# %%undefine _annotated_build
|
|
|
|
|
# %%endif
|
|
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
@ -72,12 +73,8 @@ Source: %{annobin_sources}
|
|
|
|
|
# Insert patches here, if needed. Eg:
|
|
|
|
|
# Patch01: annobin-foo.patch
|
|
|
|
|
# NB - ADD %%patchNN line after the %%setup command down below....
|
|
|
|
|
|
|
|
|
|
# TEMP patch until GTS-12 binutils is fixed.
|
|
|
|
|
# libannocheck test is failing because:
|
|
|
|
|
# lto1: fatal error: bytecode stream in file '/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../lib64/libiberty.a' generated with LTO version 11.3 instead of the expected 12.0
|
|
|
|
|
# Need a binutils rebuild to fix...
|
|
|
|
|
Patch01: annobin-libannocheck-test.patch
|
|
|
|
|
Patch01: annobin-nop.patch
|
|
|
|
|
Patch02: annobin-default-to-group-attach.patch
|
|
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
@ -146,9 +143,6 @@ annotated files and reports on any missing security options.
|
|
|
|
|
%package docs
|
|
|
|
|
Summary: Documentation and shell scripts for use with annobin
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# annobin renamed to annobin-doc in 9.66-1
|
|
|
|
|
Provides: %{?scl_prefix}%{name} = %{version}-%{release}
|
|
|
|
|
Obsoletes: %{?scl_prefix}%{name} < %{version}-%{release}
|
|
|
|
|
# The documentation uses pod2man...
|
|
|
|
|
BuildRequires: perl-interpreter perl-podlators gawk make sharutils
|
|
|
|
|
|
|
|
|
@ -323,6 +317,7 @@ echo "Requires: (%{?scl_prefix}gcc >= %{gcc_major} and %{?scl_prefix}gcc < %{gcc
|
|
|
|
|
# %%autosetup -p1
|
|
|
|
|
%setup -q -n annobin-%{version}
|
|
|
|
|
%patch01 -p1
|
|
|
|
|
%patch02 -p1
|
|
|
|
|
|
|
|
|
|
# The plugin has to be configured with the same arcane configure
|
|
|
|
|
# scripts used by gcc. Hence we must not allow the Fedora build
|
|
|
|
@ -405,7 +400,12 @@ make -C gcc-plugin clean
|
|
|
|
|
BUILD_FLAGS="-fplugin=%{_tmppath}/tmp_annobin.so"
|
|
|
|
|
|
|
|
|
|
# Disable the standard annobin plugin so that we do get conflicts.
|
|
|
|
|
# Note - Fedora's rpm uses a different way of evaluating macros.
|
|
|
|
|
%if 0%{?fedora} == 0
|
|
|
|
|
OPTS="$(rpm --eval '%undefine _annotated_build %build_cflags %build_ldflags')"
|
|
|
|
|
%else
|
|
|
|
|
OPTS="$(rpm --undefine=_annotated_build --eval '%build_cflags %build_ldflags')"
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# If building on systems with an assembler that does not support the
|
|
|
|
|
# .attach_to_group pseudo op (eg RHEL-7) then enable the next line.
|
|
|
|
@ -448,6 +448,14 @@ mv %{buildroot}/%{llvm_plugin_dir}/annobin-for-clang.so %{buildroot}/%{clang_plu
|
|
|
|
|
mkdir -p %{buildroot}/%{ANNOBIN_GCC_PLUGIN_DIR}
|
|
|
|
|
cat `gcc --print-file-name=rpmver` > %{buildroot}/%{ANNOBIN_GCC_PLUGIN_DIR}/%{aver}
|
|
|
|
|
|
|
|
|
|
# Rename the plugin to the GTS version.
|
|
|
|
|
pushd %{buildroot}/%{ANNOBIN_GCC_PLUGIN_DIR} > /dev/null
|
|
|
|
|
mv annobin.so.0.0.0 gts-annobin.so.0.0.0
|
|
|
|
|
rm -f annobin.so annobin.so.0
|
|
|
|
|
ln -s gts-annobin.so.0.0.0 gts-annobin.so
|
|
|
|
|
ln -s gts-annobin.so.0.0.0 gts-annobin.so.0
|
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
|
|
# Also install a copy of the sources into the build tree.
|
|
|
|
|
mkdir -p %{buildroot}%{annobin_source_dir}
|
|
|
|
|
cp %{_sourcedir}/%{annobin_sources} %{buildroot}%{annobin_source_dir}/latest-annobin.tar.xz
|
|
|
|
@ -459,9 +467,15 @@ rm -f %{buildroot}%{_infodir}/dir
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
|
|
|
|
|
# Make sure that we run the tests in the same environment as the build.
|
|
|
|
|
# In particular they must use the same version of gcc and the binutis.
|
|
|
|
|
# The sed command converts scl-gcc-toolset-12- into scl-gcc-toolset-12
|
|
|
|
|
source scl_source enable `echo %{?scl_prefix} | sed -e 's/-$//'`
|
|
|
|
|
|
|
|
|
|
# Change the following line to "make check || :" on RHEL7 or if you need to see the
|
|
|
|
|
# test suite logs in order to diagnose a test failure.
|
|
|
|
|
make check GCC=%gcc_for_annobin
|
|
|
|
|
make check
|
|
|
|
|
if [ -f tests/test-suite.log ]; then
|
|
|
|
|
cat tests/test-suite.log
|
|
|
|
|
fi
|
|
|
|
@ -483,19 +497,22 @@ fi
|
|
|
|
|
|
|
|
|
|
%if %{with llvmplugin}
|
|
|
|
|
%files plugin-llvm
|
|
|
|
|
%dir %{llvm_plugin_dir}
|
|
|
|
|
%{llvm_plugin_dir}/annobin-for-llvm.so
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with clangplugin}
|
|
|
|
|
%files plugin-clang
|
|
|
|
|
%dir %{clang_plugin_dir}
|
|
|
|
|
%{clang_plugin_dir}/annobin-for-clang.so
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with gccplugin}
|
|
|
|
|
%files plugin-gcc
|
|
|
|
|
%{ANNOBIN_GCC_PLUGIN_DIR}/annobin.so
|
|
|
|
|
%{ANNOBIN_GCC_PLUGIN_DIR}/annobin.so.0
|
|
|
|
|
%{ANNOBIN_GCC_PLUGIN_DIR}/annobin.so.0.0.0
|
|
|
|
|
%dir %{ANNOBIN_GCC_PLUGIN_DIR}
|
|
|
|
|
%{ANNOBIN_GCC_PLUGIN_DIR}/gts-annobin.so
|
|
|
|
|
%{ANNOBIN_GCC_PLUGIN_DIR}/gts-annobin.so.0
|
|
|
|
|
%{ANNOBIN_GCC_PLUGIN_DIR}/gts-annobin.so.0.0.0
|
|
|
|
|
%{ANNOBIN_GCC_PLUGIN_DIR}/%{aver}
|
|
|
|
|
%{annobin_source_dir}/latest-annobin.tar.xz
|
|
|
|
|
%endif
|
|
|
|
@ -506,13 +523,70 @@ fi
|
|
|
|
|
%{_libdir}/libannocheck.*
|
|
|
|
|
%{_bindir}/annocheck
|
|
|
|
|
%{_mandir}/man1/annocheck.1*
|
|
|
|
|
%{_libdir}/pkgconfig/libannocheck.pc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Jun 23 2022 Nick Clifton <nickc@redhat.com> - 10.76-2
|
|
|
|
|
- Fix libannocheck test so that it does not use lto.
|
|
|
|
|
* Tue Jan 31 2023 Nick Clifton <nickc@redhat.com> - 11.08-1
|
|
|
|
|
- Annocheck: Fix atexit test. Fix recording of version numbers. (#2165826)
|
|
|
|
|
|
|
|
|
|
* Fri Jan 13 2023 Nick Clifton <nickc@redhat.com> - 11.06-1
|
|
|
|
|
- Annocheck: Fix handling of file built by multiple versions of gcc. (#2160701)
|
|
|
|
|
- Spec file: Enable annotated building.
|
|
|
|
|
|
|
|
|
|
* Thu Jan 12 2023 Nick Clifton <nickc@redhat.com> - 11.05-1
|
|
|
|
|
- Annocheck: Fix handling of empty files. (#2159292)
|
|
|
|
|
- Annocheck: Add crti.o and crtn.o to the list of known glibc special files. (#2158740)
|
|
|
|
|
- Annocheck: Fix memory leaks.
|
|
|
|
|
- Annocheck: Do not assume that object files contain no code simply because they do not have an executable segment. (#2158182)
|
|
|
|
|
- Annocheck: Add more special glibc filenames. (#2158100)
|
|
|
|
|
|
|
|
|
|
* Thu Dec 22 2022 Nick Clifton <nickc@redhat.com> - 10.99-1
|
|
|
|
|
- Annocheck: Improve handling of tool versions.
|
|
|
|
|
|
|
|
|
|
* Mon Dec 19 2022 Nick Clifton <nickc@redhat.com> - 10.98-1
|
|
|
|
|
- GCC Plugin: Fix building with gcc-13.
|
|
|
|
|
- Annocheck: Add test for binaries built by cross compilers.
|
|
|
|
|
- Annocheck: Improve heuristic used to detect binaries without code. (#2144533)
|
|
|
|
|
- Annocheck: Use real filename rather than debuginfo filename. (#2152280)
|
|
|
|
|
|
|
|
|
|
* Mon Dec 05 2022 Nick Clifton <nickc@redhat.com> - 10.94-2
|
|
|
|
|
- Rename gcc plugin to gts-annobin. (#2107575)
|
|
|
|
|
|
|
|
|
|
* Wed Nov 30 2022 Florian Weimer <fweimer@redhat.com> - 10.94-1
|
|
|
|
|
- Rebase to 10.94, brining in support for LLVM 15. (#2118992)
|
|
|
|
|
- Annocheck: Better detection of binaries which do not contain code. (#2144533)
|
|
|
|
|
- Annocheck: Provide more information when a test is skipped because the file being tested was not compiled.
|
|
|
|
|
- Annocheck: Try harder not to run mutually exclusive tests.
|
|
|
|
|
- Tests: Fix future-test so that it properly handles the situation where the compiler does not support the new options.
|
|
|
|
|
- Libannocheck: Actually set result fields after tests are run.
|
|
|
|
|
- Libannocheck: Replace libannocheck_version variable with LIBANNOCHECK_VERSION define.
|
|
|
|
|
- Libannocheck: Remove 'Requires binutils-devel' from libannocheck.pc.
|
|
|
|
|
- Libannocheck: Move into separate sub-package.
|
|
|
|
|
- Libannocheck: Add libannocheck.pc pkgconfig file.
|
|
|
|
|
- Libannocheck: Add libannocheck_reinit().
|
|
|
|
|
- GCC Plugin: Record -ftrivial-auto-var-init and -fzero-call-used-regs.
|
|
|
|
|
- Annocheck: Add future tests for -ftrivial-auto-var-init and -fzero-call-used-regs.
|
|
|
|
|
- Clang Plugin: Fix for building with Clang-15. (#2125875)
|
|
|
|
|
- Annocheck: Add a test for the inconsistent use of -Ofast. (#1248744)
|
|
|
|
|
- Plugin: Fix top level configuration support for RiscV.
|
|
|
|
|
- Annocheck: Improvements to the size tool.
|
|
|
|
|
- Annocheck: Fixes for libannocheck.h.
|
|
|
|
|
- Annocheck: Add automatic profile selection.
|
|
|
|
|
- Annocheck: Improve gap detection and reporting.
|
|
|
|
|
- Spec File: Use the %%dir directive in the %%files section to ensure that
|
|
|
|
|
- plugin directories are useable. (#2080454)
|
|
|
|
|
|
|
|
|
|
* Wed Jun 29 2022 Nick Clifton <nickc@redhat.com> - 10.76-5
|
|
|
|
|
- Fix tests to run in a scl environment. (#2099696)
|
|
|
|
|
|
|
|
|
|
* Fri Jun 24 2022 Nick Clifton <nickc@redhat.com> - 10.76-4
|
|
|
|
|
- Spec file: Remove bogus Provides for the annobin-doc subpackage. (#2097616)
|
|
|
|
|
|
|
|
|
|
* Mon Jun 20 2022 Nick Clifton <nickc@redhat.com> - 10.76-3
|
|
|
|
|
- Spec file: Correct the Provides for the annobin-doc subpackage again. (#2097616)
|
|
|
|
|
|
|
|
|
|
* Wed Jun 15 2022 Nick Clifton <nickc@redhat.com> - 10.76-1
|
|
|
|
|
- Spec file: Correct the Provides for the annobin-doc subpackage. (#2097065)
|
|
|
|
@ -520,19 +594,23 @@ fi
|
|
|
|
|
- Annocheck: Add GAPS test replacing --ignore-gaps.
|
|
|
|
|
- Annocheck: Fix covscan detected race condition between stat() and open().
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Nick Clifton <nickc@redhat.com> - 10.75-3
|
|
|
|
|
- Add in the missing gating.yaml file.
|
|
|
|
|
|
|
|
|
|
* Thu Jun 09 2022 Nick Clifton <nickc@redhat.com> - 10.75-1
|
|
|
|
|
- Annocheck: Fix covscan detected race condition between stat() and open().
|
|
|
|
|
* Wed Jun 08 2022 Nick Clifton <nickc@redhat.com> - 10.74-1
|
|
|
|
|
- Annocheck: Handle binaries created by Rust 1.18. (#2094420)
|
|
|
|
|
- Annocheck: Add optional function name to --skip arguments. (PR 29229)
|
|
|
|
|
|
|
|
|
|
* Tue Jun 07 2022 Nick Clifton <nickc@redhat.com> - 10.73-2
|
|
|
|
|
* Mon Jun 06 2022 Nick Clifton <nickc@redhat.com> - 10.73-2
|
|
|
|
|
- Default to using group attach because os s390 build problems.
|
|
|
|
|
|
|
|
|
|
* Mon Jun 06 2022 Nick Clifton <nickc@redhat.com> - 10.73-1
|
|
|
|
|
- Rebuild with scl macros in place. (#2091570)
|
|
|
|
|
- Annocheck: Fix handling of command line options that take arguments. (#2086850)
|
|
|
|
|
- Annocheck: Do not complain about unenabled -mbranch-protection option in AArch64 binaries. (#2078909)
|
|
|
|
|
|
|
|
|
|
* Fri May 27 2022 Nick Clifton <nickc@redhat.com> - 10.71-5
|
|
|
|
|
- Bump NVR to allow rebuild with BuildRequires temporarily set to systemOS.
|
|
|
|
|
|
|
|
|
|
* Wed May 11 2022 Nick Clifton <nickc@redhat.com> - 10.71-1
|
|
|
|
|
- Initial import of annobin sources for GTS12 / RHEL8. (#2077447)
|
|
|
|
|
- gcc-plugin: Fix typo in configure.ac.
|
|
|
|
|
|
|
|
|
|
* Tue May 10 2022 Nianqing Yao <imbearchild@outlook.com> - 10.70-2
|
|
|
|
|