void-packages/srcpkgs/vc/patches/dea29a67bd5b7523da7678eb5b37f42c0e2759b7.patch
2021-08-03 01:45:03 -03:00

31 lines
1.1 KiB
Diff

From dea29a67bd5b7523da7678eb5b37f42c0e2759b7 Mon Sep 17 00:00:00 2001
From: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>
Date: Fri, 25 Jun 2021 14:24:23 +0200
Subject: [PATCH] support GCC standard libraries which do not define
__GLIBC_PREREQ
---
Vc/global.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Vc/global.h b/Vc/global.h
index 6f85b3ce2..d19dc45c2 100644
--- a/Vc/global.h
+++ b/Vc/global.h
@@ -132,10 +132,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#ifdef Vc_GCC
-# if Vc_GCC >= 0x70000 && defined __i386__ && (!defined __GLIBC_PREREQ || !__GLIBC_PREREQ(2,26))
+# if Vc_GCC >= 0x70000 && defined __i386__
// GCC 7 changed alignof(max_align_t) to 16. glibc 2.26 followed with malloc in 2.26.
// 1. If GCC >= 7 and libc is not glibc max_align_t and malloc mismatch
// 2. If GCC >= 7 and libc is glibc < 2.26 max_align_t and malloc mismatch
+# ifdef __GLIBC_PREREQ
+# if __GLIBC_PREREQ(2,26)
+# define Vc_HAVE_STD_MAX_ALIGN_T 1
+# endif
+# endif
# elif Vc_GCC >= 0x40900
# define Vc_HAVE_STD_MAX_ALIGN_T 1
# else