Hello community,

here is the log from the commit of package llvm for openSUSE:Factory checked in 
at 2011-12-27 18:37:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/llvm (Old)
 and      /work/SRC/openSUSE:Factory/.llvm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "llvm", Maintainer is "mh...@novell.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/llvm/llvm.changes        2011-12-06 
18:00:46.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.llvm.new/llvm.changes   2011-12-27 
18:37:59.000000000 +0100
@@ -1,0 +2,11 @@
+Sun Dec 25 15:29:46 UTC 2011 - idon...@suse.com
+
+- Don't run gcc for ada files, just fail instead. 
+
+-------------------------------------------------------------------
+Thu Dec 22 15:33:24 UTC 2011 - idon...@suse.com
+
+- Add clang-glibc2.14.patch to support glibc 2.14 headers
+- Install profiling support
+
+-------------------------------------------------------------------

New:
----
  clang-disable-ada-extension.patch
  clang-glibc2.14.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ llvm.spec ++++++
--- /var/tmp/diff_new_pack.menvkR/_old  2011-12-27 18:38:00.000000000 +0100
+++ /var/tmp/diff_new_pack.menvkR/_new  2011-12-27 18:38:00.000000000 +0100
@@ -15,18 +15,17 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-
 %define _revision     145598
 %define _release_version 3.0
 %define _supported_archs "ARM;X86"
 
 Name:           llvm
 Version:        3.0
-Release:        1
-License:        NCSA
+Release:        0
 Summary:        Low Level Virtual Machine
-Url:            http://www.llvm.org
+License:        NCSA
 Group:          Development/Languages/Other
+Url:            http://www.llvm.org
 Source0:        %{name}-%{version}.tar.bz2
 Source100:      %{name}-rpmlintrc
 # PATCH-FIX-OPENSUSE set-revision.patch idoen...@suse.de -- Allow us to set 
revision
@@ -35,6 +34,10 @@
 Patch2:         clang-cmake-lib.patch
 # PATCH-FIX-OPENSUSE assume-opensuse.patch idoen...@suse.de -- Always enable 
openSUSE/SUSE features
 Patch3:         assume-opensuse.patch
+# PATCH-FIX-UPSTREAM clang-glibc2.14.patch idoen...@suse.de -- Support glibc 
2.14 headers
+Patch4:         clang-glibc2.14.patch
+# PATCH-FIX-OPENSUSE clang-disable-ada-extension.patch idoen...@suse.de -- 
Don't run gcc for ada files
+Patch5:         clang-disable-ada-extension.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  autoconf
 BuildRequires:  automake
@@ -129,13 +132,15 @@
 %patch1
 %patch2
 %patch3
+cd tools/clang
+%patch4
+cd ../..
+%patch5 -p1
 
 sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
 
 # Nasty hardcoded path
-%if "%{_lib}" == "lib64"
-sed -i s,/lib/LLVMgold.so,/lib64/LLVMgold.so, tools/clang/lib/Driver/Tools.cpp
-%endif
+sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp
 
 %build
 TOPLEVEL=$PWD
@@ -334,6 +339,7 @@
 %{_mandir}/man1/clang.1.gz
 %{_libdir}/libclang.so.*
 %{_libdir}/libLTO.so
+%{_libdir}/*profile*.a
 %if 0%{?suse_version} >= 1220
 %{_libdir}/LLVMgold.so
 %endif
@@ -370,10 +376,10 @@
 %defattr(-,root,root)
 %{_includedir}/clang
 %{_includedir}/clang-c
-%{_libdir}/libclang.so
 %{_libdir}/libLTO.a
+%{_libdir}/libclang.so
 %{_libdir}/libclang*.a
-%{_libdir}/*profile_rt*
+%{_libdir}/*profile*.so
 
 %files devel
 %defattr(-,root,root,-)

++++++ clang-disable-ada-extension.patch ++++++
Index: llvm/tools/clang/lib/Driver/Types.cpp
===================================================================
--- llvm.orig/tools/clang/lib/Driver/Types.cpp
+++ llvm/tools/clang/lib/Driver/Types.cpp
@@ -158,8 +158,6 @@ types::ID types::lookupTypeForExtension(
            .Case("hh", TY_CXXHeader)
            .Case("ll", TY_LLVM_IR)
            .Case("hpp", TY_CXXHeader)
-           .Case("ads", TY_Ada)
-           .Case("adb", TY_Ada)
            .Case("ast", TY_AST)
            .Case("c++", TY_CXX)
            .Case("C++", TY_CXX)
++++++ clang-glibc2.14.patch ++++++
Index: test/CodeGen/pr9614.c
===================================================================
--- test/CodeGen/pr9614.c       (revision 146866)
+++ test/CodeGen/pr9614.c       (revision 146867)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -O1 -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
 
 extern void foo_alias (void) __asm ("foo");
 inline void foo (void) {
@@ -8,15 +8,22 @@
 inline __attribute__ ((__always_inline__)) void bar (void) {
   return bar_alias ();
 }
+extern char *strrchr_foo (const char *__s, int __c)  __asm ("strrchr");
+extern inline __attribute__ ((__always_inline__)) __attribute__ 
((__gnu_inline__)) char * strrchr_foo (const char *__s, int __c)  {
+  return __builtin_strrchr (__s, __c);
+}
 void f(void) {
   foo();
   bar();
+  strrchr_foo("", '.');
 }
 
 // CHECK: define void @f()
 // CHECK: call void @foo()
 // CHECK-NEXT: call void @bar()
+// CHECK-NEXT: call i8* @strrchr(
 // CHECK-NEXT: ret void
 
 // CHECK: declare void @foo()
 // CHECK: declare void @bar()
+// CHECK: declare i8* @strrchr(i8*, i32)
Index: lib/CodeGen/CodeGenModule.h
===================================================================
--- lib/CodeGen/CodeGenModule.h (revision 146866)
+++ lib/CodeGen/CodeGenModule.h (revision 146867)
@@ -323,7 +323,7 @@
   void createOpenCLRuntime();
   void createCUDARuntime();
 
-  bool isTriviallyRecursiveViaAsm(const FunctionDecl *F);
+  bool isTriviallyRecursive(const FunctionDecl *F);
   bool shouldEmitFunction(const FunctionDecl *F);
   llvm::LLVMContext &VMContext;
 
Index: lib/CodeGen/CodeGenModule.cpp
===================================================================
--- lib/CodeGen/CodeGenModule.cpp       (revision 146866)
+++ lib/CodeGen/CodeGenModule.cpp       (revision 146867)
@@ -30,6 +30,7 @@
 #include "clang/AST/Mangle.h"
 #include "clang/AST/RecordLayout.h"
 #include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/Basic/Builtins.h"
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
@@ -863,20 +864,27 @@
   struct FunctionIsDirectlyRecursive :
     public RecursiveASTVisitor<FunctionIsDirectlyRecursive> {
     const StringRef Name;
+    const Builtin::Context &BI;
     bool Result;
-    FunctionIsDirectlyRecursive(const FunctionDecl *F) :
-      Name(F->getName()), Result(false) {
+    FunctionIsDirectlyRecursive(StringRef N, const Builtin::Context &C) :
+      Name(N), BI(C), Result(false) {
     }
     typedef RecursiveASTVisitor<FunctionIsDirectlyRecursive> Base;
 
     bool TraverseCallExpr(CallExpr *E) {
-      const Decl *D = E->getCalleeDecl();
-      if (!D)
+      const FunctionDecl *FD = E->getDirectCallee();
+      if (!FD)
         return true;
-      AsmLabelAttr *Attr = D->getAttr<AsmLabelAttr>();
-      if (!Attr)
+      AsmLabelAttr *Attr = FD->getAttr<AsmLabelAttr>();
+      if (Attr && Name == Attr->getLabel()) {
+        Result = true;
+        return false;
+      }
+      unsigned BuiltinID = FD->getBuiltinID();
+      if (!BuiltinID)
         return true;
-      if (Name == Attr->getLabel()) {
+      const char *BuiltinName = BI.GetName(BuiltinID) + strlen("__builtin_");
+      if (Name == BuiltinName) {
         Result = true;
         return false;
       }
@@ -885,15 +893,24 @@
   };
 }
 
-// isTriviallyRecursiveViaAsm - Check if this function calls another
-// decl that, because of the asm attribute, ends up pointing to itself.
+// isTriviallyRecursive - Check if this function calls another
+// decl that, because of the asm attribute or the other decl being a builtin,
+// ends up pointing to itself.
 bool
-CodeGenModule::isTriviallyRecursiveViaAsm(const FunctionDecl *F) {
-  if (getCXXABI().getMangleContext().shouldMangleDeclName(F))
-    return false;
+CodeGenModule::isTriviallyRecursive(const FunctionDecl *FD) {
+  StringRef Name;
+  if (getCXXABI().getMangleContext().shouldMangleDeclName(FD)) {
+    // asm labels are a special king of mangling we have to support.
+    AsmLabelAttr *Attr = FD->getAttr<AsmLabelAttr>();
+    if (!Attr)
+      return false;
+    Name = Attr->getLabel();
+  } else {
+    Name = FD->getName();
+  }
 
-  FunctionIsDirectlyRecursive Walker(F);
-  Walker.TraverseFunctionDecl(const_cast<FunctionDecl*>(F));
+  FunctionIsDirectlyRecursive Walker(Name, Context.BuiltinInfo);
+  Walker.TraverseFunctionDecl(const_cast<FunctionDecl*>(FD));
   return Walker.Result;
 }
 
@@ -909,7 +926,7 @@
   // but a function that calls itself is clearly not equivalent to the real
   // implementation.
   // This happens in glibc's btowc and in some configure checks.
-  return !isTriviallyRecursiveViaAsm(F);
+  return !isTriviallyRecursive(F);
 }
 
 void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) {
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to