From ab9f176e089280ca293c501a0189df04878aca297a036b8069ad4f3543674cf9 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Sat, 9 Mar 2024 18:12:22 +0000 Subject: [PATCH] Accepting request 1156461 from home:jamborm:os-patchelf Make patchelf buildable (and pass tests) on Leap and SLE OBS-URL: https://build.opensuse.org/request/show/1156461 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/patchelf?expand=0&rev=41 --- fix-rename-dynamic-symbols.sh-test-issue-503.patch | 13 +++++++++++++ patchelf.changes | 9 +++++++++ patchelf.spec | 13 ++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 fix-rename-dynamic-symbols.sh-test-issue-503.patch diff --git a/fix-rename-dynamic-symbols.sh-test-issue-503.patch b/fix-rename-dynamic-symbols.sh-test-issue-503.patch new file mode 100644 index 0000000..c5524f6 --- /dev/null +++ b/fix-rename-dynamic-symbols.sh-test-issue-503.patch @@ -0,0 +1,13 @@ +Index: patchelf-0.18.0/tests/Makefile.in +=================================================================== +--- patchelf-0.18.0.orig/tests/Makefile.in ++++ patchelf-0.18.0/tests/Makefile.in +@@ -729,7 +729,7 @@ many_syms_main_SOURCES = many-syms-main. + many_syms_main_LDFLAGS = $(LDFLAGS_local) + many_syms_main_LDADD = -lmany-syms $(AM_LDADD) + many_syms_main_DEPENDENCIES = libmany-syms.so +-many_syms_main_CFLAGS = -pie ++many_syms_main_CFLAGS = -pie -fPIE + libmany_syms_so_SOURCES = many-syms.c + libmany_syms_so_LDFLAGS = $(LDFLAGS_sharedlib) + no_rpath_SOURCES = no-rpath.c diff --git a/patchelf.changes b/patchelf.changes index 4b9086a..306332d 100644 --- a/patchelf.changes +++ b/patchelf.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Mar 8 23:25:32 UTC 2024 - Martin Jambor + +- Make the package buildable also on Leap 15.6 and SLE 15 SP 6. + * Conditionally compile with gcc 13. + * fix-rename-dynamic-symbols.sh-test-issue-503.patch new patch to + fix upstream (github) issue 503, not using the correct flags to + build a binary as a part of the rename-dynamic-symbols.sh test. + ------------------------------------------------------------------- Mon Dec 4 07:29:40 UTC 2023 - Duraisankar P diff --git a/patchelf.spec b/patchelf.spec index e55de2a..7f0d34a 100644 --- a/patchelf.spec +++ b/patchelf.spec @@ -1,7 +1,7 @@ # # spec file for package patchelf # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,14 @@ License: GPL-3.0-only Group: Development/Libraries/C and C++ URL: https://nixos.org/patchelf.html Source: https://github.com/NixOS/patchelf/releases/download/%{version}/patchelf-%{version}.tar.bz2 +Patch1: fix-rename-dynamic-symbols.sh-test-issue-503.patch + +%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150600 +BuildRequires: gcc13 +BuildRequires: gcc13-c++ +%else BuildRequires: gcc-c++ +%endif %description PatchELF is a simple utility for modifing existing ELF executables and @@ -35,6 +42,10 @@ executables and change the RPATH of executables and libraries. %autosetup -p1 %build +%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150600 +export CC=gcc-13 +export CXX=g++-13 +%endif %configure %make_build