Skip to content

Commit

Permalink
Merge pull request #5 from sailfishos/jb61002
Browse files Browse the repository at this point in the history
[binutils] Update to version 2.41. JB#61002
  • Loading branch information
mlehtima committed Aug 2, 2023
2 parents 4aa91fd + bc94f2d commit 7c6dd51
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 42 deletions.
2 changes: 1 addition & 1 deletion rpm/binutils-2.32-asneeded.patch
Expand Up @@ -2,7 +2,7 @@ diff --git a/ld/ldmain.c b/ld/ldmain.c
index 9290a189b0d..86fb10dc011 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -307,6 +307,8 @@ main (int argc, char **argv)
@@ -311,6 +311,8 @@ main (int argc, char **argv)
yydebug = 1;
}
#endif
Expand Down
28 changes: 20 additions & 8 deletions rpm/binutils.spec
Expand Up @@ -7,16 +7,15 @@

Summary: A GNU collection of binary utilities
Name: binutils
Version: 2.40
Version: 2.41
Release: 1
License: GPLv3+
URL: https://github.com/sailfishos/binutils
Source: %{name}-%{version}.tar.bz2
Source1: binutils_2.40-2ubuntu1.debian.tar.gz
Source1: binutils_2.41-1ubuntu1.debian.tar.gz
Source2: binutils-2.19.50.0.1-output-format.sed
Source200: precheckin.sh
Source201: README.PACKAGER
Patch1: 0001-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
Patch2: binutils-2.32-asneeded.patch

# MIPS gold support is not working as far as we know. The configure
Expand Down Expand Up @@ -103,7 +102,7 @@ Man and info pages for %{name}.
%package gprofng
Summary: Next Generating code profiling tool
Provides: gprofng = %{version}-%{release}
Requires: binutils >= %{version}
Requires: %{name} = %{version}-%{release}

%description gprofng
Gprofng is the GNU Next Generation profiler for analyzing the performance
Expand All @@ -120,7 +119,6 @@ do
patch -p1 -i debian/patches/$line
done

%patch1 -p1 -b .gdbdependencies
%patch2 -p1 -b .asneeded
# From here on this is based on Fedora's build

Expand Down Expand Up @@ -253,10 +251,17 @@ make CFLAGS="-g -fPIC $RPM_OPT_FLAGS -fvisibility=hidden" -C bfd
%make_build -C opcodes clean
%make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C opcodes

install -m 644 bfd/libbfd.a %{buildroot}%{_libdir}
# Rebuild libsframe.a with -fPIC.
%make_build -s -C libsframe clean
%set_build_flags
%make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libsframe

install -m 644 bfd/.libs/libbfd.a %{buildroot}%{_libdir}
install -m 644 libiberty/libiberty.a %{buildroot}%{_libdir}
install -m 644 include/libiberty.h %{buildroot}%{_includedir}
install -m 644 include/demangle.h %{buildroot}%{_includedir}
install -m 644 libsframe/.libs/libsframe.a %{buildroot}%{_libdir}

# Remove Windows/Novell only man pages
rm -f %{buildroot}%{_mandir}/man1/{dlltool,nlmconv,windres}*

Expand Down Expand Up @@ -304,8 +309,9 @@ tee %{buildroot}%{_libdir}/libbfd.so <<EOH

$OUTPUT_FORMAT

/* The libz dependency is unexpected by legacy build scripts. */
INPUT ( %{_libdir}/libbfd.a -liberty -lz )
/* The libz & libsframe dependencies are unexpected by legacy build scripts. */
/* The libdl dependency is for plugin support. (BZ 889134) */
INPUT ( %{_libdir}/libbfd.a %{_libdir}/libsframe.a -liberty -lz -ldl )
EOH

