Skip to content

Commit e2185f5

Browse files
committed
Fix clang version check with Xcode11.4
From upstream patch. See: boostorg/build#440 boostorg/build#560
1 parent 9293c64 commit e2185f5

8 files changed

+140
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From 40960b23338da0a359d6aa83585ace09ad8804d2 Mon Sep 17 00:00:00 2001
2+
From: Bo Anderson <mail@boanderson.me>
3+
Date: Sun, 29 Mar 2020 14:55:08 +0100
4+
Subject: [PATCH] Fix compiler version check on macOS
5+
6+
Fixes #440.
7+
---
8+
src/tools/darwin.jam | 5 +++--
9+
1 file changed, 3 insertions(+), 2 deletions(-)
10+
11+
diff --git a/src/tools/darwin.jam b/src/tools/darwin.jam
12+
index 8d477410b0..97e7ecb851 100644
13+
--- a/tools/build/v2/tools/darwin.jam
14+
+++ b/tools/build/v2/tools/darwin.jam
15+
@@ -137,13 +137,14 @@ rule init ( version ? : command * : options * : requirement * )
16+
# - Set the toolset generic common options.
17+
common.handle-options darwin : $(condition) : $(command) : $(options) ;
18+
19+
+ real-version = [ regex.split $(real-version) \\. ] ;
20+
# - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
21+
- if $(real-version) < "4.0.0"
22+
+ if [ version.version-less $(real-version) : 4 0 ]
23+
{
24+
flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
25+
}
26+
# - GCC 4.2 and higher in Darwin does not have -Wno-long-double.
27+
- if $(real-version) < "4.2.0"
28+
+ if [ version.version-less $(real-version) : 4 2 ]
29+
{
30+
flags darwin.compile OPTIONS $(condition) : -Wno-long-double ;
31+
}

10.9-libcxx/stable/main/finkinfo/libs/boost1.55.info

+4
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ PatchFile2-MD5: 29669ee97b0294c63850e7c899dc0af6
9090
### Upstream fix for clang 3.4 https://github.com/boostorg/atomic/commit/6bb71fdd8f7cc346d90fb14beb38b7297fc1ffd9
9191
PatchFile3: boost1.55-atomic.patch
9292
PatchFile3-MD5: 9dccb1387d5d59bc1b392a1686fd827a
93+
# Fix poor clang version comparison that breaks on v11.0.3
94+
PatchFile4: boost1.55-clang11-version.patch
95+
PatchFile4-MD5: b405a6698f5cd0c565be4f7a876d1768
9396
PatchScript:<<
9497
#!/bin/sh -ex
9598
sed 's|@BOOST_MINOR@|%type_pkg[boost]|g' < %{PatchFile} | patch -p1
@@ -103,6 +106,7 @@ PatchScript:<<
103106
*) ;;
104107
esac
105108
patch -p0 < %{PatchFile3}
109+
patch -p1 < %{PatchFile4}
106110
perl -pi -e 's|debug release|release|;s|\<runtime-link\>shared \<runtime-link\>static|\<runtime-link\>shared|' Jamroot
107111
#if [ "`uname -r | cut -d. -f1`" -lt "11" ]; then
108112
# perl -pi -e 's|g\+\+|%p/bin/g++-fsf-4.9|g' tools/build/v2/tools/darwin.jam
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From 40960b23338da0a359d6aa83585ace09ad8804d2 Mon Sep 17 00:00:00 2001
2+
From: Bo Anderson <mail@boanderson.me>
3+
Date: Sun, 29 Mar 2020 14:55:08 +0100
4+
Subject: [PATCH] Fix compiler version check on macOS
5+
6+
Fixes #440.
7+
---
8+
src/tools/darwin.jam | 5 +++--
9+
1 file changed, 3 insertions(+), 2 deletions(-)
10+
11+
diff --git a/src/tools/darwin.jam b/src/tools/darwin.jam
12+
index 8d477410b0..97e7ecb851 100644
13+
--- a/tools/build/src/tools/darwin.jam
14+
+++ b/tools/build/src/tools/darwin.jam
15+
@@ -137,13 +137,14 @@ rule init ( version ? : command * : options * : requirement * )
16+
# - Set the toolset generic common options.
17+
common.handle-options darwin : $(condition) : $(command) : $(options) ;
18+
19+
+ real-version = [ regex.split $(real-version) \\. ] ;
20+
# - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
21+
- if $(real-version) < "4.0.0"
22+
+ if [ version.version-less $(real-version) : 4 0 ]
23+
{
24+
flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
25+
}
26+
# - GCC 4.2 and higher in Darwin does not have -Wno-long-double.
27+
- if $(real-version) < "4.2.0"
28+
+ if [ version.version-less $(real-version) : 4 2 ]
29+
{
30+
flags darwin.compile OPTIONS $(condition) : -Wno-long-double ;
31+
}

