diff --git a/lldb.spec b/lldb.spec index 59ddaf8..31bff4c 100644 --- a/lldb.spec +++ b/lldb.spec @@ -1,7 +1,7 @@ # # spec file for package lldb # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/llvm-fix-find-gcc5-install.patch b/llvm-fix-find-gcc5-install.patch new file mode 100644 index 0000000..a548a87 --- /dev/null +++ b/llvm-fix-find-gcc5-install.patch @@ -0,0 +1,19 @@ +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 diff --git a/llvm-fix-intrusiverefcntptr.patch b/llvm-fix-intrusiverefcntptr.patch new file mode 100644 index 0000000..79a9bda --- /dev/null +++ b/llvm-fix-intrusiverefcntptr.patch @@ -0,0 +1,14 @@ +Index: include/llvm/ADT/IntrusiveRefCntPtr.h +=================================================================== +--- include/llvm/ADT/IntrusiveRefCntPtr.h.orig 2014-07-06 00:20:59.000000000 +0200 ++++ include/llvm/ADT/IntrusiveRefCntPtr.h 2015-02-20 14:05:08.687151938 +0100 +@@ -197,6 +197,9 @@ public: + private: + void retain() { if (Obj) IntrusiveRefCntPtrInfo::retain(Obj); } + void release() { if (Obj) IntrusiveRefCntPtrInfo::release(Obj); } ++ ++ template ++ friend class IntrusiveRefCntPtr; + }; + + template diff --git a/llvm.changes b/llvm.changes index 2e6cdc4..4bbdb97 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 20 13:40:11 UTC 2015 - rguenther@suse.com + +- 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. + ------------------------------------------------------------------- Wed Jan 28 10:08:43 UTC 2015 - idonmez@suse.com diff --git a/llvm.spec b/llvm.spec index 2db0b27..fe6f176 100644 --- a/llvm.spec +++ b/llvm.spec @@ -1,7 +1,7 @@ # # spec file for package llvm # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -65,6 +65,8 @@ Patch10: clang-resourcedirs.patch Patch11: libcxxabi-exceptions.patch Patch12: libcxx-libdir.patch Patch13: llvm-remove-clang-only-flags.patch +Patch14: llvm-fix-intrusiverefcntptr.patch +Patch15: llvm-fix-find-gcc5-install.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: binutils-devel >= 2.21.90 BuildRequires: bison @@ -171,6 +173,8 @@ This package contains the Python bindings to clang (C language) frontend for LLV %patch11 %patch12 %patch13 -p1 +%patch14 +%patch15 # Move into right place mv cfe-%{version}.src tools/clang