aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-opencl/fix-compiler-choice.patch
blob: 1de460e9ccd83dc2546b26a6c29669ed87c7373d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 2dd4a31f03c2fbf7504dca64a9f66c63fc37f018 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Fri, 3 May 2019 17:58:49 -0500
Subject: [PATCH] Try -std=gnu++14 before c++14
 (https://github.com/inducer/pyopencl/issues/280)

---
 aksetup_helper.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/aksetup_helper.py b/aksetup_helper.py
index e86f4cd..f90d085 100644
--- a/aksetup_helper.py
+++ b/aksetup_helper.py
@@ -917,7 +917,9 @@ def cpp_flag(compiler):
 
     The c++14 is prefered over c++11 (when it is available).
     """
-    if has_flag(compiler, '-std=c++14'):
+    if has_flag(compiler, '-std=gnu++14'):
+        return '-std=gnu++14'
+    elif has_flag(compiler, '-std=c++14'):
         return '-std=c++14'
     elif has_flag(compiler, '-std=c++11'):
         return '-std=c++11'