10.9-libcxx/stable/main/finkinfo/libs/boost1.58.info

+4
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,14 @@ Source-Checksum: SHA1(2fc96c1651ac6fe9859b678b165bd78dc211e881)
8585

8686
PatchFile: boost1.58.patch
8787
PatchFile-MD5: db1561fdbd80cb70f94b046c514006b3
88+
# Fix poor clang version comparison that breaks on v11.0.3
89+
PatchFile2: boost1.58-clang11-version.patch
90+
PatchFile2-MD5: 95d3ac2dc9ffa9eeb39c04ef8b1aa6f3
8891
### python3.[4] suffixes their directories w/ 'm', so need to patch detection to work
8992
PatchScript:<<
9093
#!/bin/sh -ex
9194
sed -e 's|@FINK_PREFIX@|%p|g' -e 's|@BOOST_MINOR@|%type_pkg[boost]|g' < %{PatchFile} | patch -p1
95+
patch -p1 < %{PatchFile2}
9296
#sed 's|@BOOST_MINOR@|%type_pkg[boost]|g' < %{PatchFile} | patch -p1
9397
### Real ugly hack because the python linking code ignores the
9498
### absolute path install_name we try to give the libraries.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From 40960b23338da0a359d6aa83585ace09ad8804d2 Mon Sep 17 00:00:00 2001
2+
From: Bo Anderson <mail@boanderson.me>
3+
Date: Sun, 29 Mar 2020 14:55:08 +0100
4+
Subject: [PATCH] Fix compiler version check on macOS
5+
6+
Fixes #440.
7+
---
8+
src/tools/darwin.jam | 5 +++--
9+
1 file changed, 3 insertions(+), 2 deletions(-)
10+
11+
diff --git a/src/tools/darwin.jam b/src/tools/darwin.jam
12+
index 8d477410b0..97e7ecb851 100644
13+
--- a/tools/build/src/tools/darwin.jam
14+
+++ b/tools/build/src/tools/darwin.jam
15+
@@ -137,13 +137,14 @@ rule init ( version ? : command * : options * : requirement * )
16+
# - Set the toolset generic common options.
17+
common.handle-options darwin : $(condition) : $(command) : $(options) ;
18+
19+
+ real-version = [ regex.split $(real-version) \\. ] ;
20+
# - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
21+
- if $(real-version) < "4.0.0"
22+
+ if [ version.version-less $(real-version) : 4 0 ]
23+
{
24+
flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
25+
}
26+
# - GCC 4.2 and higher in Darwin does not have -Wno-long-double.
27+
- if $(real-version) < "4.2.0"
28+
+ if [ version.version-less $(real-version) : 4 2 ]
29+
{
30+
flags darwin.compile OPTIONS $(condition) : -Wno-long-double ;
31+
}

10.9-libcxx/stable/main/finkinfo/libs/boost1.63.info

