SHA256
1
0
forked from pool/llvm14
llvm14/llvm-fix-find-gcc5-install.patch

15 lines
613 B
Diff
Raw Normal View History

2022-04-04 13:49:45 +02:00
Index: cfe-7.0.0rc1.src/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- cfe-7.0.0rc1.src.orig/lib/Driver/ToolChains/Gnu.cpp
+++ cfe-7.0.0rc1.src/lib/Driver/ToolChains/Gnu.cpp
@@ -1596,7 +1596,8 @@ Generic_GCC::GCCVersion Generic_GCC::GCC
MinorStr = MinorStr.slice(0, EndNumber);
}
}
- if (MinorStr.getAsInteger(10, GoodVersion.Minor) || GoodVersion.Minor < 0)
+ if (!MinorStr.str().empty() &&
+ (MinorStr.getAsInteger(10, GoodVersion.Minor) || GoodVersion.Minor < 0))
return BadVersion;
GoodVersion.MinorStr = MinorStr.str();