tee %{buildroot}%{_libdir}/libopcodes.so <<EOH
Expand Down Expand Up @@ -406,6 +412,9 @@ exit 0
%if %{enable_shared}
%{_libdir}/lib*.so
%{_libdir}/libctf*so.*
%if %{with gprofng}
%{_libdir}/libgprofng.so.*
%endif
%{_libdir}/libsframe*so.*
%exclude %{_libdir}/libbfd.so
%exclude %{_libdir}/libopcodes.so
Expand Down Expand Up @@ -434,6 +443,9 @@ exit 0
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/libbfd.so
%if %{with gprofng}
%{_libdir}/libgprofng.so
%endif
%{_libdir}/libopcodes.so
%{_libdir}/lib*.a
%endif # %{isnative}
Expand Down
Binary file removed rpm/binutils_2.40-2ubuntu1.debian.tar.gz
Binary file not shown.
Binary file added rpm/binutils_2.41-1ubuntu1.debian.tar.gz
Binary file not shown.
28 changes: 20 additions & 8 deletions rpm/cross-aarch64-binutils.spec
Expand Up @@ -7,16 +7,15 @@

Summary: A GNU collection of binary utilities
Name: cross-aarch64-binutils
Version: 2.40
Version: 2.41
Release: 1
License: GPLv3+
URL: https://github.com/sailfishos/binutils
Source: %{name}-%{version}.tar.bz2
Source1: binutils_2.40-2ubuntu1.debian.tar.gz
Source1: binutils_2.41-1ubuntu1.debian.tar.gz
Source2: binutils-2.19.50.0.1-output-format.sed
Source200: precheckin.sh
Source201: README.PACKAGER
Patch1: 0001-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
Patch2: binutils-2.32-asneeded.patch

# MIPS gold support is not working as far as we know. The configure
Expand Down Expand Up @@ -103,7 +102,7 @@ Man and info pages for %{name}.
%package gprofng
Summary: Next Generating code profiling tool
Provides: gprofng = %{version}-%{release}
Requires: binutils >= %{version}
Requires: %{name} = %{version}-%{release}

%description gprofng
Gprofng is the GNU Next Generation profiler for analyzing the performance
Expand All @@ -120,7 +119,6 @@ do
patch -p1 -i debian/patches/$line
done

%patch1 -p1 -b .gdbdependencies
%patch2 -p1 -b .asneeded
# From here on this is based on Fedora's build

Expand Down Expand Up @@ -253,10 +251,17 @@ make CFLAGS="-g -fPIC $RPM_OPT_FLAGS -fvisibility=hidden" -C bfd
%make_build -C opcodes clean
%make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C opcodes

install -m 644 bfd/libbfd.a %{buildroot}%{_libdir}
# Rebuild libsframe.a with -fPIC.
%make_build -s -C libsframe clean
%set_build_flags
%make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libsframe

install -m 644 bfd/.libs/libbfd.a %{buildroot}%{_libdir}
install -m 644 libiberty/libiberty.a %{buildroot}%{_libdir}
install -m 644 include/libiberty.h %{buildroot}%{_includedir}
install -m 644 include/demangle.h %{buildroot}%{_includedir}
install -m 644 libsframe/.libs/libsframe.a %{buildroot}%{_libdir}

# Remove Windows/Novell only man pages
rm -f %{buildroot}%{_mandir}/man1/{dlltool,nlmconv,windres}*

Expand Down Expand Up @@ -304,8 +309,9 @@ tee %{buildroot}%{_libdir}/libbfd.so <<EOH

$OUTPUT_FORMAT

/* The libz dependency is unexpected by legacy build scripts. */
INPUT ( %{_libdir}/libbfd.a -liberty -lz )
/* The libz & libsframe dependencies are unexpected by legacy build scripts. */
/* The libdl dependency is for plugin support. (BZ 889134) */
INPUT ( %{_libdir}/libbfd.a %{_libdir}/libsframe.a -liberty -lz -ldl )
EOH

