summarylogtreecommitdiffstats
path: root/895.patch
blob: 28f6df3aa9e08708e85819399612ac203085037d (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
26
From e0f139db37b3ad7597900b0e98b14b832b00c4a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jochen=20J=C3=A4gers?= <jochen.jaegers@riedel-at.de>
Date: Mon, 18 May 2020 14:50:29 +0200
Subject: [PATCH] fix gcc version detection

---
 SConstruct | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/SConstruct b/SConstruct
index c5ae1936..5150de94 100644
--- a/SConstruct
+++ b/SConstruct
@@ -158,10 +158,8 @@ polyfill_libs = [] # boost libraries used as drop in replacements for incomplete
 env_cpp11 = env.Clone ()
 
 if env_cpp11['CXX'].startswith('g++'):
-   # TODO: check g++ version
-   GCC_VERSION = check_output([env_cpp11['CXX'], '-dumpversion']).decode("utf-8")
-
-   if GCC_VERSION > "4.4.0":
+   GCC_VERSION = check_output([env_cpp11['CXX'], '-dumpversion']).decode("utf-8").strip().split(".")
+   if int(GCC_VERSION[0]) > 4 or (int(GCC_VERSION[0]) == 4 and int(GCC_VERSION[1]) > 4):
       print("C++11 build environment partially enabled")
       env_cpp11.Append(WSPP_CPP11_ENABLED = "true",CXXFLAGS = ['-std=c++0x'],TOOLSET = ['g++'],CPPDEFINES = ['_WEBSOCKETPP_CPP11_STL_'])
    else: