From 35096580effde6532bbf7cd75e0a20fda7746603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Fri, 28 Jun 2024 10:13:22 +0200 Subject: [PATCH] LDFLAGS correction Resolves: RHEL-33503 --- .fmf/version | 1 + gating.yaml | 6 ++++++ ldflags.patch | 32 ++++++++++++++++++++++++++++++++ libzdnn.spec | 7 ++++++- whatever.fmf | 7 +++++++ 5 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 ldflags.patch create mode 100644 whatever.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..4ca9235 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-10 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/ldflags.patch b/ldflags.patch new file mode 100644 index 0000000..8b0f01e --- /dev/null +++ b/ldflags.patch @@ -0,0 +1,32 @@ +From 4ae92a0b84751aa5880f5fa8a18b2295de1b8adb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jakub=20=C4=8Cajka?= +Date: Fri, 21 Jun 2024 17:12:06 +0200 +Subject: [PATCH] fix: use system LDFLAGS (#20) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- pass system LDFLAGS to linker in all cases + +Signed-off-by: Jakub Čajka +--- + config.zdnn | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config.zdnn b/config.zdnn +index 2eb5948..0396098 100644 +--- a/config.zdnn ++++ b/config.zdnn +@@ -43,9 +43,9 @@ case "${target}" in + LIBNAME_PRIVATE="${LIBNAME_PRIVATE:-${LIBNAME}-private}" + LIBSONAME_PRIVATE="${LIBSONAME_PRIVATE:-${LIBNAME_PRIVATE}.so.0}" + LDFLAGS="${LDFLAGS:-}" +- LDFLAGS_SHARED="-shared -Wl,-Bsymbolic-functions -Wl,-soname,${LIBSONAME} -Wl,--version-script=zdnn.map -lm ${LDFLAGS_SHARED:-}" +- LDFLAGS_SHARED_EXPORTALL="-shared -Wl,-Bsymbolic-functions -Wl,-soname,${LIBSONAME_PRIVATE} -Wl,--version-script=zdnn_exportall.map -lm ${LDFLAGS_SHARED_EXPORTALL:-}" +- LDFLAGS_TEST="-L ../zdnn/${SODIR} -l${LIBNAME_PRIVATE#lib} ../zdnn/${SODIR}/${LIBNAME_PRIVATE}.so -lm ${LDFLAGS_TEST:-}" ++ LDFLAGS_SHARED="-shared -Wl,-Bsymbolic-functions -Wl,-soname,${LIBSONAME} -Wl,--version-script=zdnn.map -lm ${LDFLAGS_SHARED:-} ${LDFLAGS:-}" ++ LDFLAGS_SHARED_EXPORTALL="-shared -Wl,-Bsymbolic-functions -Wl,-soname,${LIBSONAME_PRIVATE} -Wl,--version-script=zdnn_exportall.map -lm ${LDFLAGS_SHARED_EXPORTALL:-} ${LDFLAGS:-}" ++ LDFLAGS_TEST="-L ../zdnn/${SODIR} -l${LIBNAME_PRIVATE#lib} ../zdnn/${SODIR}/${LIBNAME_PRIVATE}.so -lm ${LDFLAGS_TEST:-} ${LDFLAGS:-}" + LD_PATH_VAR="${LD_PATH_VAR:-LD_LIBRARY_PATH}" + ECHOFLAGS="-e" + ZDNN_TMAKE_FILES="t-static t-libsoname t-gccexpo t-symcheck t-listings" diff --git a/libzdnn.spec b/libzdnn.spec index e38d842..9588739 100644 --- a/libzdnn.spec +++ b/libzdnn.spec @@ -1,11 +1,12 @@ Name: libzdnn Version: 1.0.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Driver library for the IBM Z Neural Network Processing Assist Facility License: Apache-2.0 Url: https://github.com/IBM/zDNN Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: ldflags.patch ExclusiveArch: s390x BuildRequires: gcc @@ -76,6 +77,10 @@ ln -s -r $RPM_BUILD_ROOT%{_libdir}/libzdnn.so.%{version} $RPM_BUILD_ROOT%{_libdi %{_libdir}/libzdnn.a %changelog +* Fri Jun 28 2024 Jakub Čajka - 1.0.1-6 +- LDFLAGS correction +- Resolves: RHEL-33503 + * Mon Jun 24 2024 Troy Dawson - 1.0.1-5 - Bump release for June 2024 mass rebuild diff --git a/whatever.fmf b/whatever.fmf new file mode 100644 index 0000000..bf88586 --- /dev/null +++ b/whatever.fmf @@ -0,0 +1,7 @@ +summary: Basic smoke test +discover: + - name: internal + how: fmf + url: git://pkgs.devel.redhat.com/tests/libzdnn +execute: + how: tmt