tee %{buildroot}%{_libdir}/libopcodes.so <<EOH
Expand Down Expand Up @@ -406,6 +412,9 @@ exit 0
%if %{enable_shared}
%{_libdir}/lib*.so
%{_libdir}/libctf*so.*
%if %{with gprofng}
%{_libdir}/libgprofng.so.*
%endif
%{_libdir}/libsframe*so.*
%exclude %{_libdir}/libbfd.so
%exclude %{_libdir}/libopcodes.so
Expand Down Expand Up @@ -434,6 +443,9 @@ exit 0
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/libbfd.so
%if %{with gprofng}
%{_libdir}/libgprofng.so
%endif
%{_libdir}/libopcodes.so
%{_libdir}/lib*.a
%endif # %{isnative}
Expand Down
28 changes: 20 additions & 8 deletions rpm/cross-armv7hl-binutils.spec
Expand Up @@ -7,16 +7,15 @@

Summary: A GNU collection of binary utilities
Name: cross-armv7hl-binutils
Version: 2.40
Version: 2.41
Release: 1
License: GPLv3+
URL: https://github.com/sailfishos/binutils
Source: %{name}-%{version}.tar.bz2
Source1: binutils_2.40-2ubuntu1.debian.tar.gz
Source1: binutils_2.41-1ubuntu1.debian.tar.gz
Source2: binutils-2.19.50.0.1-output-format.sed
Source200: precheckin.sh
Source201: README.PACKAGER
Patch1: 0001-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
Patch2: binutils-2.32-asneeded.patch

# MIPS gold support is not working as far as we know. The configure
Expand Down Expand Up @@ -103,7 +102,7 @@ Man and info pages for %{name}.
%package gprofng
Summary: Next Generating code profiling tool
Provides: gprofng = %{version}-%{release}
Requires: binutils >= %{version}
Requires: %{name} = %{version}-%{release}

%description gprofng
Gprofng is the GNU Next Generation profiler for analyzing the performance
Expand All @@ -120,7 +119,6 @@ do
patch -p1 -i debian/patches/$line
done

%patch1 -p1 -b .gdbdependencies
%patch2 -p1 -b .asneeded
# From here on this is based on Fedora's build

Expand Down Expand Up @@ -253,10 +251,17 @@ make CFLAGS="-g -fPIC $RPM_OPT_FLAGS -fvisibility=hidden" -C bfd
%make_build -C opcodes clean
%make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C opcodes

install -m 644 bfd/libbfd.a %{buildroot}%{_libdir}
# Rebuild libsframe.a with -fPIC.
%make_build -s -C libsframe clean
%set_build_flags
%make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libsframe

install -m 644 bfd/.libs/libbfd.a %{buildroot}%{_libdir}
install -m 644 libiberty/libiberty.a %{buildroot}%{_libdir}
install -m 644 include/libiberty.h %{buildroot}%{_includedir}
install -m 644 include/demangle.h %{buildroot}%{_includedir}
install -m 644 libsframe/.libs/libsframe.a %{buildroot}%{_libdir}

# Remove Windows/Novell only man pages
rm -f %{buildroot}%{_mandir}/man1/{dlltool,nlmconv,windres}*

Expand Down Expand Up @@ -304,8 +309,9 @@ tee %{buildroot}%{_libdir}/libbfd.so <<EOH

$OUTPUT_FORMAT

/* The libz dependency is unexpected by legacy build scripts. */
INPUT ( %{_libdir}/libbfd.a -liberty -lz )
/* The libz & libsframe dependencies are unexpected by legacy build scripts. */
/* The libdl dependency is for plugin support. (BZ 889134) */
INPUT ( %{_libdir}/libbfd.a %{_libdir}/libsframe.a -liberty -lz -ldl )
EOH

tee %{buildroot}%{_libdir}/libopcodes.so <<EOH
Expand Down Expand Up @@ -406,6 +412,9 @@ exit 0
%if %{enable_shared}
%{_libdir}/lib*.so
%{_libdir}/libctf*so.*
%if %{with gprofng}
%{_libdir}/libgprofng.so.*
%endif
%{_libdir}/libsframe*so.*
%exclude %{_libdir}/libbfd.so
%exclude %{_libdir}/libopcodes.so
Expand Down Expand Up @@ -434,6 +443,9 @@ exit 0
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/libbfd.so
%if %{with gprofng}
%{_libdir}/libgprofng.so
%endif
%{_libdir}/libopcodes.so
%{_libdir}/lib*.a
%endif # %{isnative}
Expand Down
28 changes: 20 additions & 8 deletions rpm/cross-i486-binutils.spec
Expand Up @@ -7,16 +7,15 @@

