%global pkgvers 1 %global scdate0 20240129 %global sctags0 binutils-2_42 %global scfilt0 tags/binutils.*^{} %global source0 https://github.com/bminor/binutils-gdb.git %define target avr Name: %{target}-binutils Version: %(curl -s https://raw.githubusercontent.com/bminor/binutils-gdb/%{sctags0}/bfd/version.m4 | cut -d"[" -f3 | cut -d"]" -f1) Release: %{scdate0}.%{pkgvers}%{?dist} Summary: Cross Compiling GNU binutils targeted at %{target} Epoch: 1 License: GPLv2+ URL: http://www.gnu.org/software/binutils # add avr-size options: --format=avr -mcu=XX Patch0: binutils-avr-plugin.patch Patch1: binutils-avr-size.patch BuildRequires: gcc flex bison git gawk autoconf automake BuildRequires: zlib-devel gettext-devel perl-podlators texinfo texinfo-tex %if 0%{?fedora} BuildRequires: ppl-devel cloog %endif %global _default_patch_fuzz 500 %description This is a Cross Compiling version of GNU binutils, which can be used to assemble and link binaries for the %{target} platform, instead of for the native %{_arch} platform. %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{sctags0} %{source0} . git fetch --depth 1 origin %{sctags0} git reset --hard %{sctags0} git --no-pager log --format=fuller %autosetup -D -p 1 -T -c -n %{name} rm -rf gdb sim gprofng rm -rf libdecnumber readline %build mkdir -p build/gas/doc pushd build CFLAGS="$RPM_OPT_FLAGS" \ ../configure --prefix=%{_prefix} \ --libdir=%{_libdir} --mandir=%{_mandir} \ --infodir=%{_infodir} --target=%{target} \ --with-system-zlib \ --with-debuginfod=no \ --enable-lto \ --enable-plugins \ --enable-multilib \ --disable-werror \ --disable-nls \ --disable-shared \ --disable-threads %make_build popd %install pushd build %make_install popd # these are for win targets only rm %{buildroot}%{_mandir}/man1/%{target}-{dlltool,windres}.1 # we don't want these as we are a cross version rm -r %{buildroot}%{_infodir} rm %{buildroot}%{_libdir}/libiberty.a ||: rm %{buildroot}%{_libdir}/bfd-plugins/libdep.a ||: %files %doc README %doc COPYING* %{_prefix}/%{target} %{_bindir}/%{target}-* %{_mandir}/man1/%{target}-*.1.gz %changelog * Sat Jun 18 2022 Balint Cristian - git update releases