llvm/llvm-fix-find-gcc5-install.patch
Ismail Dönmez 4d07e73cc1 Accepting request 286987 from home:rguenther:branches:devel:tools:compiler
- Add llvm-fix-intrusiverefcntptr.patch to fix build of LLVM tools
  with GCC 5.
- Add llvm-fix-find-gcc5-install.patch to properly find installed GCC 5.

OBS-URL: https://build.opensuse.org/request/show/286987
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=398
2015-02-20 14:48:13 +00:00

20 lines
911 B
Diff

Index: cfe-3.5.0.src/lib/Driver/ToolChains.cpp
===================================================================
--- cfe-3.5.0.src/lib/Driver/ToolChains.cpp.orig 2015-02-20 14:03:49.512242844 +0100
+++ cfe-3.5.0.src/lib/Driver/ToolChains.cpp 2015-02-20 15:07:11.965048162 +0100
@@ -1135,10 +1135,11 @@ Generic_GCC::GCCVersion Linux::GCCVersio
GoodVersion.Major < 0)
return BadVersion;
GoodVersion.MajorStr = First.first.str();
- if (Second.first.getAsInteger(10, GoodVersion.Minor) ||
- GoodVersion.Minor < 0)
- return BadVersion;
GoodVersion.MinorStr = Second.first.str();
+ if (!Second.first.str().empty () &&
+ (Second.first.getAsInteger(10, GoodVersion.Minor) ||
+ GoodVersion.Minor < 0))
+ return BadVersion;
// First look for a number prefix and parse that if present. Otherwise just
// stash the entire patch string in the suffix, and leave the number