Summary: A GNU collection of binary utilities
Name: cross-i486-binutils
Version: 2.40
Version: 2.41
Release: 1
License: GPLv3+
URL: https://github.com/sailfishos/binutils
Source: %{name}-%{version}.tar.bz2
Source1: binutils_2.40-2ubuntu1.debian.tar.gz
Source1: binutils_2.41-1ubuntu1.debian.tar.gz
Source2: binutils-2.19.50.0.1-output-format.sed
Source200: precheckin.sh
Source201: README.PACKAGER
Patch1: 0001-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
Patch2: binutils-2.32-asneeded.patch

# MIPS gold support is not working as far as we know. The configure
Expand Down Expand Up @@ -103,7 +102,7 @@ Man and info pages for %{name}.
%package gprofng
Summary: Next Generating code profiling tool
Provides: gprofng = %{version}-%{release}
Requires: binutils >= %{version}
Requires: %{name} = %{version}-%{release}

%description gprofng
Gprofng is the GNU Next Generation profiler for analyzing the performance
Expand All @@ -120,7 +119,6 @@ do
patch -p1 -i debian/patches/$line
done

%patch1 -p1 -b .gdbdependencies
%patch2 -p1 -b .asneeded
# From here on this is based on Fedora's build

Expand Down Expand Up @@ -253,10 +251,17 @@ make CFLAGS="-g -fPIC $RPM_OPT_FLAGS -fvisibility=hidden" -C bfd
%make_build -C opcodes clean
%make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C opcodes

install -m 644 bfd/libbfd.a %{buildroot}%{_libdir}
# Rebuild libsframe.a with -fPIC.
%make_build -s -C libsframe clean
%set_build_flags
%make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libsframe

install -m 644 bfd/.libs/libbfd.a %{buildroot}%{_libdir}
install -m 644 libiberty/libiberty.a %{buildroot}%{_libdir}
install -m 644 include/libiberty.h %{buildroot}%{_includedir}
install -m 644 include/demangle.h %{buildroot}%{_includedir}
install -m 644 libsframe/.libs/libsframe.a %{buildroot}%{_libdir}

# Remove Windows/Novell only man pages
rm -f %{buildroot}%{_mandir}/man1/{dlltool,nlmconv,windres}*

Expand Down Expand Up @@ -304,8 +309,9 @@ tee %{buildroot}%{_libdir}/libbfd.so <<EOH

$OUTPUT_FORMAT

/* The libz dependency is unexpected by legacy build scripts. */
INPUT ( %{_libdir}/libbfd.a -liberty -lz )
/* The libz & libsframe dependencies are unexpected by legacy build scripts. */
/* The libdl dependency is for plugin support. (BZ 889134) */
INPUT ( %{_libdir}/libbfd.a %{_libdir}/libsframe.a -liberty -lz -ldl )
EOH

tee %{buildroot}%{_libdir}/libopcodes.so <<EOH
Expand Down Expand Up @@ -406,6 +412,9 @@ exit 0
%if %{enable_shared}
%{_libdir}/lib*.so
%{_libdir}/libctf*so.*
%if %{with gprofng}
%{_libdir}/libgprofng.so.*
%endif
%{_libdir}/libsframe*so.*
%exclude %{_libdir}/libbfd.so
%exclude %{_libdir}/libopcodes.so
Expand Down Expand Up @@ -434,6 +443,9 @@ exit 0
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/libbfd.so
%if %{with gprofng}
%{_libdir}/libgprofng.so
%endif
%{_libdir}/libopcodes.so
%{_libdir}/lib*.a
%endif # %{isnative}
Expand Down

0 comments on commit 7c6dd51

Please sign in to comment.