From c0fa76ef66d0b3e9e0d4a1504fe611a6cb6e3a49 Mon Sep 17 00:00:00 2001 From: lingsheng Date: Tue, 10 Aug 2021 16:14:19 +0800 Subject: [PATCH] leverage GNU-source when building the library --- ...GNU-source-when-building-the-library.patch | 23 +++++++++++++++++++ libxsmm.spec | 9 ++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 leverage-GNU-source-when-building-the-library.patch diff --git a/leverage-GNU-source-when-building-the-library.patch b/leverage-GNU-source-when-building-the-library.patch new file mode 100644 index 0000000..a6861d3 --- /dev/null +++ b/leverage-GNU-source-when-building-the-library.patch @@ -0,0 +1,23 @@ +From 7b0bd558ac6ec7e192c271d5805f5fe663026697 Mon Sep 17 00:00:00 2001 +From: Hans Pabst +Date: Wed, 18 Mar 2020 14:54:39 +0100 +Subject: [PATCH] Issue #368: leverage GNU-source when building the library + (avoid it in case of header-only). + +--- + include/libxsmm_macros.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/include/libxsmm_macros.h b/include/libxsmm_macros.h +index 266ad97f51..3a0dd6f010 100644 +--- a/include/libxsmm_macros.h ++++ b/include/libxsmm_macros.h +@@ -693,7 +693,7 @@ LIBXSMM_API_INLINE int libxsmm_nonconst_int(int i) { return i; } + # endif + # endif + #endif +-#if !defined(_GNU_SOURCE) && 0 ++#if !defined(_GNU_SOURCE) && defined(LIBXSMM_BUILD) + # define _GNU_SOURCE + #endif + #if !defined(__STDC_FORMAT_MACROS) diff --git a/libxsmm.spec b/libxsmm.spec index 5f2481e..8e4c43e 100644 --- a/libxsmm.spec +++ b/libxsmm.spec @@ -8,12 +8,14 @@ Name: libxsmm Version: 1.15 -Release: 1 +Release: 2 Summary: Small dense or sparse matrix multiplications and convolutions for x86_64 License: BSD URL: https://github.com/hfp/libxsmm Source0: https://github.com/hfp/libxsmm/archive/%version/%name-%version.tar.gz +Patch0001: leverage-GNU-source-when-building-the-library.patch + BuildRequires: python3 openblas-devel %if %{with devtoolset} BuildRequires: devtoolset-6-gcc-gfortran devtoolset-6-gcc-c++ @@ -55,7 +57,7 @@ developing applications that use %name. %package_help %prep -%setup -q +%autosetup -n %{name}-%{version} -p1 find samples -name \*.vcxproj | xargs rm rm documentation/{README,LICENSE,CONTRIBUTING}.md rm documentation/gxm.md @@ -109,6 +111,9 @@ rm -r samples/cp2k/{build,.make,.state,cp2k-dbcsr,cp2k-collocate,cp2k-test.txt} %license LICENSE.md %changelog +* Tue Aug 10 2021 lingsheng - 1.15-2 +- leverage GNU-source when building the library + * Thu May 28 2020 openEuler Buildteam - 1.15-1 - Package init