aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbuild2/cc/guess.cxx38
1 files changed, 20 insertions, 18 deletions
diff --git a/libbuild2/cc/guess.cxx b/libbuild2/cc/guess.cxx
index f9c7153..69bebaa 100644
--- a/libbuild2/cc/guess.cxx
+++ b/libbuild2/cc/guess.cxx
@@ -2452,7 +2452,7 @@ namespace build2
//
// Specifically, we now look in the libc++'s __config file for the
// _LIBCPP_VERSION and use the previous version as a conservative
- // estimate (note that there could be multiple __config files with
+ // estimate (NOTE that there could be multiple __config files with
// potentially different versions so compile with -v to see which one
// gets picked up).
//
@@ -2475,28 +2475,30 @@ namespace build2
// 12.0.0 -> 9.0
// 12.0.5 -> 10.0 (yes, seriously!)
// 13.0.0 -> 11.0
+ // 13.1.6 -> 12.0
//
uint64_t mj (var_ver->major);
uint64_t mi (var_ver->minor);
uint64_t pa (var_ver->patch);
- if (mj >= 13) {mj = 11; mi = 0;}
- else if (mj == 12 && (mi > 0 || pa >= 5)) {mj = 10; mi = 0;}
- else if (mj == 12) {mj = 9; mi = 0;}
- else if (mj == 11 && (mi > 0 || pa >= 3)) {mj = 8; mi = 0;}
- else if (mj == 11) {mj = 7; mi = 0;}
- else if (mj == 10) {mj = 6; mi = 0;}
- else if (mj == 9 && mi >= 1) {mj = 5; mi = 0;}
- else if (mj == 9) {mj = 4; mi = 0;}
- else if (mj == 8) {mj = 3; mi = 9;}
- else if (mj == 7 && mi >= 3) {mj = 3; mi = 8;}
- else if (mj == 7) {mj = 3; mi = 7;}
- else if (mj == 6 && mi >= 1) {mj = 3; mi = 5;}
- else if (mj == 6) {mj = 3; mi = 4;}
- else if (mj == 5 && mi >= 1) {mj = 3; mi = 3;}
- else if (mj == 5) {mj = 3; mi = 2;}
- else if (mj == 4 && mi >= 2) {mj = 3; mi = 1;}
- else {mj = 3; mi = 0;}
+ if (mj > 13 || (mj == 13 && mi >= 1)) {mj = 12; mi = 0;}
+ else if (mj == 13) {mj = 11; mi = 0;}
+ else if (mj == 12 && (mi > 0 || pa >= 5)) {mj = 10; mi = 0;}
+ else if (mj == 12) {mj = 9; mi = 0;}
+ else if (mj == 11 && (mi > 0 || pa >= 3)) {mj = 8; mi = 0;}
+ else if (mj == 11) {mj = 7; mi = 0;}
+ else if (mj == 10) {mj = 6; mi = 0;}
+ else if (mj == 9 && mi >= 1) {mj = 5; mi = 0;}
+ else if (mj == 9) {mj = 4; mi = 0;}
+ else if (mj == 8) {mj = 3; mi = 9;}
+ else if (mj == 7 && mi >= 3) {mj = 3; mi = 8;}
+ else if (mj == 7) {mj = 3; mi = 7;}
+ else if (mj == 6 && mi >= 1) {mj = 3; mi = 5;}
+ else if (mj == 6) {mj = 3; mi = 4;}
+ else if (mj == 5 && mi >= 1) {mj = 3; mi = 3;}
+ else if (mj == 5) {mj = 3; mi = 2;}
+ else if (mj == 4 && mi >= 2) {mj = 3; mi = 1;}
+ else {mj = 3; mi = 0;}
ver = compiler_version {
to_string (mj) + '.' + to_string (mi) + ".0",