From 5c6e4fd8df3d044fa907bc737954ddc7e5c5f40c Mon Sep 17 00:00:00 2001 From: William Cohen Date: Fri, 26 Apr 2024 14:35:13 -0400 Subject: [PATCH] Resolves: RHEL-33515 --- papi-libsde.patch | 33 +++++++++++++++++++++++++++++++++ papi.spec | 7 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 papi-libsde.patch diff --git a/papi-libsde.patch b/papi-libsde.patch new file mode 100644 index 0000000..7fb522b --- /dev/null +++ b/papi-libsde.patch @@ -0,0 +1,33 @@ +commit 2f37f74ea25f850835b22fa617938264bd158134 +Author: William Cohen +Date: Thu Apr 25 10:55:36 2024 -0400 + + SDE_LIB: Build libsde.so.1.0 with the CFLAGS and LDFLAGS passed in + + A recent annocheck of the papi RPMS showed that libsde.so.1.0 was not + built with the expected flags passed into the RPM build. Minor + changes were made to src/sde_lib/Makefile to use the CFLAGS and + LDFLAGS passed in. + +diff --git a/src/sde_lib/Makefile b/src/sde_lib/Makefile +index 67ef5987..8518f92e 100644 +--- a/src/sde_lib/Makefile ++++ b/src/sde_lib/Makefile +@@ -1,7 +1,7 @@ + CC ?= gcc + SDE_INC = -I. -I.. + SDE_LD = -ldl -pthread +-CFLAGS = -Wextra -Wall -O2 ++CFLAGS += -Wextra -Wall -O2 + + %_d.o: %.c + $(CC) -c -Bdynamic -fPIC -shared -fvisibility=hidden $(CFLAGS) $(SDE_INC) $< -o $@ +@@ -14,7 +14,7 @@ SOBJS=$(patsubst %.c,%_s.o,$(wildcard *.c)) + all: dynamic static + + dynamic: $(DOBJS) +- $(CC) -Bdynamic -fPIC -shared -Wl,-soname -Wl,libsde.so -fvisibility=hidden $(CFLAGS) $(DOBJS) -lrt -ldl -pthread -o libsde.so.1.0 ++ $(CC) $(LDFLAGS) -Bdynamic -fPIC -shared -Wl,-soname -Wl,libsde.so -fvisibility=hidden $(CFLAGS) $(DOBJS) -lrt -ldl -pthread -o libsde.so.1.0 + rm -f *_d.o + + static: $(SOBJS) diff --git a/papi.spec b/papi.spec index 18afbdc..1875195 100644 --- a/papi.spec +++ b/papi.spec @@ -15,13 +15,14 @@ Summary: Performance Application Programming Interface Name: papi Version: 7.1.0 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD-3-Clause Requires: papi-libs = %{version}-%{release} URL: http://icl.cs.utk.edu/papi/ Source0: http://icl.cs.utk.edu/projects/papi/downloads/%{name}-%{version}.tar.gz Patch1: papi-python3.patch Patch5: papi-nostatic.patch +Patch6: papi-libsde.patch BuildRequires: make BuildRequires: autoconf BuildRequires: doxygen @@ -95,6 +96,7 @@ the PAPI user-space libraries and interfaces. %setup -q %patch 1 -p1 -b .python3 %patch 5 -p1 +%patch 6 -p1 -b .flags %build @@ -189,6 +191,9 @@ find %{buildroot} -type f -executable ! -iname "*.py" ! -iname "*.sh" | xargs ch %endif %changelog +* Fri Apr 26 2024 William Cohen - 7.1.0-4 +- Ensure sde library built with proper flags. (RHEL-33515) + * Thu Jan 25 2024 Fedora Release Engineering - 7.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild