* New snapshot release

* Merge changes from the 3.3 branch (see 1:3.3-10)
* Install libclang.so in /usr/lib/*/libclang-3.3.so
* Install libclang.so.1 in /usr/lib/*/libclang-3.3.so.1
* Also ship the python clang binding (python-clang-3.3)
  (LLVM no longer mean Low Level Virtual Machine)
* Disable the build of lldb under HURD
* Ship the lldb headers into lldb-X.Y-dev (Closes: #723743)
  I might create a liblldb-X.Y library at some point but I think it is too
  early.
* Fix "cannot compile this atomic library call"
  Thanks to Francisco Facioni for the refresh (Closes: #705115)
* Install libclang.so in /usr/lib/*/libclang-3.3.so
* Install libclang.so.1 in /usr/lib/*/libclang-3.3.so.1
* Also ship the python clang binding (python-clang-3.3)
* Fix a FTBFS with a duplicate declaration of shouldUseInlineAtomic
* Update the build dependency from tcl8.5 to tcl (Closes: #725953)
This commit is contained in:
Sylvestre Ledru 2013-10-10 11:40:12 +00:00
commit 9e36f19118
22 changed files with 237 additions and 86 deletions

22
debian/changelog vendored
View File

@ -1,12 +1,22 @@
llvm-toolchain-snapshot (1:3.4~svn192346-1~exp1) experimental; urgency=low
* New snapshot release
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 10 Oct 2013 12:53:49 +0200
llvm-toolchain-snapshot (1:3.4~svn191069-1~exp1) unstable; urgency=low
* New snapshot release
* Merge changes from the 3.3 branch (see 1:3.3-10)
* Add lldb-3.4-dev package
* Remove mipsel-ftbfs.diff (applied upstream)
* Add support of coverity checker (non-free and not packaged)
* libprofile_rt and runtime has been removed upstream (r191835)
Features are provided by compiler-rt
* Update the build dependency from tcl8.5 to tcl (Closes: #725954)
* Install libclang.so in /usr/lib/*/libclang-3.3.so
* Install libclang.so.1 in /usr/lib/*/libclang-3.3.so.1
* Also ship the python clang binding (python-clang-3.3)
-- Sylvestre Ledru <sylvestre@debian.org> Fri, 20 Sep 2013 05:25:17 +0200
@ -20,6 +30,18 @@ llvm-toolchain-snapshot (1:3.4~svn190846-1) unstable; urgency=low
* Patch lldb-hurd.diff removed (applied upstream)
* Directory www/ from tarballs polly & lldb removed
* Update of the description of LLVM packages
(LLVM no longer mean Low Level Virtual Machine)
* Disable the build of lldb under HURD
* Ship the lldb headers into lldb-X.Y-dev (Closes: #723743)
I might create a liblldb-X.Y library at some point but I think it is too
early.
* Fix "cannot compile this atomic library call"
Thanks to Francisco Facioni for the refresh (Closes: #705115)
* Install libclang.so in /usr/lib/*/libclang-3.3.so
* Install libclang.so.1 in /usr/lib/*/libclang-3.3.so.1
* Also ship the python clang binding (python-clang-3.3)
* Fix a FTBFS with a duplicate declaration of shouldUseInlineAtomic
* Update the build dependency from tcl8.5 to tcl (Closes: #725953)
[ Luca Falavigna ]
* debian/control:

14
debian/control vendored
View File

@ -256,6 +256,16 @@ Description: clang library - Common development package
This package contains the clang generic headers and some libraries
(profiling, etc).
Package: python-clang-3.4
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python
Replaces: python-clang-3.3
Breaks: python-clang-3.3
Description: Clang Python Bindings
This binding package provides access to the Clang compiler and libraries.
Package: libllvm3.4
Architecture: any
Section: libs
@ -420,7 +430,8 @@ Description: Modular compiler and toolchain technologies, examples
extensions to LLVM and in using it to compile code.
Package: lldb-3.4
Architecture: any
Architecture: amd64 armel armhf i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 s390x sparc alpha arm64 hppa m68k powerpcspe ppc64 sh4 sparc64 x32
# Only hurd has been removed
Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm3.4 (= ${binary:Version}), python, llvm-3.4-dev
Pre-Depends: ${misc:Pre-Depends}
Replaces: lldb-3.2, lldb-3.3
@ -440,4 +451,3 @@ Description: Next generation, high-performance debugger - Header files
Project, such as the Clang expression parser and LLVM disassembler.
.
This package provides the header files to build extension over lldb.

2
debian/libclang-3.4-dev.links.in vendored Normal file
View File

@ -0,0 +1,2 @@
usr/lib/llvm-3.3/lib/libclang.so /usr/lib/@DEB_HOST_MULTIARCH@/libclang-3.3.so

1
debian/libclang1-3.4.links.in vendored Normal file
View File

@ -0,0 +1 @@
usr/lib/llvm-3.3/lib/libclang.so.1 /usr/lib/@DEB_HOST_MULTIARCH@/libclang-3.3.so.1

View File

@ -1,8 +1,8 @@
Index: llvm-toolchain-snapshot_3.4~svn189753/configure
Index: llvm-toolchain-snapshot_3.4~svn192346/configure
===================================================================
--- llvm-toolchain-snapshot_3.4~svn189753.orig/configure 2013-09-02 14:03:31.000000000 +0200
+++ llvm-toolchain-snapshot_3.4~svn189753/configure 2013-09-02 14:03:31.000000000 +0200
@@ -13233,7 +13233,7 @@
--- llvm-toolchain-snapshot_3.4~svn192346.orig/configure 2013-10-10 13:38:12.610082893 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/configure 2013-10-10 13:38:12.602082891 +0200
@@ -13314,7 +13314,7 @@
case $llvm_cv_os_type in
Linux)
if test -n "$llvm_cv_oppath" ; then
@ -11,7 +11,7 @@ Index: llvm-toolchain-snapshot_3.4~svn189753/configure
{ echo "$as_me:$LINENO: checking for library containing bfd_init" >&5
echo $ECHO_N "checking for library containing bfd_init... $ECHO_C" >&6; }
if test "${ac_cv_search_bfd_init+set}" = set; then
@@ -13329,7 +13329,7 @@
@@ -13410,7 +13410,7 @@
echo "${ECHO_T}$ac_cv_search_bfd_init" >&6; }
ac_res=$ac_cv_search_bfd_init
if test "$ac_res" != no; then
@ -20,7 +20,7 @@ Index: llvm-toolchain-snapshot_3.4~svn189753/configure
fi
@@ -13365,8 +13365,8 @@
@@ -13446,8 +13446,8 @@
if test -z "$ac_lib"; then
ac_res="none required"
else

View File

@ -12,11 +12,11 @@ This reverts commit 60b35f408bc3194e7ea4e96367c0b42dc5e7f850.
test/DebugInfo/X86/ending-run.ll | 6 ++----
2 files changed, 4 insertions(+), 9 deletions(-)
Index: llvm-toolchain-snapshot_3.4~svn189753/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Index: llvm-toolchain-snapshot_3.4~svn192346/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn189753.orig/lib/CodeGen/AsmPrinter/DwarfDebug.cpp 2013-09-02 14:03:34.000000000 +0200
+++ llvm-toolchain-snapshot_3.4~svn189753/lib/CodeGen/AsmPrinter/DwarfDebug.cpp 2013-09-02 14:03:34.000000000 +0200
@@ -1369,15 +1369,12 @@
--- llvm-toolchain-snapshot_3.4~svn192346.orig/lib/CodeGen/AsmPrinter/DwarfDebug.cpp 2013-10-10 13:38:17.174082789 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/lib/CodeGen/AsmPrinter/DwarfDebug.cpp 2013-10-10 13:38:17.166082790 +0200
@@ -1478,15 +1478,12 @@
if (!MI->isDebugValue()) {
DebugLoc DL = MI->getDebugLoc();
if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) {
@ -33,10 +33,10 @@ Index: llvm-toolchain-snapshot_3.4~svn189753/lib/CodeGen/AsmPrinter/DwarfDebug.c
if (!DL.isUnknown()) {
const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext());
recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags);
Index: llvm-toolchain-snapshot_3.4~svn189753/test/DebugInfo/X86/ending-run.ll
Index: llvm-toolchain-snapshot_3.4~svn192346/test/DebugInfo/X86/ending-run.ll
===================================================================
--- llvm-toolchain-snapshot_3.4~svn189753.orig/test/DebugInfo/X86/ending-run.ll 2013-09-02 14:03:34.000000000 +0200
+++ llvm-toolchain-snapshot_3.4~svn189753/test/DebugInfo/X86/ending-run.ll 2013-09-02 14:03:34.000000000 +0200
--- llvm-toolchain-snapshot_3.4~svn192346.orig/test/DebugInfo/X86/ending-run.ll 2013-10-10 13:38:17.174082789 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/test/DebugInfo/X86/ending-run.ll 2013-10-10 13:38:17.166082790 +0200
@@ -1,11 +1,9 @@
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
; RUN: llvm-dwarfdump -debug-dump=line %t | FileCheck %s

View File

@ -1,8 +1,8 @@
Index: llvm-toolchain-snapshot_3.4~svn189753/clang/lib/Driver/ToolChains.cpp
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/ToolChains.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn189753.orig/clang/lib/Driver/ToolChains.cpp 2013-09-02 14:03:19.000000000 +0200
+++ llvm-toolchain-snapshot_3.4~svn189753/clang/lib/Driver/ToolChains.cpp 2013-09-02 14:03:19.000000000 +0200
@@ -2426,6 +2426,11 @@
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/Driver/ToolChains.cpp 2013-10-10 13:37:53.642083314 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/ToolChains.cpp 2013-10-10 13:37:53.634083316 +0200
@@ -2509,6 +2509,11 @@
addSystemInclude(DriverArgs, CC1Args, P.str());
}

View File

@ -1,7 +1,7 @@
Index: llvm-toolchain-snapshot_3.4~svn188990/clang/include/clang/Basic/Builtins.def
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/include/clang/Basic/Builtins.def
===================================================================
--- llvm-toolchain-snapshot_3.4~svn188990.orig/clang/include/clang/Basic/Builtins.def 2013-08-22 09:07:00.024609486 +0200
+++ llvm-toolchain-snapshot_3.4~svn188990/clang/include/clang/Basic/Builtins.def 2013-08-22 09:07:00.012609486 +0200
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/include/clang/Basic/Builtins.def 2013-10-10 13:37:58.942083196 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/include/clang/Basic/Builtins.def 2013-10-10 13:37:58.930083198 +0200
@@ -467,8 +467,8 @@
BUILTIN(__builtin___stpcpy_chk, "c*c*cC*z", "nF")
BUILTIN(__builtin___strcat_chk, "c*c*cC*z", "nF")
@ -13,7 +13,7 @@ Index: llvm-toolchain-snapshot_3.4~svn188990/clang/include/clang/Basic/Builtins.
BUILTIN(__builtin___strncat_chk, "c*c*cC*zz", "nF")
BUILTIN(__builtin___strncpy_chk, "c*c*cC*zz", "nF")
BUILTIN(__builtin___stpncpy_chk, "c*c*cC*zz", "nF")
@@ -760,8 +760,8 @@
@@ -761,8 +761,8 @@
LIBBUILTIN(_longjmp, "vJi", "fr", "setjmp.h", ALL_GNU_LANGUAGES)
LIBBUILTIN(siglongjmp, "vSJi", "fr", "setjmp.h", ALL_GNU_LANGUAGES)
// non-standard but very common
@ -24,10 +24,10 @@ Index: llvm-toolchain-snapshot_3.4~svn188990/clang/include/clang/Basic/Builtins.
// id objc_msgSend(id, SEL, ...)
LIBBUILTIN(objc_msgSend, "GGH.", "f", "objc/message.h", OBJC_LANG)
// long double objc_msgSend_fpret(id self, SEL op, ...)
Index: llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Sema/SemaChecking.cpp
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Sema/SemaChecking.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn188990.orig/clang/lib/Sema/SemaChecking.cpp 2013-08-22 09:07:00.024609486 +0200
+++ llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Sema/SemaChecking.cpp 2013-08-22 09:07:00.012609486 +0200
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/Sema/SemaChecking.cpp 2013-10-10 13:37:58.942083196 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Sema/SemaChecking.cpp 2013-10-10 13:37:58.934083197 +0200
@@ -804,9 +804,10 @@
return false;
@ -42,11 +42,11 @@ Index: llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Sema/SemaChecking.cpp
CheckStrncatArguments(TheCall, FnInfo);
else
CheckMemaccessArguments(TheCall, CMId, FnInfo);
Index: llvm-toolchain-snapshot_3.4~svn188990/clang/lib/AST/Decl.cpp
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/AST/Decl.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn188990.orig/clang/lib/AST/Decl.cpp 2013-08-22 09:07:00.024609486 +0200
+++ llvm-toolchain-snapshot_3.4~svn188990/clang/lib/AST/Decl.cpp 2013-08-22 09:07:00.016609486 +0200
@@ -2909,10 +2909,10 @@
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/AST/Decl.cpp 2013-10-10 13:37:58.942083196 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/AST/Decl.cpp 2013-10-10 13:37:58.934083197 +0200
@@ -3010,10 +3010,10 @@
case Builtin::BImemmove:
return Builtin::BImemmove;
@ -61,10 +61,10 @@ Index: llvm-toolchain-snapshot_3.4~svn188990/clang/lib/AST/Decl.cpp
case Builtin::BI__builtin_memcmp:
case Builtin::BImemcmp:
Index: llvm-toolchain-snapshot_3.4~svn188990/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn188990.orig/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp 2013-08-22 09:07:00.024609486 +0200
+++ llvm-toolchain-snapshot_3.4~svn188990/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp 2013-08-22 09:07:00.016609486 +0200
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp 2013-10-10 13:37:58.942083196 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp 2013-10-10 13:37:58.934083197 +0200
@@ -238,9 +238,9 @@
case Builtin::BIstrncpy:
case Builtin::BIstrncat:

View File

@ -18,11 +18,11 @@ Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>
Index: llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Driver/Tools.cpp
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/Tools.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn188990.orig/clang/lib/Driver/Tools.cpp 2013-08-22 09:07:13.120609152 +0200
+++ llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Driver/Tools.cpp 2013-08-22 09:07:13.116609152 +0200
@@ -655,7 +655,7 @@
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/Driver/Tools.cpp 2013-10-10 13:38:02.294083121 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/Tools.cpp 2013-10-10 13:38:02.290083121 +0200
@@ -695,7 +695,7 @@
FloatABI = "hard";
break;
case llvm::Triple::GNUEABI:

View File

@ -1,8 +1,8 @@
Index: llvm-toolchain-snapshot_3.4~svn189753/clang/lib/Driver/ToolChains.h
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/ToolChains.h
===================================================================
--- llvm-toolchain-snapshot_3.4~svn189753.orig/clang/lib/Driver/ToolChains.h 2013-09-02 14:03:25.000000000 +0200
+++ llvm-toolchain-snapshot_3.4~svn189753/clang/lib/Driver/ToolChains.h 2013-09-02 14:03:25.000000000 +0200
@@ -144,6 +144,8 @@
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/Driver/ToolChains.h 2013-10-10 13:38:07.526083006 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/ToolChains.h 2013-10-10 13:38:07.518083005 +0200
@@ -154,6 +154,8 @@
virtual bool isPICDefault() const;
virtual bool isPIEDefault() const;
virtual bool isPICDefaultForced() const;
@ -11,10 +11,10 @@ Index: llvm-toolchain-snapshot_3.4~svn189753/clang/lib/Driver/ToolChains.h
protected:
virtual Tool *getTool(Action::ActionClass AC) const;
Index: llvm-toolchain-snapshot_3.4~svn189753/clang/lib/Driver/ToolChains.cpp
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/ToolChains.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn189753.orig/clang/lib/Driver/ToolChains.cpp 2013-09-02 14:03:25.000000000 +0200
+++ llvm-toolchain-snapshot_3.4~svn189753/clang/lib/Driver/ToolChains.cpp 2013-09-02 14:03:25.000000000 +0200
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/Driver/ToolChains.cpp 2013-10-10 13:38:07.526083006 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/ToolChains.cpp 2013-10-10 13:38:07.522083005 +0200
@@ -944,6 +944,13 @@
return GoodVersion;
}

45
debian/patches/atomic_library_1.diff vendored Normal file
View File

@ -0,0 +1,45 @@
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Basic/Targets.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/Basic/Targets.cpp 2013-10-10 13:39:24.086081296 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Basic/Targets.cpp 2013-10-10 13:39:24.082081296 +0200
@@ -3612,6 +3612,20 @@
return Version >= 7;
}
+ static bool shouldUseInlineAtomic(const llvm::Triple &T) {
+ // On linux, binaries targeting old cpus call functions in libgcc to
+ // perform atomic operations. The implementation in libgcc then calls into
+ // the kernel which on armv6 and newer uses ldrex and strex. The net result
+ // is that if we assume the kernel is at least as recent as the hardware,
+ // it is safe to use atomic instructions on armv6 and newer.
+ if (T.getOS() != llvm::Triple::Linux)
+ return false;
+ StringRef ArchName = T.getArchName();
+ if (ArchName.startswith("armv6") || ArchName.startswith("armv7"))
+ return true;
+ return false;
+ }
+
public:
ARMTargetInfo(const llvm::Triple &Triple)
: TargetInfo(Triple), ABI("aapcs-linux"), CPU("arm1136j-s"),
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/test/CodeGen/linux-arm-atomic.c
===================================================================
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/test/CodeGen/linux-arm-atomic.c 2013-10-10 13:39:24.086081296 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/test/CodeGen/linux-arm-atomic.c 2013-10-10 13:39:24.082081296 +0200
@@ -1,5 +1,15 @@
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-linux | FileCheck %s
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-linux | FileCheck %s
+
+typedef int _Atomic_word;
+_Atomic_word exchange_and_add(volatile _Atomic_word *__mem, int __val) {
+ return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL);
+}
+
+// CHECK: define {{.*}} @exchange_and_add
+// CHECK: atomicrmw {{.*}} add
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-linux | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-linux | FileCheck %s
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7-unknown-linux | FileCheck %s
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-freebsd | FileCheck %s
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-bitrig | FileCheck %s

42
debian/patches/atomic_library_2.diff vendored Normal file
View File

@ -0,0 +1,42 @@
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/test/CodeGen/linux-arm-atomic.c
===================================================================
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/test/CodeGen/linux-arm-atomic.c 2013-10-10 13:39:28.202081206 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/test/CodeGen/linux-arm-atomic.c 2013-10-10 13:39:28.190081205 +0200
@@ -1,5 +1,6 @@
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-linux | FileCheck %s
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-linux | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7-unknown-linux | FileCheck %s
typedef int _Atomic_word;
_Atomic_word exchange_and_add(volatile _Atomic_word *__mem, int __val) {
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Basic/Targets.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/Basic/Targets.cpp 2013-10-10 13:39:28.202081206 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Basic/Targets.cpp 2013-10-10 13:39:28.194081205 +0200
@@ -3621,9 +3621,23 @@
if (T.getOS() != llvm::Triple::Linux)
return false;
StringRef ArchName = T.getArchName();
- if (ArchName.startswith("armv6") || ArchName.startswith("armv7"))
- return true;
- return false;
+ if (T.getArch() == llvm::Triple::arm) {
+ if (!ArchName.startswith("armv"))
+ return false;
+ StringRef VersionStr = ArchName.substr(4);
+ unsigned Version;
+ if (VersionStr.getAsInteger(10, Version))
+ return false;
+ return Version >= 6;
+ }
+ assert(T.getArch() == llvm::Triple::thumb);
+ if (!ArchName.startswith("thumbv"))
+ return false;
+ StringRef VersionStr = ArchName.substr(6);
+ unsigned Version;
+ if (VersionStr.getAsInteger(10, Version))
+ return false;
+ return Version >= 7;
}
public:

View File

@ -1,7 +1,7 @@
Index: llvm-toolchain-3.3-3.3/clang/lib/Basic/FileManager.cpp
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Basic/FileManager.cpp
===================================================================
--- llvm-toolchain-3.3-3.3.orig/clang/lib/Basic/FileManager.cpp 2013-01-26 16:29:36.000000000 +0000
+++ llvm-toolchain-3.3-3.3/clang/lib/Basic/FileManager.cpp 2013-08-28 10:29:30.000000000 +0000
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/Basic/FileManager.cpp 2013-10-10 13:38:37.914082328 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Basic/FileManager.cpp 2013-10-10 13:38:37.910082329 +0200
@@ -43,6 +43,11 @@
#if defined(LLVM_ON_UNIX)
#include <limits.h>
@ -14,10 +14,10 @@ Index: llvm-toolchain-3.3-3.3/clang/lib/Basic/FileManager.cpp
using namespace clang;
// FIXME: Enhance libsystem to support inode and other fields.
Index: llvm-toolchain-3.3-3.3/lldb/include/lldb/lldb-defines.h
Index: llvm-toolchain-snapshot_3.4~svn192346/lldb/include/lldb/lldb-defines.h
===================================================================
--- llvm-toolchain-3.3-3.3.orig/lldb/include/lldb/lldb-defines.h 2013-08-28 14:14:04.000000000 +0000
+++ llvm-toolchain-3.3-3.3/lldb/include/lldb/lldb-defines.h 2013-08-28 14:15:01.000000000 +0000
--- llvm-toolchain-snapshot_3.4~svn192346.orig/lldb/include/lldb/lldb-defines.h 2013-10-10 13:38:37.914082328 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/lldb/include/lldb/lldb-defines.h 2013-10-10 13:38:37.910082329 +0200
@@ -12,6 +12,11 @@
#include "lldb/lldb-types.h"

View File

@ -1,8 +1,8 @@
Index: llvm-toolchain-snapshot_3.4~svn188990/lldb/source/Core/Mangled.cpp
Index: llvm-toolchain-snapshot_3.4~svn192346/lldb/source/Core/Mangled.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn188990.orig/lldb/source/Core/Mangled.cpp 2013-08-22 09:11:29.372602625 +0200
+++ llvm-toolchain-snapshot_3.4~svn188990/lldb/source/Core/Mangled.cpp 2013-08-22 09:11:29.372602625 +0200
@@ -23,6 +23,7 @@
--- llvm-toolchain-snapshot_3.4~svn192346.orig/lldb/source/Core/Mangled.cpp 2013-10-10 13:38:28.078082548 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/lldb/source/Core/Mangled.cpp 2013-10-10 13:38:28.070082547 +0200
@@ -25,6 +25,7 @@
#include <ctype.h>
#include <string.h>
#include <stdlib.h>

View File

@ -1,8 +1,8 @@
Index: llvm-toolchain-snapshot_3.4~svn191634/clang/lib/Driver/ToolChains.cpp
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/ToolChains.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn191634.orig/clang/lib/Driver/ToolChains.cpp 2013-09-29 11:38:00.000000000 +0200
+++ llvm-toolchain-snapshot_3.4~svn191634/clang/lib/Driver/ToolChains.cpp 2013-09-29 11:38:00.000000000 +0200
@@ -2602,6 +2602,12 @@
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/Driver/ToolChains.cpp 2013-10-10 13:38:54.530081956 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/ToolChains.cpp 2013-10-10 13:38:54.522081958 +0200
@@ -2693,6 +2693,12 @@
StringRef BiarchSuffix = GCCInstallation.getBiarchSuffix();
const GCCVersion &Version = GCCInstallation.getVersion();

View File

@ -1,8 +1,8 @@
Index: llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Driver/Tools.cpp
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/Tools.cpp
===================================================================
--- llvm-toolchain-snapshot_3.4~svn188990.orig/clang/lib/Driver/Tools.cpp 2013-08-22 09:07:16.860609057 +0200
+++ llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Driver/Tools.cpp 2013-08-22 09:07:16.860609057 +0200
@@ -34,6 +34,7 @@
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/Driver/Tools.cpp 2013-10-10 13:38:05.214083057 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Driver/Tools.cpp 2013-10-10 13:38:05.206083056 +0200
@@ -36,6 +36,7 @@
#include "llvm/Support/Program.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/raw_ostream.h"
@ -10,7 +10,7 @@ Index: llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Driver/Tools.cpp
#include <sys/stat.h>
using namespace clang::driver;
@@ -219,7 +220,7 @@
@@ -221,7 +222,7 @@
// libprofile_rt.so. We used to use the -l:libprofile_rt.a syntax, but that is
// not supported by old linkers.
std::string ProfileRT =

13
debian/patches/python-clangpath.diff vendored Normal file
View File

@ -0,0 +1,13 @@
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/bindings/python/clang/cindex.py
===================================================================
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/bindings/python/clang/cindex.py 2013-10-10 13:39:31.038081142 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/bindings/python/clang/cindex.py 2013-10-10 13:39:31.030081141 +0200
@@ -3280,7 +3280,7 @@
elif name == 'Windows':
file = 'libclang.dll'
else:
- file = 'libclang.so'
+ file = 'libclang-3.3.so'
if Config.library_path:
file = Config.library_path + '/' + file

View File

@ -1,8 +1,8 @@
Index: llvm-toolchain-snapshot_3.4~svn188990/clang/tools/scan-build/scan-build
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/tools/scan-build/scan-build
===================================================================
--- llvm-toolchain-snapshot_3.4~svn188990.orig/clang/tools/scan-build/scan-build 2013-08-22 09:07:34.536608606 +0200
+++ llvm-toolchain-snapshot_3.4~svn188990/clang/tools/scan-build/scan-build 2013-08-22 09:07:34.532608607 +0200
@@ -1539,7 +1539,7 @@
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/tools/scan-build/scan-build 2013-10-10 13:38:20.858082707 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/tools/scan-build/scan-build 2013-10-10 13:38:20.854082707 +0200
@@ -1547,7 +1547,7 @@
# Find 'clang'
if (!defined $AnalyzerDiscoveryMethod) {

View File

@ -25,3 +25,6 @@ unwind-chain-inclusion.diff
hurd-pathmax.diff
use-deb-json.diff
libstdc++-header-i386.diff
atomic_library_1.diff
atomic_library_2.diff
python-clangpath.diff

View File

@ -4,10 +4,10 @@
# Because of the #ifndef __CLANG_UNWIND_H, it might never include any declaration
# from the system.
Index: llvm-toolchain-snapshot_3.4~svn189753/clang/lib/Headers/unwind.h
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Headers/unwind.h
===================================================================
--- llvm-toolchain-snapshot_3.4~svn189753.orig/clang/lib/Headers/unwind.h 2013-09-02 14:03:54.000000000 +0200
+++ llvm-toolchain-snapshot_3.4~svn189753/clang/lib/Headers/unwind.h 2013-09-02 14:03:54.000000000 +0200
--- llvm-toolchain-snapshot_3.4~svn192346.orig/clang/lib/Headers/unwind.h 2013-10-10 13:38:48.446082093 +0200
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Headers/unwind.h 2013-10-10 13:38:48.438082094 +0200
@@ -23,9 +23,6 @@
/* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
@ -28,7 +28,7 @@ Index: llvm-toolchain-snapshot_3.4~svn189753/clang/lib/Headers/unwind.h
#include <stdint.h>
#ifdef __cplusplus
@@ -243,6 +243,7 @@
@@ -275,6 +275,7 @@
}
#endif

1
debian/python-clang-3.4.install vendored Normal file
View File

@ -0,0 +1 @@
tools/clang/bindings/python/clang/ /usr/lib/python2.7/dist-packages/

42
debian/rules vendored
View File

@ -79,7 +79,6 @@ ifneq (,$(filter scan-build,$(DEB_BUILD_OPTIONS)))
CONFIGURE_EXTRA += --enable-assertions
endif
ifneq (,$(filter coverity,$(DEB_BUILD_OPTIONS)))
# enable the build using coverity
# pbuilder contains BINDMOUNTS="/opt/cov-analysis/"
@ -96,6 +95,12 @@ else
COVERITY_ENABLE=0
endif
LLDB_ARCHS := hurd-i386
LLDB_ENABLE=yes
ifneq (,$(findstring $(DEB_HOST_ARCH),$(LLDB_ARCHS)))
LLDB_ENABLE=no
endif
%:
dh $@
# --buildsystem=cmake --builddirectory=$(TARGET_BUILD)
@ -103,7 +108,7 @@ endif
debian/%: debian/%.in
sed -e 's|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g' -e "s|@OCAML_STDLIB_DIR@|$(OCAML_STDLIB_DIR)|g" -e "s|@LLVM_VERSION@|$(LLVM_VERSION)|g" $< > $@
override_dh_auto_configure: debian/lldb-$(LLVM_VERSION).install debian/lldb-$(LLVM_VERSION).links debian/libllvm$(LLVM_VERSION).install debian/llvm-$(LLVM_VERSION)-dev.links debian/libllvm-$(LLVM_VERSION)-ocaml-dev.install debian/libllvm-$(LLVM_VERSION)-ocaml-dev.dirs debian/llvm-$(LLVM_VERSION)-runtime.binfmt debian/llvm-$(LLVM_VERSION)-runtime.prerm debian/pollycc
override_dh_auto_configure: debian/lldb-$(LLVM_VERSION).install debian/lldb-$(LLVM_VERSION).links debian/libllvm$(LLVM_VERSION).install debian/llvm-$(LLVM_VERSION)-dev.links debian/libllvm-$(LLVM_VERSION)-ocaml-dev.install debian/libllvm-$(LLVM_VERSION)-ocaml-dev.dirs debian/llvm-$(LLVM_VERSION)-runtime.binfmt debian/llvm-$(LLVM_VERSION)-runtime.prerm debian/libclang-$(LLVM_VERSION)-dev.links debian/libclang1-$(LLVM_VERSION).links debian/pollycc
echo "Using gcc: "
$(CC) -v
mkdir -p $(TARGET_BUILD)
@ -120,16 +125,18 @@ override_dh_auto_configure: debian/lldb-$(LLVM_VERSION).install debian/lldb-$(LL
fi; \
ln -s ../clang .; \
readlink clang; \
if test -h lldb; then \
rm lldb; \
fi; \
ln -s ../lldb .;
# \
# if test -h polly; then \
# rm polly; \
# fi; \
# ln -s ../polly .; \
if test -h polly; then \
rm polly; \
fi; \
ln -s ../polly .
if test $(LLDB_ENABLE) = yes; then \
cd tools/ && \
if test -h lldb; then \
rm lldb; \
fi; \
ln -s ../lldb .; \
fi
cd projects/ && \
if test -h compiler-rt; then \
@ -210,7 +217,7 @@ build_doc:
for f in llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-tblgen macho-dump lldb clang-format clang-modernize; do \
help2man --version-string=$(LLVM_VERSION) $(TARGET_BUILD)/Release/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \
done
done
override_dh_auto_install:
$(MAKE) -C $(TARGET_BUILD) VERBOSE=1 install DESTDIR=$(CURDIR)/debian/tmp/
@ -218,7 +225,9 @@ override_dh_auto_install:
chrpath -d `find $(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/bin/ -type f -executable`
mv $(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/libLLVM-$(LLVM_VERSION)*.so $(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/libLLVM-$(LLVM_VERSION).so.$(SONAME_EXT)
mv $(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/liblldb.so $(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/liblldb.so.$(SONAME_EXT)
if test $(LLDB_ENABLE) = yes; then \
mv $(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/liblldb.so $(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/liblldb.so.$(SONAME_EXT); \
fi
cd debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/ && mv libclang.so libclang.so.$(SONAME_EXT) && ln -s libclang.so.$(SONAME_EXT) libclang.so
# cd $(TARGET_BUILD)/tools/clang/runtime/compiler-rt/ && rm -rf $$(find . -iname "SubDir.lib*" -o -iname .dir) && rm -rf $$(find -empty)
@ -294,9 +303,12 @@ override_dh_auto_test:
$(MAKE) -C $(TARGET_BUILD) check || true
# clang tests
cd $(TARGET_BUILD)/ && $(MAKE) -C tools/clang/ test || true
# lldb tests
cd $(TARGET_BUILD)/Release/lib/python2.7/site-packages/lldb && if test ! -h _lldb.so -o ! -f _lldb.so; then ln -s ../../../liblldb.so _lldb.so; fi
cd $(TARGET_BUILD)/Release/lib/python2.7/site-packages/lldb && if test ! -h libLLVM-$(LLVM_VERSION).so.$(SONAME_EXT) -o ! -f _lldb.so; then ln -s ../../../libLLVM-$(LLVM_VERSION).so libLLVM-$(LLVM_VERSION).so.$(SONAME_EXT); fi
if test $(LLDB_ENABLE) = yes; then \
cd $(TARGET_BUILD)/Release/lib/python2.7/site-packages/lldb && if test ! -h _lldb.so -o ! -f _lldb.so; then ln -s ../../../liblldb.so _lldb.so; fi; \
if test ! -h libLLVM-$(LLVM_VERSION).so.$(SONAME_EXT) -o ! -f _lldb.so; then ln -s ../../../libLLVM-$(LLVM_VERSION).so libLLVM-$(LLVM_VERSION).so.$(SONAME_EXT); fi; \
fi
cd $(TARGET_BUILD)/ && $(MAKE) -C tools/lldb/test || true
if test -d $(TARGET_BUILD)/tools/lldb/test/lldb-test-traces/; then \
cat $(TARGET_BUILD)/tools/lldb/test/lldb-test-traces/*; \