leverage GNU-source when building the library

This commit is contained in:
lingsheng 2021-08-10 16:14:19 +08:00
parent b3aa7badc1
commit c0fa76ef66
2 changed files with 30 additions and 2 deletions

View File

@ -0,0 +1,23 @@
From 7b0bd558ac6ec7e192c271d5805f5fe663026697 Mon Sep 17 00:00:00 2001
From: Hans Pabst <hans.pabst@intel.com>
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)

View File

@ -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 <lingsheng@huawei.com> - 1.15-2
- leverage GNU-source when building the library
* Thu May 28 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.15-1
- Package init