Files

32 lines
1.2 KiB
Diff

From b3a59d265929a213f02a451bb63cea75d668a4d9 Mon Sep 17 00:00:00 2001
From: Bo Anderson <mail@boanderson.me>
Date: Thu, 2 Apr 2020 01:31:47 +0100
Subject: [PATCH] Fix compiler version check on macOS (#560)
Fixes #440.
---
src/tools/darwin.jam | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/tools/darwin.jam b/src/tools/darwin.jam
index 8d477410b0..97e7ecb851 100644
--- tools/build/src/tools/darwin.jam
+++ tools/build/src/tools/darwin.jam
@@ -137,13 +137,14 @@ rule init ( version ? : command * : options * : requirement * )
# - Set the toolset generic common options.
common.handle-options darwin : $(condition) : $(command) : $(options) ;
+ real-version = [ regex.split $(real-version) \\. ] ;
# - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
- if $(real-version) < "4.0.0"
+ if [ version.version-less $(real-version) : 4 0 ]
{
flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
}
# - GCC 4.2 and higher in Darwin does not have -Wno-long-double.
- if $(real-version) < "4.2.0"
+ if [ version.version-less $(real-version) : 4 2 ]
{
flags darwin.compile OPTIONS $(condition) : -Wno-long-double ;
}