Compare commits
1 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
84bef3a955 |
85
binutils-workaround-premature-libsframe-uninst.diff
Normal file
85
binutils-workaround-premature-libsframe-uninst.diff
Normal file
@@ -0,0 +1,85 @@
|
||||
Hack alert related to the introduction of the libsframe2 package!
|
||||
|
||||
Normally readelf is linked dynamically against libsframe.so.2, this
|
||||
makes it link statically for the following reason:
|
||||
|
||||
after rpmbuild builds the package we run a couple checks, among them
|
||||
we install the just built rpms, and then remove them again
|
||||
(in 99-check-remove-rpms). But we don't remove packages that were
|
||||
already installed before. When we split libsframe2 from binutils
|
||||
the following situation occurs in the build system:
|
||||
|
||||
1) binutils from distro is installed, no libsframe2 exists yet
|
||||
2) ... package builds ...
|
||||
3) binutils and libsframe2 (just built) are installed
|
||||
4) libsframe2 is removed, binutils is _not_ removed (it was
|
||||
installed before building already)
|
||||
|
||||
The readelf that's now in the buildroot (from the new binutils packages)
|
||||
links against libsframe.so.2 dynamic, but that one was removed in step 4
|
||||
above! readelf can't be executed and rpmlint completely falls over
|
||||
failing the build.
|
||||
|
||||
So, as temporary measure, we link statically. The removal of the
|
||||
libsframe2 package then doesn't matter. Once we get this in the distro
|
||||
we can switch back to linking dynamically because then the libsframe2
|
||||
package will have been installed before build as well (like binutils)
|
||||
and will _not_ be removed by the post-build-checks.
|
||||
|
||||
|
||||
Index: binutils-2.45/binutils/Makefile.am
|
||||
===================================================================
|
||||
--- binutils-2.45.orig/binutils/Makefile.am 2025-07-27 01:00:00.000000000 +0200
|
||||
+++ binutils-2.45/binutils/Makefile.am 2026-03-10 17:19:10.507052021 +0100
|
||||
@@ -176,7 +176,8 @@ LIBCTF =
|
||||
LIBCTF_NOBFD =
|
||||
endif
|
||||
|
||||
-LIBSFRAME = ../libsframe/libsframe.la
|
||||
+#LIBSFRAME = ../libsframe/libsframe.la
|
||||
+LIBSFRAME = ../libsframe/.libs/libsframe.a
|
||||
|
||||
LIBIBERTY = ../libiberty/libiberty.a
|
||||
|
||||
Index: binutils-2.45/binutils/Makefile.in
|
||||
===================================================================
|
||||
--- binutils-2.45.orig/binutils/Makefile.in 2025-07-27 01:00:00.000000000 +0200
|
||||
+++ binutils-2.45/binutils/Makefile.in 2026-03-10 17:35:09.627318609 +0100
|
||||
@@ -746,7 +746,8 @@ OPCODES = ../opcodes/libopcodes.la
|
||||
@ENABLE_LIBCTF_TRUE@LIBCTF = ../libctf/libctf.la
|
||||
@ENABLE_LIBCTF_FALSE@LIBCTF_NOBFD =
|
||||
@ENABLE_LIBCTF_TRUE@LIBCTF_NOBFD = ../libctf/libctf-nobfd.la
|
||||
-LIBSFRAME = ../libsframe/libsframe.la
|
||||
+#LIBSFRAME = ../libsframe/libsframe.la
|
||||
+LIBSFRAME = ../libsframe/.libs/libsframe.a
|
||||
LIBIBERTY = ../libiberty/libiberty.a
|
||||
POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
|
||||
EXPECT = expect
|
||||
Index: binutils-2.45/bfd/Makefile.am
|
||||
===================================================================
|
||||
--- binutils-2.45.orig/bfd/Makefile.am 2025-07-27 01:00:00.000000000 +0200
|
||||
+++ binutils-2.45/bfd/Makefile.am 2026-03-10 17:48:32.624849274 +0100
|
||||
@@ -785,7 +785,8 @@ ofiles: stamp-ofiles ; @true
|
||||
libbfd_la_SOURCES = $(BFD32_LIBS_CFILES)
|
||||
EXTRA_libbfd_la_SOURCES = $(CFILES)
|
||||
libbfd_la_DEPENDENCIES = $(OFILES) ofiles ../libsframe/libsframe.la
|
||||
-libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) $(ZLIB) $(ZSTD_LIBS) ../libsframe/libsframe.la
|
||||
+#libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) $(ZLIB) $(ZSTD_LIBS) ../libsframe/libsframe.la
|
||||
+libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) $(ZLIB) $(ZSTD_LIBS) ../libsframe/.libs/libsframe.a
|
||||
libbfd_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@
|
||||
|
||||
# This file holds an array associating configuration triplets and
|
||||
Index: binutils-2.45/bfd/Makefile.in
|
||||
===================================================================
|
||||
--- binutils-2.45.orig/bfd/Makefile.in 2025-07-27 01:00:00.000000000 +0200
|
||||
+++ binutils-2.45/bfd/Makefile.in 2026-03-10 17:48:51.441165631 +0100
|
||||
@@ -1212,7 +1212,8 @@ OFILES = $(BFD_BACKENDS) $(BFD_MACHINES)
|
||||
libbfd_la_SOURCES = $(BFD32_LIBS_CFILES)
|
||||
EXTRA_libbfd_la_SOURCES = $(CFILES)
|
||||
libbfd_la_DEPENDENCIES = $(OFILES) ofiles ../libsframe/libsframe.la
|
||||
-libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) $(ZLIB) $(ZSTD_LIBS) ../libsframe/libsframe.la
|
||||
+#libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) $(ZLIB) $(ZSTD_LIBS) ../libsframe/libsframe.la
|
||||
+libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) $(ZLIB) $(ZSTD_LIBS) ../libsframe/.libs/libsframe.a
|
||||
BFD_H_FILES = bfd-in.h libbfd.c hash.c section.c syms.c \
|
||||
archive.c archures.c bfd.c bfdio.c \
|
||||
cache.c compress.c corefile.c format.c linker.c opncls.c \
|
||||
@@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 10 16:57:59 UTC 2026 - Michael Matz <matz@suse.com>
|
||||
|
||||
- Migrate from update-alternatives to libalternatives (jsc#PED-15667).
|
||||
- Update %suse_version > 1600 checks (jsc#PED-15792).
|
||||
- Split new libsframe2 package from binutils (shared lib policy).
|
||||
- Make (currently inactive) gold subpackage no require binutils
|
||||
in a specific version.
|
||||
- Add binutils-workaround-premature-libsframe-uninst.diff for
|
||||
this to temporarily avoid 99-check-remove-rpms getting in the way.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 3 14:06:37 UTC 2025 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ Release: 0
|
||||
|
||||
# disable libalternatives for now until it's changed to not
|
||||
# introduce cmake/cunit-tests into the bootstrap cycle
|
||||
%if 0 && 0%{?suse_version} > 1500
|
||||
%if 0%{?suse_version} >= 1600
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
@@ -167,7 +167,16 @@ Patch77: pr33502.diff
|
||||
Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
Patch100: binutils-workaround-premature-libsframe-uninst.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# Hack. See binutils-workaround-premature-libsframe-uninst.diff
|
||||
# until libsframe2, the package, is in the distro we need to
|
||||
# link all internal components of binutils statically against libsframe.
|
||||
# But then there's no reason for rpm to generate a dependency against
|
||||
# libsframe.so.2, but we _need_ that dependency to exist once we want
|
||||
# to link dynamically again. So, force it for now. Remove this when
|
||||
# the above patch is removed.
|
||||
Requires: libsframe2
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
@@ -183,7 +192,9 @@ to compile a program or kernel.
|
||||
Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
# we once required binutils=version-release here, but that seems
|
||||
# overly strict
|
||||
Requires: binutils
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
@@ -234,6 +245,16 @@ Group: Development/Tools/Building
|
||||
This package includes the libctf-nobfd shared library.
|
||||
The Compact C Type Format (CTF) is a way of representing information about a binary program
|
||||
|
||||
%package -n libsframe2
|
||||
Summary: SFrame stack trace format library (runtime)
|
||||
License: GFDL-1.3-only AND GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
|
||||
%description -n libsframe2
|
||||
This package includes the libsframe shared library.
|
||||
The SFrame format is a compact way to represent information
|
||||
necessary to generate stack traces.
|
||||
|
||||
%package -n gprofng
|
||||
Summary: The next generation profiling tool for Linux
|
||||
License: GFDL-1.3-only AND GPL-3.0-or-later
|
||||
@@ -312,6 +333,7 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
|
||||
%patch -P 92
|
||||
%patch -P 93 -p1
|
||||
%endif
|
||||
%patch -P 100 -p1
|
||||
#
|
||||
# test_vanilla
|
||||
%endif
|
||||
@@ -330,7 +352,7 @@ echo "==== any FAIL: lines from here until the %check section are irrelevant ===
|
||||
# gcc15 and up default to c23, these older binutils would need patches
|
||||
# for that. As an impeding version update fixes that as well, simply
|
||||
# override the compiler instead of bothering with backports
|
||||
%if %{suse_version} > 1600
|
||||
%if %{suse_version} >= 1699
|
||||
CC="gcc -std=gnu17"
|
||||
export CC
|
||||
%endif
|
||||
@@ -427,7 +449,7 @@ cd build-dir
|
||||
|
||||
# FIXME: enable in future, when at least llvm15,llvm17,golang are
|
||||
# fixed to accept zstd
|
||||
#%if %{suse_version} > 1600
|
||||
#%if %{suse_version} >= 1699
|
||||
# --enable-default-compressed-debug-sections-algorithm=zstd \
|
||||
#%endif
|
||||
|
||||
@@ -567,9 +589,11 @@ ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
%ifarch %gold_archs
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
%endif
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
@@ -671,6 +695,7 @@ rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
%post -n libsframe2 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
@@ -707,6 +732,7 @@ fi;
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
%postun -n libsframe2 -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
%endif
|
||||
@@ -718,7 +744,6 @@ fi;
|
||||
%{_prefix}/%{HOST}/bin/*
|
||||
%{_prefix}/%{HOST}/lib/ldscripts
|
||||
%{_libdir}/ldscripts
|
||||
%{_libdir}/libsframe.so.*
|
||||
%if %build_gprofng
|
||||
%{_libdir}/libgprofng.so.*
|
||||
%endif
|
||||
@@ -777,6 +802,10 @@ fi;
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libctf-nobfd.so.*
|
||||
|
||||
%files -n libsframe2
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libsframe.so.*
|
||||
|
||||
%if %{suse_version} > 1500
|
||||
%ifarch %ix86 x86_64 %x86_64 aarch64
|
||||
%files -n gprofng
|
||||
|
||||
Reference in New Issue
Block a user