spack/var/spack/repos/builtin/packages/python/intel-3.6.7.patch
Adam J. Stewart 526ee113ea
Default to Python 3.7 (#10319)
* Default to Python 3

* Fix build with Intel compilers
2019-10-22 10:22:32 -05:00

39 lines
1.3 KiB
Diff

From 87ed388f41d761ddddc8447e5104569f2436c005 Mon Sep 17 00:00:00 2001
From: Victor Stinner <vstinner@python.org>
Date: Fri, 11 Oct 2019 15:13:51 +0200
Subject: [PATCH] bpo-37415: Fix stdatomic.h header check for ICC compiler
Fix stdatomic.h header check for ICC compiler: the ICC implementation
lacks atomic_uintptr_t type which is needed by Python.
Test:
* atomic_int and atomic_uintptr_t types
* atomic_load_explicit() and atomic_store_explicit()
* memory_order_relaxed and memory_order_seq_cst constants
But don't test ATOMIC_VAR_INIT(): it's not used in Python.
---
configure | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index f1979c1b8124c..1b30a848a77e7 100755
--- a/configure
+++ b/configure
@@ -16734,9 +16722,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#include <stdatomic.h>
- atomic_int value = ATOMIC_VAR_INIT(1);
+ atomic_int int_var;
+ atomic_uintptr_t uintptr_var;
int main() {
- int loaded_value = atomic_load(&value);
+ atomic_store_explicit(&int_var, 5, memory_order_relaxed);
+ atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
+ int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
return 0;
}