+4
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,14 @@ Source-MD5: 1c837ecd990bb022d07e7aab32b09847
8383
Source-Checksum: SHA1(9f1dd4fa364a3e3156a77dc17aa562ef06404ff6)
8484
PatchFile: boost1.63.patch
8585
PatchFile-MD5: 59991ee449df0a173c4b8875194b1587
86+
# Fix poor clang version comparison that breaks on v11.0.3
87+
PatchFile2: boost1.63-clang11-version.patch
88+
PatchFile2-MD5: 95d3ac2dc9ffa9eeb39c04ef8b1aa6f3
8689
### python3.[6] suffixes their directories w/ 'm', so need to patch detection to work
8790
PatchScript:<<
8891
#!/bin/sh -ex
8992
sed -e 's|@FINK_PREFIX@|%p|g' -e 's|@BOOST_MINOR@|%type_pkg[boost]|g' < %{PatchFile} | patch -p1
93+
patch -p1 < %{PatchFile2}
9094
### Real ugly hack because the python linking code ignores the
9195
### absolute path install_name we try to give the libraries.
9296
### We will give the python libraries a versioned absolute path
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From 40960b23338da0a359d6aa83585ace09ad8804d2 Mon Sep 17 00:00:00 2001
2+
From: Bo Anderson <mail@boanderson.me>
3+
Date: Sun, 29 Mar 2020 14:55:08 +0100
4+
Subject: [PATCH] Fix compiler version check on macOS
5+
6+
Fixes #440.
7+
---
8+
src/tools/darwin.jam | 5 +++--
9+
1 file changed, 3 insertions(+), 2 deletions(-)
10+
11+
diff --git a/src/tools/darwin.jam b/src/tools/darwin.jam
12+
index 8d477410b0..97e7ecb851 100644
13+
--- a/tools/build/src/tools/darwin.jam
14+
+++ b/tools/build/src/tools/darwin.jam
15+
@@ -137,13 +137,14 @@ rule init ( version ? : command * : options * : requirement * )
16+
# - Set the toolset generic common options.
17+
common.handle-options darwin : $(condition) : $(command) : $(options) ;
18+
19+
+ real-version = [ regex.split $(real-version) \\. ] ;
20+
# - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
21+
- if $(real-version) < "4.0.0"
22+
+ if [ version.version-less $(real-version) : 4 0 ]
23+
{
24+
flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
25+
}
26+
# - GCC 4.2 and higher in Darwin does not have -Wno-long-double.
27+
- if $(real-version) < "4.2.0"
28+
+ if [ version.version-less $(real-version) : 4 2 ]
29+
{
30+
flags darwin.compile OPTIONS $(condition) : -Wno-long-double ;
31+
}

10.9-libcxx/stable/main/finkinfo/libs/boost1.68.info

+4
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,14 @@ Source-Checksum: SHA1(18863a7cae4d58ae85eb63d400f774f60a383411)
8585
#SourceDirectory: boost_1_%type_pkg[boost]_0
8686
PatchFile: boost1.68.patch
8787
PatchFile-MD5: 59991ee449df0a173c4b8875194b1587
88+
# Fix poor clang version comparison that breaks on v11.0.3
89+
PatchFile2: boost1.68-clang11-version.patch
90+
PatchFile2-MD5: 95d3ac2dc9ffa9eeb39c04ef8b1aa6f3
8891
### python3.[6] suffixes their directories w/ 'm', so need to patch detection to work
8992
PatchScript:<<
9093
#!/bin/sh -ex
9194
sed -e 's|@FINK_PREFIX@|%p|g' -e 's|@BOOST_MINOR@|%type_pkg[boost]|g' < %{PatchFile} | patch -p1
95+
patch -p1 < %{PatchFile2}
9296
### Real ugly hack because the python linking code ignores the
9397
### absolute path install_name we try to give the libraries.
9498
### We will give the python libraries a versioned absolute path

0 commit comments

Comments
 (0)