libxsmm/leverage-GNU-source-when-building-the-library.patch
2021-08-10 16:14:19 +08:00

24 lines
776 B
Diff

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)