From 875ec1e77c051c0fac6b8641e511ee84b2eb11e2 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 10 Jan 2013 16:41:04 +0000 Subject: [PATCH] Temporary work about a global llvm-toolchain packages --- debian/README.source | 7 + debian/TODO | 2 + debian/changelog | 568 ++++++++++++++++++ debian/clang-3.2-doc.docs | 2 + debian/clang-3.2.install | 7 + debian/clang-3.2.links | 5 + debian/clang-3.2.manpages | 1 + debian/clang-3.2.postinst | 31 + debian/clang-3.2.prerm | 14 + debian/compat | 1 + debian/compiler-rt.install | 2 + debian/control | 430 +++++++++++++ debian/copyright | 89 +++ debian/debian_path.h | 22 + debian/libclang-common-dev.install | 2 + debian/libclang-dev.install | 4 + debian/libclang1.install | 1 + debian/libllvm-3.2-ocaml-dev.META | 63 ++ debian/libllvm-3.2-ocaml-dev.dirs.in | 2 + debian/libllvm-3.2-ocaml-dev.doc-base | 8 + debian/libllvm-3.2-ocaml-dev.install.in | 2 + .../libllvm-3.2-ocaml-dev.lintian-overrides | 2 + debian/libllvm3.2.install.in | 1 + debian/llvm-3.2-dev.dirs | 5 + debian/llvm-3.2-dev.install | 18 + debian/llvm-3.2-dev.links.in | 3 + debian/llvm-3.2-doc.dirs | 1 + debian/llvm-3.2-doc.install | 1 + debian/llvm-3.2-examples.dirs | 1 + debian/llvm-3.2-examples.examples | 1 + debian/llvm-3.2-examples.links | 3 + debian/llvm-3.2-runtime.binfmt.in | 3 + debian/llvm-3.2-runtime.install | 3 + debian/llvm-3.2-runtime.links | 1 + debian/llvm-3.2-runtime.manpages | 1 + debian/llvm-3.2-runtime.postinst | 9 + debian/llvm-3.2-runtime.prerm.in | 16 + debian/llvm-3.2.dirs | 3 + debian/llvm-3.2.install | 2 + debian/llvm-3.2.links | 1 + debian/llvm-3.2.manpages | 1 + debian/llvm-priv-dev.dirs | 1 + debian/llvm-snapshot.install | 13 + debian/man/scan-build.1 | 126 ++++ debian/man/scan-view.1 | 55 ++ debian/orig-tar.sh | 23 + debian/patches/18-soname.patch | 21 + debian/patches/19-clang_debian_version.patch | 22 + debian/patches/20-vendor.patch | 15 + debian/patches/21-searchPathHeaders.diff | 16 + .../23-strlcpy_strlcat_warning_removed.diff | 80 +++ debian/patches/26-disable_SplitsOnSpaces.diff | 24 + debian/patches/26-set-correct-float-abi.diff | 33 + debian/patches/27-fix_clang_stdint.diff | 27 + debian/patches/28-gcc-4.7-paths.diff | 44 ++ debian/patches/29-hurd.diff | 32 + debian/patches/30-kfreebsd.diff | 31 + debian/patches/profile_rt.diff | 27 + debian/patches/r167751.diff | 13 + debian/patches/r168827.diff | 13 + debian/patches/r168835.diff | 27 + debian/patches/r168901.diff | 26 + debian/patches/r169185.diff | 52 ++ debian/patches/r169767.diff | 55 ++ debian/patches/r171558.diff | 60 ++ debian/patches/series | 13 + debian/prepare-new-release.sh | 17 + debian/rules | 102 ++++ debian/source/format | 1 + debian/watch | 4 + 70 files changed, 2312 insertions(+) create mode 100644 debian/README.source create mode 100644 debian/TODO create mode 100644 debian/changelog create mode 100644 debian/clang-3.2-doc.docs create mode 100644 debian/clang-3.2.install create mode 100644 debian/clang-3.2.links create mode 100644 debian/clang-3.2.manpages create mode 100644 debian/clang-3.2.postinst create mode 100644 debian/clang-3.2.prerm create mode 100644 debian/compat create mode 100644 debian/compiler-rt.install create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/debian_path.h create mode 100644 debian/libclang-common-dev.install create mode 100644 debian/libclang-dev.install create mode 100644 debian/libclang1.install create mode 100644 debian/libllvm-3.2-ocaml-dev.META create mode 100644 debian/libllvm-3.2-ocaml-dev.dirs.in create mode 100644 debian/libllvm-3.2-ocaml-dev.doc-base create mode 100644 debian/libllvm-3.2-ocaml-dev.install.in create mode 100644 debian/libllvm-3.2-ocaml-dev.lintian-overrides create mode 100644 debian/libllvm3.2.install.in create mode 100644 debian/llvm-3.2-dev.dirs create mode 100644 debian/llvm-3.2-dev.install create mode 100644 debian/llvm-3.2-dev.links.in create mode 100644 debian/llvm-3.2-doc.dirs create mode 100644 debian/llvm-3.2-doc.install create mode 100644 debian/llvm-3.2-examples.dirs create mode 100644 debian/llvm-3.2-examples.examples create mode 100644 debian/llvm-3.2-examples.links create mode 100644 debian/llvm-3.2-runtime.binfmt.in create mode 100644 debian/llvm-3.2-runtime.install create mode 100644 debian/llvm-3.2-runtime.links create mode 100644 debian/llvm-3.2-runtime.manpages create mode 100644 debian/llvm-3.2-runtime.postinst create mode 100644 debian/llvm-3.2-runtime.prerm.in create mode 100644 debian/llvm-3.2.dirs create mode 100644 debian/llvm-3.2.install create mode 100644 debian/llvm-3.2.links create mode 100644 debian/llvm-3.2.manpages create mode 100644 debian/llvm-priv-dev.dirs create mode 100644 debian/llvm-snapshot.install create mode 100644 debian/man/scan-build.1 create mode 100644 debian/man/scan-view.1 create mode 100755 debian/orig-tar.sh create mode 100644 debian/patches/18-soname.patch create mode 100644 debian/patches/19-clang_debian_version.patch create mode 100644 debian/patches/20-vendor.patch create mode 100644 debian/patches/21-searchPathHeaders.diff create mode 100644 debian/patches/23-strlcpy_strlcat_warning_removed.diff create mode 100644 debian/patches/26-disable_SplitsOnSpaces.diff create mode 100644 debian/patches/26-set-correct-float-abi.diff create mode 100644 debian/patches/27-fix_clang_stdint.diff create mode 100644 debian/patches/28-gcc-4.7-paths.diff create mode 100644 debian/patches/29-hurd.diff create mode 100644 debian/patches/30-kfreebsd.diff create mode 100644 debian/patches/profile_rt.diff create mode 100644 debian/patches/r167751.diff create mode 100644 debian/patches/r168827.diff create mode 100644 debian/patches/r168835.diff create mode 100644 debian/patches/r168901.diff create mode 100644 debian/patches/r169185.diff create mode 100644 debian/patches/r169767.diff create mode 100644 debian/patches/r171558.diff create mode 100644 debian/patches/series create mode 100644 debian/prepare-new-release.sh create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 00000000..d0b74a3c --- /dev/null +++ b/debian/README.source @@ -0,0 +1,7 @@ + +In the repack script (orig-tar.sh), we are creating a subdirectory tools/clang/ +and storing all the sources of clang in it. +After that, the llvm sources are unpack, its patches applied + + -- Sylvestre Ledru Tue, 12 Apr 2011 21:21:24 +0200 + diff --git a/debian/TODO b/debian/TODO new file mode 100644 index 00000000..6bc80b6e --- /dev/null +++ b/debian/TODO @@ -0,0 +1,2 @@ +* moved the header at the right place in libclang-dev +* add the soname diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..ed6a1a0b --- /dev/null +++ b/debian/changelog @@ -0,0 +1,568 @@ +clang (3.2-1~exp4) experimental; urgency=low + + * Build using cmake instead of the autotools + * Also install clang-check & clang-tblgen in the clang-3.2 package + + -- Sylvestre Ledru Mon, 07 Jan 2013 15:45:54 +0100 + +clang (3.2-1~exp3) experimental; urgency=low + + * Install asan_symbolize in compiler-rt to extract results from the + AddressSanitizer + * Potential fix for C++ under i386 (Closes: #697127) + * Fix an issue with the version number (clang --version) + + -- Sylvestre Ledru Sun, 06 Jan 2013 06:58:33 +0100 + +clang (3.2-1~exp2) experimental; urgency=low + + * Update the detection of the headers under kfreebsd (Closes: #693498) + Thanks to Christoph Egger + * Introduce a documentation package (clang-3.2-doc) + * Introduce the libclang1-dbg package + + -- Sylvestre Ledru Wed, 26 Dec 2012 16:04:37 +0100 + +clang (3.2-1~exp1) experimental; urgency=low + + * New upstream release + * Add Python as build dependency for Ubuntu + + -- Sylvestre Ledru Thu, 20 Dec 2012 16:01:04 +0100 + +clang (3.2~rc3-1~exp3) experimental; urgency=low + + * clang dependency on llvm should be improved (Closes: #695477) + * Remove /usr/bin/c[89]9 alternatives on purge (Closes: #695590) + * Build only arch dependent packages was failing + * Fix a build error under HURD (PATH_MAX ...) + + -- Sylvestre Ledru Mon, 10 Dec 2012 14:38:23 +0100 + +clang (3.2~rc3-1~exp2) experimental; urgency=low + + * Remove the hardcoded usage of CC/CXX etc + It was using the layout $(DEB_HOST_GNU_TYPE)-gcc-$(GCC_VERSION) + Which was failing on more recent version of gcc and on some archs + + -- Sylvestre Ledru Sat, 08 Dec 2012 17:56:07 +0100 + +clang (3.2~rc3-1~exp1) experimental; urgency=low + + * New testing version + * Update of the repack script + + -- Sylvestre Ledru Thu, 06 Dec 2012 14:09:07 +0100 + +clang (3.2~rc2-1~exp1) experimental; urgency=low + + * New testing version + + -- Sylvestre Ledru Tue, 04 Dec 2012 11:37:59 +0100 + +clang (3.2~rc1-1~exp1) experimental; urgency=low + + * New testing version + - Fix when a bug when class with multiple copy constructors is in a union + (Closes: #691989) + - Improved support of C++ 11 (Closes: #666539) + * Use gcc 4.7 to build clang (instead of 4.6) (Closes: #685013) (LP: #1081905) + * Make asan (address sanitizer) work (Closes: #674155) + * Make --coverage work (LP: #954709) + * Also register clang for /usr/bin/c89 & /usr/bin/c99 (Closes: #688811) + * Take in account the new gcc C++ paths (Closes: #693240) + * Explicit dependency on libstdc++6-4.7-dev, libgcc-4.7-dev, libobjc-4.7-dev + from clang. Thanks to new changes of gcc (4.7.2-10) + * Enable parallel build when available + + [ Peter Michael Green ] + * 26-set-correct-float-abi.diff: Fix default float abis for armel and armhf + * 24-path-multiarch.diff: Fix paths for armhf + (Closes: #693208) + + -- Sylvestre Ledru Sat, 17 Nov 2012 15:31:19 +0100 + +clang (3.1+rt-1~exp2) experimental; urgency=low + + * Limit usage of compiler-rt to amd64 and i386 + * Remove the -j4 + + -- Sylvestre Ledru Thu, 16 Aug 2012 17:00:16 +0200 + +clang (3.1+rt-1~exp1) experimental; urgency=low + + * Introduce compiler-rt (as a new binary). + Thanks to Andrej Belym for the help. + * Homepage updated + * Improve the clean tartget + + -- Sylvestre Ledru Sat, 04 Aug 2012 15:15:16 +0200 + +clang (3.1-9~exp2) experimental; urgency=low + + * Factoring of the build process by switching to dh + (Change size from 14483 chars to 3008) + * Increase minimal version of debhelper to 7.0.50~ + + -- Sylvestre Ledru Sat, 28 Jul 2012 01:29:26 +0200 + +clang (3.1-9~exp1) experimental; urgency=low + + * Introduce a real clang-X.Y package + * clang is now providing objc-compiler and c++-compiler + * Update the description of the packages + + -- Sylvestre Ledru Sun, 08 Jul 2012 16:30:39 -0600 + +clang (3.1-8) unstable; urgency=low + + * Also ship clang static libraries for the plugin developments + (Closes: #678638) + * Also disable TEST(unescapeJsonCommandLine, ReturnsEmptyArrayOnEmptyString) + + -- Sylvestre Ledru Wed, 27 Jun 2012 23:03:55 +0200 + +clang (3.1-7) unstable; urgency=low + + * Revert previous change (disable test suite for some archs) + and disable instead just the failing test: + TEST(unescapeJsonCommandLine, SplitsOnSpaces) + (Closes: #678906) + + -- Sylvestre Ledru Mon, 25 Jun 2012 12:00:06 +0200 + +clang (3.1-6) unstable; urgency=low + + * Disable tests for kfreebsd-amd64 kfreebsd-i386 mips mipsel because a test + is freezing. This prevents clang to migrate to testing. + + -- Sylvestre Ledru Thu, 21 Jun 2012 11:04:39 +0200 + +clang (3.1-5) unstable; urgency=low + + * When the configure fails, display the content of config.log + * clang package provides clang-3.1 + * clang package provides virtual package 'c-compiler' + * control.in/source didn't contain the dependency on gcc-4.6 (Closes: #677853) + + -- Sylvestre Ledru Sun, 17 Jun 2012 12:03:52 +0200 + +clang (3.1-4) unstable; urgency=low + + * Force the version 4.6 of gcc to build (Closes: #675056, #674340) + + -- Sylvestre Ledru Fri, 01 Jun 2012 15:06:28 +0200 + +clang (3.1-3) unstable; urgency=low + + * Bring back the strlcpy & strlcat patch (Closes: #651454) + + -- Sylvestre Ledru Fri, 25 May 2012 09:39:24 +0200 + +clang (3.1-2) unstable; urgency=low + + * Add /usr/include/$(DEB_HOST_MULTIARCH) to the search path + with also DEB_HOST_GNU_TYPE (Closes: #671913) + + -- Sylvestre Ledru Wed, 23 May 2012 23:32:40 +0200 + +clang (3.1-1) unstable; urgency=low + + * New upstream release + * Upload in unstable + * Update of the description + * Explicit version dependency between clang => libclang-common-dev + + -- Sylvestre Ledru Mon, 21 May 2012 13:31:32 +0200 + +clang (3.1~+rc1-2) experimental; urgency=low + + * 23-strlcpy_strlcat_warning_removed.diff reconnected + * 12-gcc-4.6.patch, 22-debian-name.diff, 24-path-multiarch.diff, + 25-amdfam10.diff, 14-linkerflag.patch removed + + -- Sylvestre Ledru Mon, 23 Apr 2012 18:43:47 +0200 + +clang (3.1~+rc1-1) experimental; urgency=low + + * New upstream testing release + * Drop the conflict on ocaml-nox + + -- Sylvestre Ledru Thu, 19 Apr 2012 21:04:47 +0200 + +clang (3.1~svn154769-1) experimental; urgency=low + + * New snapshot release + * Fix a problem with the dependency on llvm-3.1 + * Enable tests (but do not fail the build if unexpected errors) + + -- Sylvestre Ledru Sun, 15 Apr 2012 22:28:39 +0200 + +clang (3.1~svn154596-1) experimental; urgency=low + + * New snapshot release + + -- Sylvestre Ledru Thu, 12 Apr 2012 21:08:42 +0200 + +clang (3.0-6) unstable; urgency=low + + * Improve the soname patch + * Drop the conflict on ocaml-nox + * Fix the wrong path detection under armel/armhf + (Closes: #655432) + * sse4a / amdfam10 support where not available. + Thanks to Aaron Haviland for the patch + (LP: #930494) + + -- Sylvestre Ledru Sat, 25 Feb 2012 13:23:29 +0100 + +clang (3.0-5) unstable; urgency=low + + * Fix an issue with a file override when installing libclang-common-dev + + -- Sylvestre Ledru Wed, 21 Dec 2011 09:09:58 +0100 + +clang (3.0-4) unstable; urgency=low + + * Get ride of old option --experimental-checks from the manpage + (Closes: #652047) + * Make clang work under powerpc. Thanks to Michel Dänzer for the patch + (Closes: #652096) + * Introduce package libclang-common-dev which contains specific clang headers + which are not (only) target for plugin/extension development. + Thanks to Gabriel Corona for the help and suggestions (Closes: #652278) + + -- Sylvestre Ledru Tue, 20 Dec 2011 15:41:35 +0100 + +clang (3.0-3) unstable; urgency=low + + * 23-strlcpy_strlcat_warning_removed.diff: strlcat and strlcpy does not exist + in Debian (Closes: #651454) + * 21-searchPathHeaders.diff: Update to include also the path to clang headers + (Closes: #645731) + + -- Sylvestre Ledru Sat, 10 Dec 2011 19:24:38 +0100 + +clang (3.0-2) unstable; urgency=low + + * 21-searchPathHeaders.diff: Update the search path list under x86 + (Closes: #643959) + * 22-debian-name.diff: Detection of Debian failed (Closes: #651301) + * debian/control.in/source, debian/control, debian/rules.d/vars.mk: + Force the minimal version on llvm-3.0-source to 3.0-3 (previous versions + did not include patches). (Closes: #645546) + + -- Sylvestre Ledru Wed, 07 Dec 2011 16:28:16 +0100 + +clang (3.0-1) unstable; urgency=low + + * New upstream release + * Patches work from debian/patches: + - 10-handleWheezySid.patch: Removed + - 11-searchMultiArchLibDir.patch: Removed + - 13-search-path-dpkg-based.patch: Removed + - 15-searchPaths.patch: Removed + - 16-backport-4.6-compta.patch: Removed + - 17-decltype.patch: Removed + - 14-linkerflag.patch: Refresh + - 18-soname.patch: Refresh + - 19-clang_debian_version.patch: Refresh + - 20-vendor.patch: Refresh + - 21-searchPathHeaders.diff: Updated (new search path) + + -- Sylvestre Ledru Thu, 10 Nov 2011 19:49:09 +0100 + +clang (2.9-16) unstable; urgency=low + + * Fix one more path issues under i386 ... (Closes: #643959) + + -- Sylvestre Ledru Thu, 13 Oct 2011 13:31:16 +0200 + +clang (2.9-15) unstable; urgency=low + + * Refactoring of some patches + * Get ride of some gcc 4.5 paths + * Update the configure arg from 4.5 to 4.6 (Closes: #644975, #640289) + + -- Sylvestre Ledru Tue, 11 Oct 2011 23:32:19 +0200 + +clang (2.9-14) unstable; urgency=low + + * Rename libclang0 => libclang1 + * Depends between libclang-dev => libclang1 added + Move libclang.so to libclang-dev (Closes: #643940) + * Fix some build issues + * Add /usr/lib/gcc/i486-linux-gnu/X.Y/include/stddef.h to the search + path for header (Closes: #643959) + * clang can now also build Objective C code (problems with header paths) + * Missing headers added in /usr/include/clang/ & /usr/include/clang-c/ + + -- Sylvestre Ledru Mon, 03 Oct 2011 17:17:03 +0200 + +clang (2.9-13) unstable; urgency=low + + * Provide libclang0 & libclang-dev packages (Closes: #598738) + * Provide a VENDOR for the clang version (obviously: Debian) + * Add the Debian revision in the clang version information + + -- Sylvestre Ledru Thu, 29 Sep 2011 17:29:42 +0200 + +clang (2.9-12) unstable; urgency=low + + * Explicit the dependency on libstdc++6-4.6-dev due to the multiarch + changes (Closes: #640547) + + -- Sylvestre Ledru Wed, 21 Sep 2011 11:27:29 +0200 + +clang (2.9-11) unstable; urgency=low + + * Add g++ headers of version 4.5 and 4.6 to the search path. + * Backport upstream support of g++-4.6 headers (commit 130057 & 128809) + + -- Sylvestre Ledru Sun, 04 Sep 2011 21:58:34 +0200 + +clang (2.9-10) unstable; urgency=low + + * Update gcc lib paths regarding the recent changes in the gcc multiarch paths + (Closes: #639962) + + -- Sylvestre Ledru Thu, 01 Sep 2011 17:05:03 +0200 + +clang (2.9-9) unstable; urgency=low + + * Update dependency on libstdc++6-4.5-dev to libstdc++6-4.6-dev + * Pass default ld flags --hash-style=both --no-copy-dt-needed-entries + Doko's request (Closes: #637869) + * Add gcc 4.5.3 and 4.6.1 in the search path + + -- Sylvestre Ledru Wed, 31 Aug 2011 00:25:19 +0200 + +clang (2.9-8) unstable; urgency=low + + * CFLAGS are now also multiarch. clang will now search in + /usr/include/HOST_MULTIARCH_TRIPLET/ for C headers (Closes: #633739) + (LP: #764870) + + -- Sylvestre Ledru Thu, 11 Aug 2011 15:07:13 +0200 + +clang (2.9-7) unstable; urgency=low + + * debian/patches/15-64_triple.patch, debian/patches/14-multiarchi386.diff, + debian/patches/13-multiarch-newpath.patch removed + * debian/patches/13-search-path-dpkg-based.patch: Better detection of the + gcc lib path. + It is now using dpkg-architecture to get the information and putting + the information in a define of the code. Thanks to Julien Blache for the + idea. + + -- Sylvestre Ledru Thu, 23 Jun 2011 21:46:59 +0200 + +clang (2.9-6) unstable; urgency=low + + * debian/patches/14-multiarchi386.diff: Specific case for x86 multi arch + (Closes: #629861) + * debian/patches/15-64_triple.patch: Fix the 64 bits detection of the gcc + libs + + -- Sylvestre Ledru Sat, 18 Jun 2011 19:15:39 +0200 + +clang (2.9-5) unstable; urgency=low + + * debian/control.in/clang, debian/control: Revert the change to + libstdc++6-4.6-dev because of bug #9472. Should be fixed in clang 2.10/3.0 + * control.in/source: Pierre removed from the uploaders + * control.in/*llvm*, packages.d/llvm.mk, debhelper.in/*llvm*, llvm.binfmt: + remove some llvm related and useless files in the context of clang + + -- Sylvestre Ledru Sun, 12 Jun 2011 23:39:03 +0200 + +clang (2.9-4) unstable; urgency=low + + * debian/patches/12-gcc-4.6.patch: Support of gcc 4.6 (Closes: #627131) + * debian/control.in/clang, debian/control: Dependency switch from + libstdc++6-4.5-dev to libstdc++6-4.6-dev + * debian/patches/13-multiarch-newpath.patch: Multiarch support + (Closes: #629861) + + -- Sylvestre Ledru Sun, 12 Jun 2011 11:14:49 +0200 + +clang (2.9-3) unstable; urgency=low + + * llvm-snapshot.install, llvm-gcc-4.2.links & llvm-gcc-4.2.install removed + (deprecated) + * debian/rules.d/vars.mk: useless rule removed + + [ Michael Wild ] + * debian/patches/11-searchMultiArchLibDir.patch: Adds the multi-arch library + directory to the file search path (Closes: #629594) + + -- Sylvestre Ledru Thu, 09 Jun 2011 22:48:32 +0200 + +clang (2.9-2) unstable; urgency=low + + [ Michael Wild ] + * debian/patches/searchGCCPath.patch: Remove because it is Ubuntu-specific + * debian/patches/10-handleWheezySid.patch: Make Debian wheezy/sid known to + Clang + * debian/rules: Pass include-paths at configure-time such that the broken + automatic searching is disabled (see + http://llvm.org/bugs/show_bug.cgi?id=6907). Only specify 32/64-bit + include-dir suffix on 32/64-bit architectures. + (Closes: #594820) (LP: #764870) + + -- Sylvestre Ledru Tue, 31 May 2011 10:49:52 +0200 + +clang (2.9-1) unstable; urgency=low + + * debian/packages.d/tools.mk: clang C++ headers detection was broken. Set them + by default. Thanks to Michael Wild for doing my work + * debian/control: libstdc++6-4.5-dev added as dependency of clang + (LP: #779404) + * debian/patches/searchGCCPath.patch: Added a path to the search of the C++ + header (Closes: #594820) (LP: #764870) + * debian/control.in/llvm-gcc-4.2, debian/control.in/llvm-snapshot, + debian/packages.d/llvm-gcc-4.2.mk, debian/packages.d/llvm-snapshot.mk: + removed + * Upload in unstable + + -- Sylvestre Ledru Sun, 22 May 2011 11:18:43 +0200 + +clang (2.9-1~exp1) experimental; urgency=low + + * New upstream release + + -- Sylvestre Ledru Tue, 12 Apr 2011 21:21:24 +0200 + +clang (2.8-2) unstable; urgency=low + + * debian/changelog: Upload to unstable + * debian/control.in/source: + - Update of the tags Vcs-Svn & Vcs-Browser + - Standards-Version updated to 3.9.2 + * debian/man/*.1: Man pages for scan-build and scan-view included. Thanks to + Gildo Fiorito (Closes: #606909) + * debian/watch: watch file added + + -- Sylvestre Ledru Wed, 16 Feb 2011 08:18:58 +0100 + +clang (2.8-1) experimental; urgency=low + + * Sync from Ubuntu + * New upstream release (Closes: #599531) + * Warning if NULL is assigned to int (Closes: #585168) + * clang -ftrapv: UNREACHABLE on 64-bit off_t addition (Closes: #608539) + * Incorrect implementation of __builtin_expect() (Closes: #588711) + * Add myself to the uploaders. + * Add clang as cc and c++ alternatives groups (Closes: #592011) + * Switch to dpkg-source 3.0 (quilt) format + + -- Sylvestre Ledru Mon, 14 Feb 2011 00:25:18 +0100 + +clang (2.8-0ubuntu1) maverick; urgency=low + + * LLVM-2.8 final release. LP: #632727. + + -- Matthias Klose Wed, 06 Oct 2010 13:53:54 +0200 + +clang (2.8~20100921-0ubuntu1) maverick; urgency=low + + * Snapshot, taken from the 2.8 release branch (20100921). + * Require the 2.8~20100921 llvm sources as a build dependency. + + -- Matthias Klose Tue, 21 Sep 2010 15:13:58 +0200 + +clang (2.8~20100911-0ubuntu1) maverick; urgency=low + + * Snapshot, taken from the 2.8 release branch (20100911). + + -- Matthias Klose Mon, 13 Sep 2010 10:04:24 +0200 + +clang (2.8~20100907-0ubuntu1) maverick; urgency=low + + * Snapshot, taken from the 2.8 release branch (20100907). + + -- Matthias Klose Tue, 07 Sep 2010 14:58:05 +0200 + +clang (2.7-0ubuntu2) maverick; urgency=low + + * Build-depend on the versioned llvm-2.7 packages. + + -- Matthias Klose Tue, 01 Jun 2010 17:09:39 +0200 + +clang (2.7-0ubuntu1) lucid; urgency=low + + * Final 2.7 release. LP: #526072. + * debian/debhelper.in/clang.install: Ship scan-build and ccc-analyzer. + LP: #549680. + + -- Matthias Klose Wed, 28 Apr 2010 13:35:09 +0200 + +clang (2.7~svn20100418-0ubuntu2) lucid; urgency=low + + * Set clang version to 1.1. + * Add clang compatibility link in /usr/lib/clang/1.1/bin. + * Don't build --with-oprofile. + * Build-depend on llvm-dev (>= 2.7~svn20100418-0ubuntu2). + + -- Matthias Klose Fri, 23 Apr 2010 00:58:04 +0200 + +clang (2.7~svn20100418-0ubuntu1) lucid; urgency=low + + * Snapshot, taken from the 2.7 release branch (20100418). + - Fixed regressions compared to 2.6: PR6660/6168, PR 6725. + + -- Matthias Klose Sun, 18 Apr 2010 22:42:43 +0200 + +clang (2.7~svn20100330-0ubuntu1) lucid; urgency=low + + * Snapshot, taken from the 2.7 release branch (20100330). + + -- Matthias Klose Tue, 30 Mar 2010 16:52:44 +0200 + +clang (2.7~svn20100317-0ubuntu1) lucid; urgency=low + + * clang 2.7 prerelease 1. + + -- Matthias Klose Sat, 20 Mar 2010 18:10:42 +0100 + +clang (2.7~svn20100308-0ubuntu4) lucid; urgency=low + + * Build-depend on oprofile. + + -- Matthias Klose Wed, 10 Mar 2010 23:05:12 +0100 + +clang (2.7~svn20100308-0ubuntu3) lucid; urgency=low + + * Build-depend on libffi-dev. + * Build-depend on tcl8.5 instead of tcl8.4. + + -- Matthias Klose Wed, 10 Mar 2010 16:25:34 +0100 + +clang (2.7~svn20100308-0ubuntu2) lucid; urgency=low + + * Fix build failure on ARM. + + -- Matthias Klose Wed, 10 Mar 2010 14:28:17 +0100 + +clang (2.7~svn20100308-0ubuntu1) lucid; urgency=low + + * Snapshot, taken from the 2.7 release branch (20100308). + * On ARM default to cortex-a8 for code generation. + * Configure with --disable-assertions. + + -- Matthias Klose Mon, 08 Mar 2010 17:33:18 +0100 + +clang (2.7~svn20100221-0ubuntu1) lucid; urgency=low + + * Snapshot, taken from the trunk (20100221). + * Merge packaging with llvm-2.7~svn20100221. + + -- Matthias Klose Sun, 21 Feb 2010 20:13:45 +0100 + +clang (2.6-1) unstable; urgency=low + + * Initial release, based on llvm-2.6 packaging. Closes: #459325. + * Use for example `clang -emit-llvm -c file.c && llvm-ld file.o'. + + -- Arthur Loiret Sun, 06 Dec 2009 18:33:53 +0000 + diff --git a/debian/clang-3.2-doc.docs b/debian/clang-3.2-doc.docs new file mode 100644 index 00000000..bd8ab708 --- /dev/null +++ b/debian/clang-3.2-doc.docs @@ -0,0 +1,2 @@ +tools/clang/docs/ +# for clang 3.3, it will be: _build/html diff --git a/debian/clang-3.2.install b/debian/clang-3.2.install new file mode 100644 index 00000000..811ae14c --- /dev/null +++ b/debian/clang-3.2.install @@ -0,0 +1,7 @@ +usr/bin/clang /usr/bin/ +usr/bin/clang++ /usr/bin/ +usr/bin/clang-check /usr/bin/ +usr/bin/clang-tblgen /usr/bin/ +tools/clang/tools/scan-build /usr/share/clang/ +tools/clang/tools/scan-view /usr/share/clang/ +#usr/share/man/man1/clang.1 usr/share/man/man1/ diff --git a/debian/clang-3.2.links b/debian/clang-3.2.links new file mode 100644 index 00000000..7ef4aa32 --- /dev/null +++ b/debian/clang-3.2.links @@ -0,0 +1,5 @@ +usr/share/man/man1/clang.1.gz usr/share/man/man1/llvm-clang.1.gz +usr/share/man/man1/clang.1.gz usr/share/man/man1/clang++.1.gz +/usr/share/clang/scan-build/scan-build /usr/bin/scan-build +/usr/share/clang/scan-view/scan-view /usr/bin/scan-view +/usr/bin/clang /usr/bin/llvm-clang diff --git a/debian/clang-3.2.manpages b/debian/clang-3.2.manpages new file mode 100644 index 00000000..e9475fdd --- /dev/null +++ b/debian/clang-3.2.manpages @@ -0,0 +1 @@ +#debian/man/scan*.1 diff --git a/debian/clang-3.2.postinst b/debian/clang-3.2.postinst new file mode 100644 index 00000000..64ae9fa6 --- /dev/null +++ b/debian/clang-3.2.postinst @@ -0,0 +1,31 @@ +#! /bin/sh -e + +prio=10 + +update-alternatives --quiet \ + --install /usr/bin/c++ \ + c++ \ + /usr/bin/clang++ \ + $prio + +update-alternatives --quiet \ + --install /usr/bin/cc \ + cc \ + /usr/bin/clang \ + $prio + +update-alternatives --quiet \ + --install /usr/bin/c89 \ + c89 \ + /usr/bin/clang \ + $prio + +update-alternatives --quiet \ + --install /usr/bin/c99 \ + c99 \ + /usr/bin/clang \ + $prio + +#DEBHELPER# + +exit 0 diff --git a/debian/clang-3.2.prerm b/debian/clang-3.2.prerm new file mode 100644 index 00000000..46ceec82 --- /dev/null +++ b/debian/clang-3.2.prerm @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then + update-alternatives --quiet --remove cc /usr/bin/clang + update-alternatives --quiet --remove c89 /usr/bin/clang + update-alternatives --quiet --remove c99 /usr/bin/clang + update-alternatives --quiet --remove c++ /usr/bin/clang++ +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/compiler-rt.install b/debian/compiler-rt.install new file mode 100644 index 00000000..2579bae8 --- /dev/null +++ b/debian/compiler-rt.install @@ -0,0 +1,2 @@ +build-clang/lib/clang/3.2/lib/linux/*.a /usr/lib/clang/3.2/ +build-clang/lib/libprofile_rt.a /usr/lib/clang/3.2/ diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..3a39d6b4 --- /dev/null +++ b/debian/control @@ -0,0 +1,430 @@ +Source: llvm-toolchain +Section: devel +Priority: optional +Maintainer: LLVM Packaging Team +Uploaders: Sylvestre Ledru +Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl8.5, expect, + autoconf, automake1.9, perl, libtool, doxygen, chrpath, texinfo, + sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9), + lsb-release, patchutils, diffstat, xz-utils, llvm-3.2-dev (>= 3.2), + llvm-3.2-source (>= 3.2), chrpath, python +Build-Conflicts: oprofile, ocaml +Standards-Version: 3.9.3 +Homepage: http://www.llvm.org/ +Vcs-Svn: svn://svn.debian.org/svn/pkg-llvm/llvm-toolchain/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/pkg-llvm/llvm-toolchain/trunk/ + +Package: clang +Architecture: all +Depends: clang-3.2, ${misc:Depends} +Description: C, C++ and Objective-C compiler (LLVM based) + Clang project is a C, C++, Objective C and Objective C++ front-end + for the LLVM compiler. Some of its goals include the following: + . + End-User Features: + . + * Fast compiles and low memory use + * Expressive diagnostics (examples) + * GCC compatibility + . + Utility and Applications: + . + * Modular library based architecture + * Support diverse clients (refactoring, static analysis, code + generation, etc) + * Allow tight integration with IDEs + * Use the LLVM 'BSD' License + . + Internal Design and Implementation: + . + * A real-world, production quality compiler + * A simple and hackable code base + * A single unified parser for C, Objective C, C++, and Objective C++ + * Conformance with C/C++/ObjC and their variants + +Package: clang-3.2 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libstdc++6-4.7-dev, libgcc-4.7-dev, + libobjc-4.7-dev, libclang-common-dev (= ${binary:Version}) +Provides: c-compiler, objc-compiler, c++-compiler +Recommends: llvm-3.2-dev, python +Replaces: clang (<< 3.1), clang-3.1 +Breaks: clang (<< 3.1), clang-3.1 +Description: C, C++ and Objective-C compiler (LLVM based) + Clang project is a C, C++, Objective C and Objective C++ front-end + for the LLVM compiler. Some of its goals include the following: + . + End-User Features: + . + * Fast compiles and low memory use + * Expressive diagnostics (examples) + * GCC compatibility + . + Utility and Applications: + . + * Modular library based architecture + * Support diverse clients (refactoring, static analysis, code + generation, etc) + * Allow tight integration with IDEs + * Use the LLVM 'BSD' License + . + Internal Design and Implementation: + . + * A real-world, production quality compiler + * A simple and hackable code base + * A single unified parser for C, Objective C, C++, and Objective C++ + * Conformance with C/C++/ObjC and their variants + +Package: clang-3.2-doc +Architecture: all +Section: doc +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: C, C++ and Objective-C compiler (LLVM based) - Documentation + Clang project is a C, C++, Objective C and Objective C++ front-end + for the LLVM compiler. Some of its goals include the following: + . + End-User Features: + . + * Fast compiles and low memory use + * Expressive diagnostics (examples) + * GCC compatibility + . + Utility and Applications: + . + * Modular library based architecture + * Support diverse clients (refactoring, static analysis, code + generation, etc) + * Allow tight integration with IDEs + * Use the LLVM 'BSD' License + . + Internal Design and Implementation: + . + * A real-world, production quality compiler + * A simple and hackable code base + * A single unified parser for C, Objective C, C++, and Objective C++ + * Conformance with C/C++/ObjC and their variants + . + This package contains the documentation. + +Package: libclang1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libstdc++6-4.7-dev +Description: clang library + Clang project is a C, C++, Objective C and Objective C++ front-end + for the LLVM compiler. Some of its goals include the following: + . + End-User Features: + . + * Fast compiles and low memory use + * Expressive diagnostics (examples) + * GCC compatibility + . + Utility and Applications: + . + * Modular library based architecture + * Support diverse clients (refactoring, static analysis, code + generation, etc) + * Allow tight integration with IDEs + * Use the LLVM 'BSD' License + . + Internal Design and Implementation: + . + * A real-world, production quality compiler + * A simple and hackable code base + * A single unified parser for C, Objective C, C++, and Objective C++ + * Conformance with C/C++/ObjC and their variants + . + This package contains the clang library. + +Package: libclang1-dbg +Architecture: any +Section: debug +Priority: extra +Depends: ${shlibs:Depends}, ${misc:Depends}, libstdc++6-4.7-dev, libclang1 +Description: clang library + Clang project is a C, C++, Objective C and Objective C++ front-end + for the LLVM compiler. Some of its goals include the following: + . + End-User Features: + . + * Fast compiles and low memory use + * Expressive diagnostics (examples) + * GCC compatibility + . + Utility and Applications: + . + * Modular library based architecture + * Support diverse clients (refactoring, static analysis, code + generation, etc) + * Allow tight integration with IDEs + * Use the LLVM 'BSD' License + . + Internal Design and Implementation: + . + * A real-world, production quality compiler + * A simple and hackable code base + * A single unified parser for C, Objective C, C++, and Objective C++ + * Conformance with C/C++/ObjC and their variants + . + This package contains the debugging symbols. + +Package: libclang-dev +Architecture: any +Section: libdevel +Depends: ${shlibs:Depends}, ${misc:Depends}, libstdc++6-4.7-dev, + libclang1 (= ${binary:Version}), libclang-common-dev +Description: clang library - Development package + Clang project is a C, C++, Objective C and Objective C++ front-end + for the LLVM compiler. Some of its goals include the following: + . + End-User Features: + . + * Fast compiles and low memory use + * Expressive diagnostics (examples) + * GCC compatibility + . + Utility and Applications: + . + * Modular library based architecture + * Support diverse clients (refactoring, static analysis, code + generation, etc) + * Allow tight integration with IDEs + * Use the LLVM 'BSD' License + . + Internal Design and Implementation: + . + * A real-world, production quality compiler + * A simple and hackable code base + * A single unified parser for C, Objective C, C++, and Objective C++ + * Conformance with C/C++/ObjC and their variants + . + This package contains the clang headers to develop extensions over libclang. + +Package: libclang-common-dev +Architecture: any +Replaces: libclang-dev +Section: libdevel +Depends: ${misc:Depends} +Description: clang library - Common development package + Clang project is a C, C++, Objective C and Objective C++ front-end + for the LLVM compiler. Some of its goals include the following: + . + End-User Features: + . + * Fast compiles and low memory use + * Expressive diagnostics (examples) + * GCC compatibility + . + Utility and Applications: + . + * Modular library based architecture + * Support diverse clients (refactoring, static analysis, code + generation, etc) + * Allow tight integration with IDEs + * Use the LLVM 'BSD' License + . + Internal Design and Implementation: + . + * A real-world, production quality compiler + * A simple and hackable code base + * A single unified parser for C, Objective C, C++, and Objective C++ + * Conformance with C/C++/ObjC and their variants + . + This package contains the clang generic headers. + + +Package: compiler-rt +Architecture: amd64 i386 +Replaces: libclang-dev +Section: libdevel +Depends: ${misc:Depends}, python +Description: Runtime C library - LLVM based + The compiler-rt project is a simple library that provides an implementation of + the low-level target-specific hooks required by code generation and other + runtime components. For example, when compiling for a 32-bit target, + converting a double to a 64-bit unsigned integer is compiling into a runtime + call to the "__fixunsdfdi" function. The compiler-rt library provides + optimized implementations of this and other low-level routines. + . + The current feature set of compiler-rt is: + . + * Full support for the libgcc interfaces on supported targets. + * High performance hand tuned implementations of commonly used functions + like __floatundidf in assembly that are dramatically faster than the + libgcc implementations. + . + +Package: libllvm3.2 +Architecture: any +Section: libs +Depends: ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Description: Low-Level Virtual Machine (LLVM), runtime library + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. + . + This package contains the LLVM runtime library. + +Package: libllvm3.2-dbg +Architecture: any +Section: debug +Priority: extra +Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm3.2 +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Description: Low-Level Virtual Machine (LLVM), debugging symbols library + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. + . + This package contains the LLVM runtime library debug symbols. + +Package: llvm-3.2 +Architecture: any +Suggests: llvm-3.2-doc +Depends: llvm-3.2-runtime (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Recommends: llvm-3.2-dev +Conflicts: llvm (<< 2.7-1) +Replaces: llvm (<< 2.7-1) +Description: Low-Level Virtual Machine (LLVM) + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + The strengths of the LLVM infrastructure are its extremely + simple design (which makes it easy to understand and use), + source-language independence, powerful mid-level optimizer, automated + compiler debugging support, extensibility, and its stability and + reliability. LLVM is currently being used to host a wide variety of + academic research projects and commercial projects. LLVM includes C + and C++ front-ends, a front-end for a Forth-like language (Stacker), + a young scheme front-end, and Java support is in development. LLVM can + generate code for X86, SparcV9, PowerPC, or it can emit C code. + . + LLVM is the key component of the clang compiler and the gcc plugin called + dragonegg. + +Package: llvm-3.2-runtime +Architecture: any +Depends: binfmt-support, ${shlibs:Depends}, ${misc:Depends} +Conflicts: llvm (<< 2.7-1) +Replaces: llvm (<< 2.7-1) +Description: Low-Level Virtual Machine (LLVM), bytecode interpreter + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package provides the minimal required to execute programs in LLVM + format. + +Package: llvm-3.2-dev +Architecture: any +Depends: ${shlibs:Depends}, libffi-dev (>= 3.0.9), ${misc:Depends}, llvm-3.2 (= ${binary:Version}) +Replaces: llvm (<< 2.2-3) +Description: Low-Level Virtual Machine (LLVM), libraries and headers + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package provides the libraries and headers to develop applications + using llvm. + +Package: libllvm-3.2-ocaml-dev +Section: ocaml +Architecture: any +Suggests: llvm-3.2-doc +Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-3.2-dev (= ${binary:Version}) +Replaces: libllvm-ocaml-3.2-dev +Conflicts: libllvm-ocaml-3.2-dev +Provides: ${ocaml:Provides} +Description: Low-Level Virtual Machine (LLVM), bindings for OCaml + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package provides the OCaml bindings to develop applications using llvm. + +Package: llvm-3.2-doc +Section: doc +Architecture: all +Depends: ${misc:Depends} +Description: Low-Level Virtual Machine (LLVM), documentation + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package contains all documentation (extensive). + +Package: llvm-3.2-examples +Section: doc +Architecture: all +Depends: ${misc:Depends}, llvm-3.2-dev (>= ${source:Version}), llvm-3.2-dev (<< ${source:Version}+c~) +Description: Low-Level Virtual Machine (LLVM), examples + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package contains examples for using LLVM, both in developing + extensions to LLVM and in using it to compile code. + +Package: llvm-3.2-source +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Low-Level Virtual Machine (LLVM), source code + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package contains the llvm source code. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..25aafead --- /dev/null +++ b/debian/copyright @@ -0,0 +1,89 @@ +This package was debianized by Arthur Loiret on +Sun, 10 Nov 2007 12:32:05 +0200. + +It was downloaded from http://llvm.org/releases/download.html + + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + 14 rue de Plaisance, 75014 Paris, France + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + +============================================================================== +LLVM Release License +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2003-2007 University of Illinois at Urbana-Champaign. +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +System Library llvm/lib/System +Compiler Driver llvm/tools/llvmc +Autoconf llvm/autoconf + llvm/projects/ModuleMaker/autoconf + llvm/projects/sample/autoconf + diff --git a/debian/debian_path.h b/debian/debian_path.h new file mode 100644 index 00000000..559f23a0 --- /dev/null +++ b/debian/debian_path.h @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// Debian paths declaration management +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef DEBIAN_PATH_H +#define DEBIAN_PATH_H + +// To create the full path to libgcc and other. +// For example: /usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5/libgcc.a + +#define DEB_HOST_MULTIARCH_TRIPLET "@DEB_HOST_MULTIARCH@" +#define DEB_HOST_GNU_TYPE_TRIPLET "@DEB_HOST_GNU_TYPE@" + +// Provides the debian revision +#define DEB_PATCHSETVERSION "@DEB_PATCHSETVERSION@" + +#endif diff --git a/debian/libclang-common-dev.install b/debian/libclang-common-dev.install new file mode 100644 index 00000000..06fe476d --- /dev/null +++ b/debian/libclang-common-dev.install @@ -0,0 +1,2 @@ +usr/lib/clang/3.2/include/ /usr/include/clang/3.2/ +usr/lib/clang/3.2/lib /usr/lib/clang/3.2/ diff --git a/debian/libclang-dev.install b/debian/libclang-dev.install new file mode 100644 index 00000000..6b21b81d --- /dev/null +++ b/debian/libclang-dev.install @@ -0,0 +1,4 @@ +usr/include/clang /usr/include/ +usr/include/clang-c /usr/include/ +usr/lib/libclang.so /usr/lib/ +usr/lib/libclang*a /usr/lib/ diff --git a/debian/libclang1.install b/debian/libclang1.install new file mode 100644 index 00000000..f4d341cf --- /dev/null +++ b/debian/libclang1.install @@ -0,0 +1 @@ +usr/lib/libclang.so.1 diff --git a/debian/libllvm-3.2-ocaml-dev.META b/debian/libllvm-3.2-ocaml-dev.META new file mode 100644 index 00000000..699b69bd --- /dev/null +++ b/debian/libllvm-3.2-ocaml-dev.META @@ -0,0 +1,63 @@ +description = "Low Level Virtual Machine bindings" +version = "3.2" + +directory = "+llvm-3.2" + +archive(byte) = "llvm.cma" +archive(native) = "llvm.cmxa" +linkopts = "-cclib -lstdc++ -cclib -lllvm" + +package "executionengine" +( + requires = "llvm-3_2" + version = "3.2" + archive(native) = "llvm_executionengine.cmxa" + archive(byte) = "llvm_executionengine.cma" + linkopts = "-cclib -lllvm_executionengine" +) + +package "target" +( + requires = "llvm-3_2" + version = "3.2" + archive(native) = "llvm_target.cmxa" + archive(byte) = "llvm_target.cma" + linkopts = "-cclib -lllvm_target" +) + +package "scalar_opts" +( + requires = "llvm-3_2 llvm-3_2.target" + version = "3.2" + archive(native) = "llvm_scalar_opts.cmxa" + archive(byte) = "llvm_scalar_opts.cma" + linkopts = "-cclib -lllvm_scalar_opts" +) + +package "analysis" +( + requires = "llvm-3_2" + version = "3.2" + archive(native) = "llvm_analysis.cmxa" + archive(byte) = "llvm_analysis.cma" + linkopts = "-cclib -lllvm_analysis" +) + +package "bitwriter" +( + requires = "llvm-3_2" + version = "3.2" + archive(native) = "llvm_bitwriter.cmxa" + archive(byte) = "llvm_bitwriter.cma" + linkopts = "-cclib -lllvm_bitwriter" +) + +package "bitreader" +( + requires = "llvm-3_2 llvm-3_2.bitwriter" + version = "3.2" + archive(native) = "llvm_bitreader.cmxa" + archive(byte) = "llvm_bitreader.cma" + linkopts = "-cclib -lllvm_bitreader" +) + diff --git a/debian/libllvm-3.2-ocaml-dev.dirs.in b/debian/libllvm-3.2-ocaml-dev.dirs.in new file mode 100644 index 00000000..6c9c7364 --- /dev/null +++ b/debian/libllvm-3.2-ocaml-dev.dirs.in @@ -0,0 +1,2 @@ +@OCAML_STDLIB_DIR@/META/ + diff --git a/debian/libllvm-3.2-ocaml-dev.doc-base b/debian/libllvm-3.2-ocaml-dev.doc-base new file mode 100644 index 00000000..7aeadd11 --- /dev/null +++ b/debian/libllvm-3.2-ocaml-dev.doc-base @@ -0,0 +1,8 @@ +Document: libllvm-3.2-ocaml-dev-ocamldoc-api-reference +Title: Llvm OCamldoc API Reference +Abstract: API reference manual for libllvm-ocaml-dev (generated via OCamldoc) +Section: Programming/OCaml + +Format: HTML +Index: /usr/share/doc/libllvm-3.2-ocaml-dev/html/index.html +Files: /usr/share/doc/libllvm-3.2-ocaml-dev/html/* diff --git a/debian/libllvm-3.2-ocaml-dev.install.in b/debian/libllvm-3.2-ocaml-dev.install.in new file mode 100644 index 00000000..d03634fe --- /dev/null +++ b/debian/libllvm-3.2-ocaml-dev.install.in @@ -0,0 +1,2 @@ +debian/tmp/@OCAML_STDLIB_DIR@/llvm-3.2 @OCAML_STDLIB_DIR@/ +debian/tmp//usr/lib/llvm-3.2/docs/llvm/ocamldoc/html usr/share/doc/libllvm-3.2-ocaml-dev/ diff --git a/debian/libllvm-3.2-ocaml-dev.lintian-overrides b/debian/libllvm-3.2-ocaml-dev.lintian-overrides new file mode 100644 index 00000000..3fecd490 --- /dev/null +++ b/debian/libllvm-3.2-ocaml-dev.lintian-overrides @@ -0,0 +1,2 @@ +# It is in the section ocaml which is fine. +libllvm-3.2-ocaml-dev: wrong-section-according-to-package-name libllvm-3.2-ocaml-dev => libdevel diff --git a/debian/libllvm3.2.install.in b/debian/libllvm3.2.install.in new file mode 100644 index 00000000..860cba92 --- /dev/null +++ b/debian/libllvm3.2.install.in @@ -0,0 +1 @@ +usr/lib/llvm-3.2/lib/libLLVM-3.2.so.1 /usr/lib/@DEB_HOST_MULTIARCH@/ diff --git a/debian/llvm-3.2-dev.dirs b/debian/llvm-3.2-dev.dirs new file mode 100644 index 00000000..bfcb102f --- /dev/null +++ b/debian/llvm-3.2-dev.dirs @@ -0,0 +1,5 @@ +/usr/lib/llvm-3.2/lib +/usr/lib/llvm-3.2/build +/usr/lib/llvm-3.2/include +usr/share/doc/llvm-3.2-dev +usr/share/emacs/site-lisp/llvm-3.2 diff --git a/debian/llvm-3.2-dev.install b/debian/llvm-3.2-dev.install new file mode 100644 index 00000000..bf074cd4 --- /dev/null +++ b/debian/llvm-3.2-dev.install @@ -0,0 +1,18 @@ +debian/tmp//usr/lib/llvm-3.2/lib/* /usr/lib/llvm-3.2/lib/ +debian/tmp//usr/lib/llvm-3.2/include/llvm/ usr/include/llvm-3.2/ +debian/tmp//usr/lib/llvm-3.2/include/llvm-c/ usr/include/llvm-c-3.2/ + +build-llvm/Makefile.common /usr/lib/llvm-3.2/build/ +build-llvm/Makefile.config /usr/lib/llvm-3.2/build/ +build-llvm/config.status /usr/lib/llvm-3.2/build/ +Makefile.rules /usr/lib/llvm-3.2/build/ +configure /usr/lib/llvm-3.2/build/ +autoconf/ /usr/lib/llvm-3.2/build/ + +utils/vim/llvm.vim usr/share/vim/addons/syntax/llvm-3.2.vim +utils/vim/tablegen.vim usr/share/vim/addons/syntax/tablegen-3.2.vim + +utils/emacs/emacs.el usr/share/emacs/site-lisp/llvm-3.2/ +utils/emacs/llvm-mode.el usr/share/emacs/site-lisp/llvm-3.2/ +utils/emacs/tablegen-mode.el usr/share/emacs/site-lisp/llvm-3.2/ + diff --git a/debian/llvm-3.2-dev.links.in b/debian/llvm-3.2-dev.links.in new file mode 100644 index 00000000..22392821 --- /dev/null +++ b/debian/llvm-3.2-dev.links.in @@ -0,0 +1,3 @@ +usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-3.2.so.1 usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-3.2.so +usr/include/llvm-c-3.2/llvm-c usr/lib/llvm-3.2/include/llvm-c +usr/include/llvm-3.2/llvm usr/lib/llvm-3.2/include/llvm diff --git a/debian/llvm-3.2-doc.dirs b/debian/llvm-3.2-doc.dirs new file mode 100644 index 00000000..e9ec3487 --- /dev/null +++ b/debian/llvm-3.2-doc.dirs @@ -0,0 +1 @@ +usr/share/doc/llvm-3.2-doc diff --git a/debian/llvm-3.2-doc.install b/debian/llvm-3.2-doc.install new file mode 100644 index 00000000..a3b1c54b --- /dev/null +++ b/debian/llvm-3.2-doc.install @@ -0,0 +1 @@ +docs/_build/html usr/share/doc/llvm-3.2-doc/ diff --git a/debian/llvm-3.2-examples.dirs b/debian/llvm-3.2-examples.dirs new file mode 100644 index 00000000..49835d88 --- /dev/null +++ b/debian/llvm-3.2-examples.dirs @@ -0,0 +1 @@ +usr/share/doc/llvm-3.2-examples diff --git a/debian/llvm-3.2-examples.examples b/debian/llvm-3.2-examples.examples new file mode 100644 index 00000000..e39721e2 --- /dev/null +++ b/debian/llvm-3.2-examples.examples @@ -0,0 +1 @@ +examples/* diff --git a/debian/llvm-3.2-examples.links b/debian/llvm-3.2-examples.links new file mode 100644 index 00000000..78b9c5c5 --- /dev/null +++ b/debian/llvm-3.2-examples.links @@ -0,0 +1,3 @@ +/usr/lib/llvm-3.2/build/Makefile.common usr/share/doc/llvm-3.2-examples/Makefile.common +/usr/lib/llvm-3.2/build/Makefile.config usr/share/doc/llvm-3.2-examples/Makefile.config +/usr/lib/llvm-3.2/build/Makefile.rules usr/share/doc/llvm-3.2-examples/Makefile.rules diff --git a/debian/llvm-3.2-runtime.binfmt.in b/debian/llvm-3.2-runtime.binfmt.in new file mode 100644 index 00000000..6bb1df78 --- /dev/null +++ b/debian/llvm-3.2-runtime.binfmt.in @@ -0,0 +1,3 @@ +package llvm-@LLVM_VERSION@-runtime +interpreter /usr/bin/lli-@LLVM_VERSION@ +magic BC diff --git a/debian/llvm-3.2-runtime.install b/debian/llvm-3.2-runtime.install new file mode 100644 index 00000000..6a7d2d65 --- /dev/null +++ b/debian/llvm-3.2-runtime.install @@ -0,0 +1,3 @@ +debian/tmp/usr/lib/llvm-3.2/bin/lli /usr/lib/llvm-3.2/bin/ +debian/tmp/usr/bin/lli-3.2 /usr/bin/ +debian/llvm-3.2-runtime.binfmt usr/share/binfmts/ diff --git a/debian/llvm-3.2-runtime.links b/debian/llvm-3.2-runtime.links new file mode 100644 index 00000000..655ca2dc --- /dev/null +++ b/debian/llvm-3.2-runtime.links @@ -0,0 +1 @@ +# AUTOGENERATED in debian/rules.d/binary.mk. diff --git a/debian/llvm-3.2-runtime.manpages b/debian/llvm-3.2-runtime.manpages new file mode 100644 index 00000000..98af2255 --- /dev/null +++ b/debian/llvm-3.2-runtime.manpages @@ -0,0 +1 @@ +debian/tmp//usr/lib/llvm-3.2/share/man/man1/lli* diff --git a/debian/llvm-3.2-runtime.postinst b/debian/llvm-3.2-runtime.postinst new file mode 100644 index 00000000..d3156493 --- /dev/null +++ b/debian/llvm-3.2-runtime.postinst @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if test "$1" = "configure"; then + if test -x /usr/sbin/update-binfmts; then + update-binfmts --import llvm-3.2-runtime.binfmt || true + fi +fi + +#DEBHELPER# diff --git a/debian/llvm-3.2-runtime.prerm.in b/debian/llvm-3.2-runtime.prerm.in new file mode 100644 index 00000000..09f96cc5 --- /dev/null +++ b/debian/llvm-3.2-runtime.prerm.in @@ -0,0 +1,16 @@ +#!/bin/sh -e + +if test "$1" = "remove"; then + if test -x /usr/sbin/update-binfmts; then + update-binfmts --package llvm-@LLVM_VERSION@-runtime \ + --remove llvm-@LLVM_VERSION@-runtime.binfmt /usr/bin/lli-@LLVM_VERSION@ || true + if test -f /var/lib/binfmts/llvm-@LLVM_VERSION@.binfmt; then + # Purge old file + update-binfmts --package llvm-@LLVM_VERSION@-runtime \ + --remove llvm-@LLVM_VERSION@.binfmt /usr/bin/lli-@LLVM_VERSION@ || true + fi + fi +fi + +#DEBHELPER# + diff --git a/debian/llvm-3.2.dirs b/debian/llvm-3.2.dirs new file mode 100644 index 00000000..9b8d4db7 --- /dev/null +++ b/debian/llvm-3.2.dirs @@ -0,0 +1,3 @@ +/usr/lib/llvm-3.2/bin +usr/share/man/man1 +usr/share/doc/llvm-3.2 diff --git a/debian/llvm-3.2.install b/debian/llvm-3.2.install new file mode 100644 index 00000000..0c1ffa74 --- /dev/null +++ b/debian/llvm-3.2.install @@ -0,0 +1,2 @@ +debian/tmp//usr/lib/llvm-3.2/bin/* /usr/lib/llvm-3.2/bin/ +debian/tmp/usr/bin/* /usr/bin diff --git a/debian/llvm-3.2.links b/debian/llvm-3.2.links new file mode 100644 index 00000000..655ca2dc --- /dev/null +++ b/debian/llvm-3.2.links @@ -0,0 +1 @@ +# AUTOGENERATED in debian/rules.d/binary.mk. diff --git a/debian/llvm-3.2.manpages b/debian/llvm-3.2.manpages new file mode 100644 index 00000000..717f19f4 --- /dev/null +++ b/debian/llvm-3.2.manpages @@ -0,0 +1 @@ +docs/_build/man/* \ No newline at end of file diff --git a/debian/llvm-priv-dev.dirs b/debian/llvm-priv-dev.dirs new file mode 100644 index 00000000..dab86638 --- /dev/null +++ b/debian/llvm-priv-dev.dirs @@ -0,0 +1 @@ +/usr/lib/llvm-3.1/build diff --git a/debian/llvm-snapshot.install b/debian/llvm-snapshot.install new file mode 100644 index 00000000..3dbc23f6 --- /dev/null +++ b/debian/llvm-snapshot.install @@ -0,0 +1,13 @@ +debian/tmp//usr/lib/llvm-3.1/bin/* /usr/lib/llvm-3.1/bin/ +debian/tmp//usr/lib/llvm-3.1/lib/* /usr/lib/llvm-3.1/lib/ +debian/tmp//usr/lib/llvm-3.1/include/* /usr/lib/llvm-3.1/include/ + +debian/tmp//usr/lib/llvm-3.1/docs/llvm/html usr/share/doc/llvm-snapshot/ +debian/tmp//usr/lib/llvm-3.1/docs/llvm/ps usr/share/doc/llvm-snapshot/ + +build-llvm/Makefile.common /usr/lib/llvm-3.1/build/ +build-llvm/Makefile.config /usr/lib/llvm-3.1/build/ +build-llvm/config.status /usr/lib/llvm-3.1/build/ +Makefile.rules /usr/lib/llvm-3.1/build/ +configure /usr/lib/llvm-3.1/build/ +autoconf/ /usr/lib/llvm-3.1/build/ diff --git a/debian/man/scan-build.1 b/debian/man/scan-build.1 new file mode 100644 index 00000000..ef77a25d --- /dev/null +++ b/debian/man/scan-build.1 @@ -0,0 +1,126 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "SCAN\-BUILD" "1" "December 2010" "" "" +. +.SH "NAME" +\fBscan\-build\fR +. +.P +scan\-build(1) \-\- An utility for running the clang(1) analyzer from the command line +. +.SH "SYNOPSIS" +\fBscan\-build\fR \fIoptions\fR \fIbuild command\fR [build options] +. +.SH "DESCRIPTION" +\fBscan\-build\fR is a command line utility that enables a user to run the clang static analyzer over their codebase as part of performing a regular build (from the command line)\. +. +.SH "OPTIONS" +. +.TP +\fB\-analyze\-headers\fR +Also analyze functions in #included files\. +. +.TP +\fB\-o\fR +Target directory for HTML report files\. Subdirectories will be created as needed to represent separate "runs" of the analyzer\. If this option is not specified, a directory is created in /tmp (TMPDIR on Mac OS X) to store the reports\. +. +.TP +\fB\-h\fR, \fB\-\-help\fR +Display the help message\. +. +.TP +\fB\-k\fR +Add a "keep on going" option to the specified build command\. +. +.TP +\fB\-\-keep\-going\fR +This option currently supports make and xcodebuild\. This is a convenience option; one can specify this behavior directly using build options\. +. +.TP +\fB\-\-html\-title\fR [title] +Specify the title used on generated HTML pages\. +. +.TP +\fB\-\-html\-title=\fR[title] +If not specified, a default title will be used\. +. +.TP +\fB\-plist\fR +By default the output of scan\-build is a set of HTML files\. This option outputs the results as a set of \.plist files\. +. +.TP +\fB\-\-status\-bugs\fR +By default, the exit status of scan\-build is the same as the executed build command\. Specifying this option causes the exit status of scan\-build to be 1 if it found potential bugs and 0 otherwise\. +. +.TP +\fB\-\-use\-cc\fR [compiler path] +By default, scan\-build uses \'gcc\' to compile and link +. +.TP +\fB\-\-use\-cc=\fR[compiler path] +your C and Objective\-C code\. Use this option to specify an alternate compiler\. +. +.TP +\fB\-\-use\-c++\fR [compiler path] +By default, scan\-build uses \'g++\' to compile and link +. +.TP +\fB\-\-use\-c++=\fR[compiler path] +your C++ and Objective\-C++ code\. Use this option to specify an alternate compiler\. +. +.TP +\fB\-v\fR +Verbose output from scan\-build and the analyzer\. A second and third \'\-v\' increases verbosity\. +. +.TP +\fB\-V\fR +View analysis results in a web browser when the build +. +.TP +\fB\-\-view\fR +completes\. +. +.SH "ADVANCED OPTIONS:" +. +.TP +\fB\-constraints\fR [model] +Specify the contraint engine used by the analyzer\. By default the \'range\' model is used\. Specifying \'basic\' uses a simpler, less powerful constraint model used by checker\-0\.160 and earlier\. +. +.TP +\fB\-store\fR [model] +Specify the store model used by the analyzer\. By default, the \'region\' store model is used\. \'region\' specifies a field sensitive store model\. Users can also specify \'basic\', which is far less precise but can more quickly analyze code\. \'basic\' was the default store model for checker\-0\.221 and earlier\. +. +.TP +\fB\-no\-failure\-reports\fR +Do not create a \'failures\' subdirectory that includes analyzer crash reports and preprocessed source files\. +. +.SH "EXAMPLES" +Basic usage of scan\-build is designed to be simple: just place the word "scan\-build" in front of your build command: +. +.P +$ scan\-build make +. +.P +$ scan\-build xcodebuild +. +.P +In the first case scan\-build analyzes the code of a project built with make and in the second case scan\-build analyzes a project built using xcodebuild\. +. +.P +It is also possible to use scan\-build to analyze specific files: +. +.P +$ scan\-build gcc \-c t1\.c t2\.c +. +.P +This example causes the files t1\.c and t2\.c to be analyzed\. +. +.SH "AUTHORS" +Maintained by the Clang / LLVM Team \fIhttp://clang\.llvm\.org\fR\. +. +.P +This manual page was written by Ermenegildo Fiorito \fIfiorito\.g@gmail\.com\fR for the Debian Project\. +. +.SH "SEE ALSO" +clang(1) scan\-view(1) \fIhttp://clang\-analyzer\.llvm\.org\fR diff --git a/debian/man/scan-view.1 b/debian/man/scan-view.1 new file mode 100644 index 00000000..30a9a750 --- /dev/null +++ b/debian/man/scan-view.1 @@ -0,0 +1,55 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "SCAN\-VIEW" "1" "December 2010" "" "" +. +.SH "NAME" +\fBscan\-view\fR +. +.P +scan\-view(1) \-\- The clang(1) static analyzer results viewer\. +. +.SH "SYNOPSIS" +\fBscan\-view\fR \fIoptions\fR \fIresults directory\fR +. +.SH "DESCRIPTION" +\fBscan\-view\fR a companion comannd line utility to scan\-build(1), scan\-view is used to view analysis results generated by scan\-build(1)\. There is an option that one can pass to scan\-build to cause scan\-view to run as soon as it the analysis of a build completes +. +.SH "OPTIONS" +. +.TP +\fB\-h\fR, \fB\-\-help\fR +show the help message and exit\. +. +.TP +\fB\-\-host=\fRHOST +Host interface to listen on\. (default=127\.0\.0\.1) +. +.TP +\fB\-\-port=\fRPORT +Port to listen on\. (default=8181) +. +.TP +\fB\-\-debug\fR +Print additional debugging information\. +. +.TP +\fB\-\-auto\-reload\fR +Automatically update module for each request\. +. +.TP +\fB\-\-no\-browser\fR +Don\'t open a webbrowser on startup\. +. +.TP +\fB\-\-allow\-all\-hosts\fR +Allow connections from any host (access restricted to "127\.0\.0\.1" by default) +. +.SH "AUTHORS" +Maintained by the Clang / LLVM Team \fIhttp://clang\.llvm\.org\fR\. +. +.P +This manual page was written by Ermenegildo Fiorito \fIfiorito\.g@gmail\.com\fR for the Debian Project\. +. +.SH "SEE ALSO" +clang(1) scan\-build(1) \fIhttp://clang\-analyzer\.llvm\.org\fR diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh new file mode 100755 index 00000000..a36ae0da --- /dev/null +++ b/debian/orig-tar.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# called by uscan with '--upstream-version' +DIR=clang-*.src +DIRIN=clang-$2 +TAR=../clang_$2.orig.tar.bz2 + +# clean up the upstream tarball +tar zxvf $3 +mkdir -p $DIRIN/tools/clang +mv $DIR/* $DIRIN/tools/clang/ +tar -c -j -f $TAR $DIRIN +rm -rf $DIRIN $DIR + +# move to directory 'tarballs' +if [ -r .svn/deb-layout ]; then + . .svn/deb-layout + mv $TAR $origDir + echo "moved $TAR to $origDir" +fi + +exit 0 + diff --git a/debian/patches/18-soname.patch b/debian/patches/18-soname.patch new file mode 100644 index 00000000..c8d361fb --- /dev/null +++ b/debian/patches/18-soname.patch @@ -0,0 +1,21 @@ +Index: clang-3.2~rc1/tools/clang/tools/libclang/Makefile +=================================================================== +--- clang-3.2~rc1.orig/tools/clang/tools/libclang/Makefile 2012-11-13 21:13:57.000000000 +0100 ++++ clang-3.2~rc1/tools/clang/tools/libclang/Makefile 2012-11-17 15:42:01.000000000 +0100 +@@ -14,6 +14,7 @@ + + LINK_LIBS_IN_SHARED = 1 + SHARED_LIBRARY = 1 ++SONAME_MAJOR=1 + + include $(CLANG_LEVEL)/../../Makefile.config + LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc +@@ -27,7 +28,7 @@ + + # Add soname to the library. + ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU)) +- LDFLAGS += -Wl,-soname,lib$(LIBRARYNAME)$(SHLIBEXT) ++ LDFLAGS += -Wl,-soname,lib$(LIBRARYNAME)$(SHLIBEXT).$(SONAME_MAJOR) + endif + + ##===----------------------------------------------------------------------===## diff --git a/debian/patches/19-clang_debian_version.patch b/debian/patches/19-clang_debian_version.patch new file mode 100644 index 00000000..cce52b86 --- /dev/null +++ b/debian/patches/19-clang_debian_version.patch @@ -0,0 +1,22 @@ +Index: clang-3.2~rc1/tools/clang/lib/Basic/Version.cpp +=================================================================== +--- clang-3.2~rc1.orig/tools/clang/lib/Basic/Version.cpp 2012-11-13 21:13:57.000000000 +0100 ++++ clang-3.2~rc1/tools/clang/lib/Basic/Version.cpp 2012-11-17 15:43:03.000000000 +0100 +@@ -15,6 +15,7 @@ + #include "clang/Basic/LLVM.h" + #include "llvm/Support/raw_ostream.h" + #include "llvm/Config/config.h" ++#include "clang/Debian/debian_path.h" + #include + #include + +@@ -117,7 +118,8 @@ + #ifdef CLANG_VENDOR + OS << CLANG_VENDOR; + #endif +- OS << "clang version " CLANG_VERSION_STRING " " ++ OS << "clang version " CLANG_VERSION_STRING "-" DEB_PATCHSETVERSION " " ++ + << getClangFullRepositoryVersion(); + + // If vendor supplied, include the base LLVM version as well. diff --git a/debian/patches/20-vendor.patch b/debian/patches/20-vendor.patch new file mode 100644 index 00000000..030537c5 --- /dev/null +++ b/debian/patches/20-vendor.patch @@ -0,0 +1,15 @@ +Index: clang-3.2~rc1/tools/clang/Makefile +=================================================================== +--- clang-3.2~rc1.orig/tools/clang/Makefile 2012-11-13 21:13:57.000000000 +0100 ++++ clang-3.2~rc1/tools/clang/Makefile 2012-11-17 15:43:15.000000000 +0100 +@@ -47,9 +47,7 @@ + + # Set common Clang build flags. + CPP.Flags += -I$(PROJ_SRC_DIR)/$(CLANG_LEVEL)/include -I$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include +-ifdef CLANG_VENDOR +-CPP.Flags += -DCLANG_VENDOR='"$(CLANG_VENDOR) "' +-endif ++CPP.Flags += -DCLANG_VENDOR='"Debian "' + ifdef CLANG_REPOSITORY_STRING + CPP.Flags += -DCLANG_REPOSITORY_STRING='"$(CLANG_REPOSITORY_STRING)"' + endif diff --git a/debian/patches/21-searchPathHeaders.diff b/debian/patches/21-searchPathHeaders.diff new file mode 100644 index 00000000..b8969cf8 --- /dev/null +++ b/debian/patches/21-searchPathHeaders.diff @@ -0,0 +1,16 @@ +Index: clang-3.2~rc1/tools/clang/lib/Driver/ToolChains.cpp +=================================================================== +--- clang-3.2~rc1.orig/tools/clang/lib/Driver/ToolChains.cpp 2012-11-13 21:13:57.000000000 +0100 ++++ clang-3.2~rc1/tools/clang/lib/Driver/ToolChains.cpp 2012-11-17 15:43:18.000000000 +0100 +@@ -2174,6 +2174,11 @@ + addSystemInclude(DriverArgs, CC1Args, P.str()); + } + ++ // Under Debian, clang headers are installed into ++ // '/usr/include/clang/VERSION/include/' ++ addSystemInclude(DriverArgs, CC1Args, "/usr/include/clang/" + std::string(CLANG_VERSION_STRING) + "/include/"); ++ ++ + if (DriverArgs.hasArg(options::OPT_nostdlibinc)) + return; + diff --git a/debian/patches/23-strlcpy_strlcat_warning_removed.diff b/debian/patches/23-strlcpy_strlcat_warning_removed.diff new file mode 100644 index 00000000..a3a5b8f6 --- /dev/null +++ b/debian/patches/23-strlcpy_strlcat_warning_removed.diff @@ -0,0 +1,80 @@ +Index: clang-3.2~rc1/tools/clang/include/clang/Basic/Builtins.def +=================================================================== +--- clang-3.2~rc1.orig/tools/clang/include/clang/Basic/Builtins.def 2012-11-13 21:13:57.000000000 +0100 ++++ clang-3.2~rc1/tools/clang/include/clang/Basic/Builtins.def 2012-11-17 15:43:20.000000000 +0100 +@@ -461,8 +461,8 @@ + BUILTIN(__builtin___stpcpy_chk, "c*c*cC*z", "nF") + BUILTIN(__builtin___strcat_chk, "c*c*cC*z", "nF") + BUILTIN(__builtin___strcpy_chk, "c*c*cC*z", "nF") +-BUILTIN(__builtin___strlcat_chk, "c*c*cC*zz", "nF") +-BUILTIN(__builtin___strlcpy_chk, "c*c*cC*zz", "nF") ++//BUILTIN(__builtin___strlcat_chk, "c*c*cC*zz", "nF") ++//BUILTIN(__builtin___strlcpy_chk, "c*c*cC*zz", "nF") + 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") +@@ -755,8 +755,8 @@ + LIBBUILTIN(_longjmp, "vJi", "fr", "setjmp.h", ALL_LANGUAGES) + LIBBUILTIN(siglongjmp, "vSJi", "fr", "setjmp.h", ALL_LANGUAGES) + // non-standard but very common +-LIBBUILTIN(strlcpy, "zc*cC*z", "f", "string.h", ALL_LANGUAGES) +-LIBBUILTIN(strlcat, "zc*cC*z", "f", "string.h", ALL_LANGUAGES) ++//LIBBUILTIN(strlcpy, "zc*cC*z", "f", "string.h", ALL_LANGUAGES) ++//LIBBUILTIN(strlcat, "zc*cC*z", "f", "string.h", ALL_LANGUAGES) + // id objc_msgSend(id, SEL, ...) + LIBBUILTIN(objc_msgSend, "GGH.", "f", "objc/message.h", OBJC_LANG) + +Index: clang-3.2~rc1/tools/clang/lib/Sema/SemaChecking.cpp +=================================================================== +--- clang-3.2~rc1.orig/tools/clang/lib/Sema/SemaChecking.cpp 2012-11-13 21:13:57.000000000 +0100 ++++ clang-3.2~rc1/tools/clang/lib/Sema/SemaChecking.cpp 2012-11-17 15:43:20.000000000 +0100 +@@ -576,9 +576,10 @@ + return false; + + // Handle memory setting and copying functions. +- if (CMId == Builtin::BIstrlcpy || CMId == Builtin::BIstrlcat) +- CheckStrlcpycatArguments(TheCall, FnInfo); +- else if (CMId == Builtin::BIstrncat) ++// if (CMId == Builtin::BIstrlcpy || CMId == Builtin::BIstrlcat) ++// CheckStrlcpycatArguments(TheCall, FnInfo); ++// else ++ if (CMId == Builtin::BIstrncat) + CheckStrncatArguments(TheCall, FnInfo); + else + CheckMemaccessArguments(TheCall, CMId, FnInfo); +Index: clang-3.2~rc1/tools/clang/lib/AST/Decl.cpp +=================================================================== +--- clang-3.2~rc1.orig/tools/clang/lib/AST/Decl.cpp 2012-11-13 21:13:57.000000000 +0100 ++++ clang-3.2~rc1/tools/clang/lib/AST/Decl.cpp 2012-11-17 15:43:20.000000000 +0100 +@@ -2394,10 +2394,10 @@ + case Builtin::BImemmove: + return Builtin::BImemmove; + +- case Builtin::BIstrlcpy: +- return Builtin::BIstrlcpy; +- case Builtin::BIstrlcat: +- return Builtin::BIstrlcat; ++// case Builtin::BIstrlcpy: ++// return Builtin::BIstrlcpy; ++// case Builtin::BIstrlcat: ++// return Builtin::BIstrlcat; + + case Builtin::BI__builtin_memcmp: + case Builtin::BImemcmp: +Index: clang-3.2~rc1/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp +=================================================================== +--- clang-3.2~rc1.orig/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp 2012-11-13 21:13:57.000000000 +0100 ++++ clang-3.2~rc1/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp 2012-11-17 15:43:20.000000000 +0100 +@@ -237,9 +237,9 @@ + case Builtin::BIstrncpy: + case Builtin::BIstrncat: + return TaintPropagationRule(1, 2, 0, true); +- case Builtin::BIstrlcpy: +- case Builtin::BIstrlcat: +- return TaintPropagationRule(1, 2, 0, false); ++// case Builtin::BIstrlcpy: ++// case Builtin::BIstrlcat: ++// return TaintPropagationRule(1, 2, 0, false); + case Builtin::BIstrndup: + return TaintPropagationRule(0, 1, ReturnValueIndex); + diff --git a/debian/patches/26-disable_SplitsOnSpaces.diff b/debian/patches/26-disable_SplitsOnSpaces.diff new file mode 100644 index 00000000..a4389bf1 --- /dev/null +++ b/debian/patches/26-disable_SplitsOnSpaces.diff @@ -0,0 +1,24 @@ +Index: clang-3.2~rc1/tools/clang/unittests/Tooling/CompilationDatabaseTest.cpp +=================================================================== +--- clang-3.2~rc1.orig/tools/clang/unittests/Tooling/CompilationDatabaseTest.cpp 2012-11-13 21:13:57.000000000 +0100 ++++ clang-3.2~rc1/tools/clang/unittests/Tooling/CompilationDatabaseTest.cpp 2012-11-17 15:43:28.000000000 +0100 +@@ -262,19 +262,6 @@ + return FoundCommand.CommandLine; + } + +-TEST(unescapeJsonCommandLine, ReturnsEmptyArrayOnEmptyString) { +- std::vector Result = unescapeJsonCommandLine(""); +- EXPECT_TRUE(Result.empty()); +-} +- +-TEST(unescapeJsonCommandLine, SplitsOnSpaces) { +- std::vector Result = unescapeJsonCommandLine("a b c"); +- ASSERT_EQ(3ul, Result.size()); +- EXPECT_EQ("a", Result[0]); +- EXPECT_EQ("b", Result[1]); +- EXPECT_EQ("c", Result[2]); +-} +- + TEST(unescapeJsonCommandLine, MungesMultipleSpaces) { + std::vector Result = unescapeJsonCommandLine(" a b "); + ASSERT_EQ(2ul, Result.size()); diff --git a/debian/patches/26-set-correct-float-abi.diff b/debian/patches/26-set-correct-float-abi.diff new file mode 100644 index 00000000..96d0196a --- /dev/null +++ b/debian/patches/26-set-correct-float-abi.diff @@ -0,0 +1,33 @@ +Description: set correct float abi settings for armel and armhf + debian armel supports systems that don't have a fpu so should use a "float abi" + setting of soft by default. + + Debian armhf needs a float abi setting of "hard" +Author: Peter Michael Green + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +Index: clang-3.2~rc1/tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- clang-3.2~rc1.orig/tools/clang/lib/Driver/Tools.cpp 2012-11-13 21:13:57.000000000 +0100 ++++ clang-3.2~rc1/tools/clang/lib/Driver/Tools.cpp 2012-11-19 17:50:05.000000000 +0100 +@@ -671,7 +671,7 @@ + FloatABI = "hard"; + break; + case llvm::Triple::GNUEABI: +- FloatABI = "softfp"; ++ FloatABI = "soft"; + break; + case llvm::Triple::EABI: + // EABI is always AAPCS, and if it was not marked 'hard', it's softfp diff --git a/debian/patches/27-fix_clang_stdint.diff b/debian/patches/27-fix_clang_stdint.diff new file mode 100644 index 00000000..5bb607fb --- /dev/null +++ b/debian/patches/27-fix_clang_stdint.diff @@ -0,0 +1,27 @@ +--- a/tools/clang/lib/Headers/stdint.h 2011-04-30 23:02:59.000000000 +0400 ++++ b/tools/clang/lib/Headers/stdint.h 2012-08-03 12:54:22.851687999 +0400 +@@ -22,8 +22,6 @@ + * + \*===----------------------------------------------------------------------===*/ + +-#ifndef __CLANG_STDINT_H +-#define __CLANG_STDINT_H + + /* If we're hosted, fall back to the system's stdint.h, which might have + * additional definitions. +@@ -32,6 +30,8 @@ + defined(__has_include_next) && __has_include_next() + # include_next + #else ++#ifndef __CLANG_STDINT_H ++#define __CLANG_STDINT_H + + /* C99 7.18.1.1 Exact-width integer types. + * C99 7.18.1.2 Minimum-width integer types. +@@ -657,5 +657,5 @@ + #define INTMAX_C(v) __INTN_C(__INTMAX_WIDTH__, v) + #define UINTMAX_C(v) __UINTN_C(__INTMAX_WIDTH__, v) + +-#endif /* __STDC_HOSTED__ */ + #endif /* __CLANG_STDINT_H */ ++#endif /* __STDC_HOSTED__ */ diff --git a/debian/patches/28-gcc-4.7-paths.diff b/debian/patches/28-gcc-4.7-paths.diff new file mode 100644 index 00000000..496d1508 --- /dev/null +++ b/debian/patches/28-gcc-4.7-paths.diff @@ -0,0 +1,44 @@ +Index: clang-3.2/tools/clang/lib/Driver/ToolChains.cpp +=================================================================== +--- clang-3.2.orig/tools/clang/lib/Driver/ToolChains.cpp 2013-01-06 09:30:46.047046507 +0100 ++++ clang-3.2/tools/clang/lib/Driver/ToolChains.cpp 2013-01-06 11:22:09.982805979 +0100 +@@ -2124,7 +2124,7 @@ + const llvm::Triple &GCCTriple = GCCInstallation.getTriple(); + const std::string &LibPath = GCCInstallation.getParentLibPath(); + +- if (IsAndroid && isMipsR2Arch(Triple.getArch(), Args)) ++ if (IsAndroid && isMipsR2Arch(Triple.getArch(), Args)) + addPathIfExists(GCCInstallation.getInstallPath() + + GCCInstallation.getMultiarchSuffix() + + "/mips-r2", +@@ -2376,9 +2376,16 @@ + StringRef InstallDir = GCCInstallation.getInstallPath(); + StringRef Version = GCCInstallation.getVersion().Text; + StringRef TripleStr = GCCInstallation.getTriple().str(); ++ llvm::Triple MultiarchTriple ++ = GCCInstallation.getTriple().isArch32Bit() ? GCCInstallation.getTriple().get64BitArchVariant() ++ : GCCInstallation.getTriple().get32BitArchVariant(); + + const std::string IncludePathCandidates[] = { + LibDir.str() + "/../include/c++/" + Version.str(), ++ // Once more, Debian headers locations changed (since gcc version 4.7.2-5) ++ // See Debian bug tracker #693240 ++ LibDir.str() + "/../include/"+ TripleStr.str() +"/c++/" + Version.str(), ++ LibDir.str() + "/../include/"+ MultiarchTriple.str() +"/c++/" + Version.str(), + // Gentoo is weird and places its headers inside the GCC install, so if the + // first attempt to find the headers fails, try this pattern. + InstallDir.str() + "/include/g++-v4", +@@ -2390,10 +2397,10 @@ + }; + + for (unsigned i = 0; i < llvm::array_lengthof(IncludePathCandidates); ++i) { +- if (addLibStdCXXIncludePaths(IncludePathCandidates[i], (TripleStr + ++ addLibStdCXXIncludePaths(IncludePathCandidates[i], (TripleStr + + GCCInstallation.getMultiarchSuffix()), +- DriverArgs, CC1Args)) +- break; ++ DriverArgs, CC1Args); ++ + } + } + diff --git a/debian/patches/29-hurd.diff b/debian/patches/29-hurd.diff new file mode 100644 index 00000000..7adb5a2b --- /dev/null +++ b/debian/patches/29-hurd.diff @@ -0,0 +1,32 @@ +Index: clang-3.2~rc3/tools/clang/lib/Lex/HeaderSearch.cpp +=================================================================== +--- clang-3.2~rc3.orig/tools/clang/lib/Lex/HeaderSearch.cpp 2012-11-06 20:39:40.000000000 +0100 ++++ clang-3.2~rc3/tools/clang/lib/Lex/HeaderSearch.cpp 2012-12-11 18:49:49.000000000 +0100 +@@ -25,6 +25,11 @@ + #include + using namespace clang; + ++// For GNU Hurd ++#if defined(__GNU__) && !defined(PATH_MAX) ++# define PATH_MAX 4096 ++#endif ++ + const IdentifierInfo * + HeaderFileInfo::getControllingMacro(ExternalIdentifierLookup *External) { + if (ControllingMacro) +Index: clang-3.2~rc3/tools/clang/lib/Lex/ModuleMap.cpp +=================================================================== +--- clang-3.2~rc3.orig/tools/clang/lib/Lex/ModuleMap.cpp 2012-11-06 20:41:11.000000000 +0100 ++++ clang-3.2~rc3/tools/clang/lib/Lex/ModuleMap.cpp 2012-12-11 18:50:00.000000000 +0100 +@@ -30,6 +30,11 @@ + #include + using namespace clang; + ++// For GNU Hurd ++#if defined(__GNU__) && !defined(PATH_MAX) ++# define PATH_MAX 4096 ++#endif ++ + Module::ExportDecl + ModuleMap::resolveExport(Module *Mod, + const Module::UnresolvedExportDecl &Unresolved, diff --git a/debian/patches/30-kfreebsd.diff b/debian/patches/30-kfreebsd.diff new file mode 100644 index 00000000..4eed2289 --- /dev/null +++ b/debian/patches/30-kfreebsd.diff @@ -0,0 +1,31 @@ +Index: clang-3.2/tools/clang/lib/Driver/ToolChains.h +=================================================================== +--- clang-3.2.orig/tools/clang/lib/Driver/ToolChains.h 2012-11-21 09:33:40.000000000 +0100 ++++ clang-3.2/tools/clang/lib/Driver/ToolChains.h 2012-12-25 11:47:02.000000000 +0100 +@@ -131,6 +131,8 @@ + virtual bool IsUnwindTablesDefault() const; + virtual bool isPICDefault() const; + virtual bool isPICDefaultForced() const; ++ virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs, ++ ArgStringList &CC1Args) const; + + protected: + /// \name ToolChain Implementation Helper Functions +Index: clang-3.2/tools/clang/lib/Driver/ToolChains.cpp +=================================================================== +--- clang-3.2.orig/tools/clang/lib/Driver/ToolChains.cpp 2012-12-25 11:45:53.000000000 +0100 ++++ clang-3.2/tools/clang/lib/Driver/ToolChains.cpp 2012-12-25 11:46:29.000000000 +0100 +@@ -943,6 +943,13 @@ + return GoodVersion; + } + ++void Generic_GCC::AddClangSystemIncludeArgs(const ArgList &DriverArgs, ++ ArgStringList &CC1Args) const { ++ // Under Debian, clang headers are installed into ++ // '/usr/include/clang/VERSION/include/' ++ addSystemInclude(DriverArgs, CC1Args, "/usr/include/clang/" + std::string(CLANG_VERSION_STRING) + "/include/"); ++} ++ + /// \brief Less-than for GCCVersion, implementing a Strict Weak Ordering. + bool Generic_GCC::GCCVersion::operator<(const GCCVersion &RHS) const { + if (Major < RHS.Major) return true; if (Major > RHS.Major) return false; diff --git a/debian/patches/profile_rt.diff b/debian/patches/profile_rt.diff new file mode 100644 index 00000000..3d67fc2c --- /dev/null +++ b/debian/patches/profile_rt.diff @@ -0,0 +1,27 @@ +Index: clang-3.2~rc1/tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- clang-3.2~rc1.orig/tools/clang/lib/Driver/Tools.cpp 2012-11-27 12:21:42.000000000 +0100 ++++ clang-3.2~rc1/tools/clang/lib/Driver/Tools.cpp 2012-11-27 18:22:13.000000000 +0100 +@@ -32,10 +32,13 @@ + #include "llvm/Support/Process.h" + #include "llvm/Support/ErrorHandling.h" + ++#include "llvm/Config/config.h" ++ + #include "InputInfo.h" + #include "SanitizerArgs.h" + #include "ToolChains.h" + ++ + using namespace clang::driver; + using namespace clang::driver::tools; + using namespace clang; +@@ -218,7 +221,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 = +- std::string(TC.getDriver().Dir) + "/../lib/libprofile_rt.a"; ++ std::string(TC.getDriver().Dir) + "/../lib/llvm-"+PACKAGE_VERSION+"/lib/libprofile_rt.a"; + + CmdArgs.push_back(Args.MakeArgString(ProfileRT)); + } diff --git a/debian/patches/r167751.diff b/debian/patches/r167751.diff new file mode 100644 index 00000000..19461348 --- /dev/null +++ b/debian/patches/r167751.diff @@ -0,0 +1,13 @@ +Index: source/Symbol/ClangASTContext.cpp +=================================================================== +--- source/Symbol/ClangASTContext.cpp (revision 167750) ++++ source/Symbol/ClangASTContext.cpp (revision 167751) +@@ -257,7 +257,7 @@ + } + + const LangStandard &Std = LangStandard::getLangStandardForKind(LangStd); +- Opts.BCPLComment = Std.hasBCPLComments(); ++ Opts.LineComment = Std.hasLineComments(); + Opts.C99 = Std.isC99(); + Opts.CPlusPlus = Std.isCPlusPlus(); + Opts.CPlusPlus0x = Std.isCPlusPlus0x(); diff --git a/debian/patches/r168827.diff b/debian/patches/r168827.diff new file mode 100644 index 00000000..3eca8c93 --- /dev/null +++ b/debian/patches/r168827.diff @@ -0,0 +1,13 @@ +Index: include/lldb/Target/StopInfo.h +=================================================================== +--- include/lldb/Target/StopInfo.h (revision 168826) ++++ include/lldb/Target/StopInfo.h (revision 168827) +@@ -23,7 +23,7 @@ + + class StopInfo + { +- friend Process::ProcessEventData; ++ friend class Process::ProcessEventData; + friend class ThreadPlanBase; + + public: diff --git a/debian/patches/r168835.diff b/debian/patches/r168835.diff new file mode 100644 index 00000000..f6c7ae77 --- /dev/null +++ b/debian/patches/r168835.diff @@ -0,0 +1,27 @@ +Index: source/Core/cxa_demangle.cpp +=================================================================== +--- source/Core/cxa_demangle.cpp (revision 168834) ++++ source/Core/cxa_demangle.cpp (revision 168835) +@@ -3932,11 +3932,11 @@ + } + }; + +-class __lambda ++class __lambda_node + : public __node + { + public: +- __lambda(__node* params, const char *number, size_t number_size) ++ __lambda_node(__node* params, const char *number, size_t number_size) + { + __right_ = params; + __name_ = number; +@@ -7009,7 +7009,7 @@ + return first; + + if (type == 'l') +- __make<__lambda>(__root_, number_start, static_cast(number_end - number_start)); ++ __make<__lambda_node>(__root_, number_start, static_cast(number_end - number_start)); + else + __make<__unnamed>(number_start, static_cast(number_end - number_start)); + diff --git a/debian/patches/r168901.diff b/debian/patches/r168901.diff new file mode 100644 index 00000000..edcb822b --- /dev/null +++ b/debian/patches/r168901.diff @@ -0,0 +1,26 @@ +Index: scripts/Python/python-wrapper.swig +=================================================================== +--- scripts/Python/python-wrapper.swig (revision 168900) ++++ scripts/Python/python-wrapper.swig (revision 168901) +@@ -964,6 +964,10 @@ + #include "lldb/API/SBInputReader.h" + #include "lldb/API/SBDebugger.h" + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + size_t + LLDBSwigPythonCallSBInputReaderCallback(void *baton, + lldb::SBInputReader *reader, +@@ -972,6 +976,10 @@ + size_t bytes_len); + + void LLDBSwigPythonCallPythonLogOutputCallback(const char *str, void *baton); ++ ++#ifdef __cplusplus ++} ++#endif + %} + + %wrapper %{ diff --git a/debian/patches/r169185.diff b/debian/patches/r169185.diff new file mode 100644 index 00000000..358e83b6 --- /dev/null +++ b/debian/patches/r169185.diff @@ -0,0 +1,52 @@ +Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp +=================================================================== +--- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp (revision 169184) ++++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp (revision 169185) +@@ -344,7 +344,7 @@ + + while (*name_cursor != '\0') + { +- char *colon_loc = strchr(name_cursor, ':'); ++ const char *colon_loc = strchr(name_cursor, ':'); + if (!colon_loc) + { + selector_components.push_back(&ast_ctx.Idents.get(llvm::StringRef(name_cursor))); +Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +=================================================================== +--- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (revision 169184) ++++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (revision 169185) +@@ -727,7 +727,8 @@ + lldb::addr_t load_addr) : + m_process(process), + m_end_iterator(*this, -1ll), +- m_load_addr(load_addr) ++ m_load_addr(load_addr), ++ m_classheader_size(sizeof(int32_t) * 2) + { + lldb::addr_t cursor = load_addr; + +@@ -946,7 +947,7 @@ + lldb_private::Process *m_process; + const_iterator m_end_iterator; + lldb::addr_t m_load_addr; +- const size_t m_classheader_size = (sizeof(int32_t) * 2); ++ const size_t m_classheader_size; + }; + + class ClassDescriptorV2 : public ObjCLanguageRuntime::ClassDescriptor +Index: source/Interpreter/CommandObject.cpp +=================================================================== +--- source/Interpreter/CommandObject.cpp (revision 169184) ++++ source/Interpreter/CommandObject.cpp (revision 169185) +@@ -752,9 +752,9 @@ + StreamString sstr; + sstr << "One of the following languages:\n"; + +- for (LanguageType l = eLanguageTypeUnknown; l < eNumLanguageTypes; ++l) ++ for (unsigned int l = eLanguageTypeUnknown; l < eNumLanguageTypes; ++l) + { +- sstr << " " << LanguageRuntime::GetNameForLanguageType(l) << "\n"; ++ sstr << " " << LanguageRuntime::GetNameForLanguageType(static_cast(l)) << "\n"; + } + + sstr.Flush(); diff --git a/debian/patches/r169767.diff b/debian/patches/r169767.diff new file mode 100644 index 00000000..a3e1e712 --- /dev/null +++ b/debian/patches/r169767.diff @@ -0,0 +1,55 @@ +Index: source/Utility/Makefile +=================================================================== +--- source/Utility/Makefile (revision 169766) ++++ source/Utility/Makefile (revision 169767) +@@ -12,4 +12,11 @@ + BUILD_ARCHIVE = 1 + NO_PEDANTIC = 1 + ++# Enable RTTI on GCC builds because liblldbCore.a requires RTTI. ++# See source/Core/Makefile for details. ++ifeq (g++,$(shell basename $(CXX))) ++ REQUIRES_RTTI = 1 ++endif ++ ++ + include $(LLDB_LEVEL)/Makefile +Index: source/Core/Makefile +=================================================================== +--- source/Core/Makefile (revision 169766) ++++ source/Core/Makefile (revision 169767) +@@ -11,4 +11,15 @@ + LIBRARYNAME := lldbCore + BUILD_ARCHIVE = 1 + ++# Enable RTTI on GCC builds because one source file in this directory ++# (cxa_demangle.cpp) uses dynamic_cast<> and GCC (at least 4.6 and 4.7) ++# complain if we try to compile it with -fno-rtti. This is somewhat of a ++# kludge because it forces us to enable RTTI in liblldbUtility.a and also ++# link in additional clang static libraries to resolve vtable references, ++# but actually has negligible impact on (shard object) file size. ++$(info shell basename CXX is $(shell basename $(CXX))) ++ifeq (g++,$(shell basename $(CXX))) ++ REQUIRES_RTTI = 1 ++endif ++ + include $(LLDB_LEVEL)/Makefile +Index: lib/Makefile +=================================================================== +--- lib/Makefile (revision 169766) ++++ lib/Makefile (revision 169767) +@@ -67,6 +67,14 @@ + lldbPluginPlatformLinux.a \ + lldbPluginPlatformFreeBSD.a + ++# Because GCC requires RTTI enabled for lldbCore (see source/Core/Makefile) it is ++# necessary to also link the clang rewriter libraries so vtable references can ++# be resolved correctly, if we are building with GCC. ++ifeq (g++,$(shell basename $(CXX))) ++ USEDLIBS += clangRewriteCore.a \ ++ clangRewriteFrontend.a ++endif ++ + include $(LLDB_LEVEL)/../../Makefile.config + + LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \ diff --git a/debian/patches/r171558.diff b/debian/patches/r171558.diff new file mode 100644 index 00000000..6f0d0bae --- /dev/null +++ b/debian/patches/r171558.diff @@ -0,0 +1,60 @@ +Index: test/dotest.py +=================================================================== +--- test/dotest.py (revision 171557) ++++ test/dotest.py (revision 171558) +@@ -849,6 +849,8 @@ + lines = lldb_dash_p_result.splitlines() + if len(lines) == 1 and os.path.isfile(os.path.join(lines[0], init_in_python_dir)): + lldbPath = lines[0] ++ if "linux" in sys.platform: ++ os.environ['LLDB_BUILD_DIR'] = os.path.join(lldbPath, 'lldb') + + if not lldbPath: + dbgPath = os.path.join(base, *(xcode3_build_dir + dbg + python_resource_dir)) +Index: source/Host/common/Host.cpp +=================================================================== +--- source/Host/common/Host.cpp (revision 171557) ++++ source/Host/common/Host.cpp (revision 171558) +@@ -26,6 +26,7 @@ + + #include "llvm/Support/Host.h" + #include "llvm/Support/MachO.h" ++#include "llvm/ADT/Twine.h" + + #include + #include +@@ -997,13 +998,6 @@ + + case ePathTypePythonDir: + { +- // TODO: Anyone know how we can determine this for linux? Other systems? +- // For linux and FreeBSD we are currently assuming the +- // location of the lldb binary that contains this function is +- // the directory that will contain a python directory which +- // has our lldb module. This is how files get placed when +- // compiling with Makefiles. +- + static ConstString g_lldb_python_dir; + if (!g_lldb_python_dir) + { +@@ -1022,9 +1016,19 @@ + ::strncpy (framework_pos, "/Resources/Python", PATH_MAX - (framework_pos - raw_path)); + } + #else ++ llvm::Twine python_version_dir; ++ python_version_dir = "/python" ++ + llvm::Twine(PY_MAJOR_VERSION) ++ + "." ++ + llvm::Twine(PY_MINOR_VERSION) ++ + "/site-packages"; ++ + // We may get our string truncated. Should we protect + // this with an assert? +- ::strncat(raw_path, "/python", sizeof(raw_path) - strlen(raw_path) - 1); ++ ++ ::strncat(raw_path, python_version_dir.str().c_str(), ++ sizeof(raw_path) - strlen(raw_path) - 1); ++ + #endif + FileSpec::Resolve (raw_path, resolved_path, sizeof(resolved_path)); + g_lldb_python_dir.SetCString(resolved_path); diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..69c3ed9d --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,13 @@ +18-soname.patch +19-clang_debian_version.patch +20-vendor.patch +21-searchPathHeaders.diff +23-strlcpy_strlcat_warning_removed.diff +26-disable_SplitsOnSpaces.diff +27-fix_clang_stdint.diff +26-set-correct-float-abi.diff +profile_rt.diff +28-gcc-4.7-paths.diff +29-hurd.diff +30-kfreebsd.diff + diff --git a/debian/prepare-new-release.sh b/debian/prepare-new-release.sh new file mode 100644 index 00000000..ab6e9842 --- /dev/null +++ b/debian/prepare-new-release.sh @@ -0,0 +1,17 @@ +#!/bin/sh +ORIG_VERSION=3.1 +TARGET_VERSION=3.2 +ORIG_VERSION_2=3_1 +TARGET_VERSION_2=3_2 + +LIST=`ls debian/*$ORIG_VERSION*` +for F in $LIST; do + TARGET=`echo $F|sed -e "s|$ORIG_VERSION|$TARGET_VERSION|g"` + mv $F $TARGET +done +LIST=`ls debian/*$TARGET_VERSION* debian/control` +for F in $LIST; do + sed -i -e "s|$ORIG_VERSION_2|$TARGET_VERSION_2|g" $F + sed -i -e "s|$ORIG_VERSION|$TARGET_VERSION|g" $F +done + diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..81f6da47 --- /dev/null +++ b/debian/rules @@ -0,0 +1,102 @@ +#!/usr/bin/make -f + +TARGET_BUILD := build-clang +GCC_VERSION := 4.7 +LLVM_VERSION := 3.2 +SONAME_EXT := 1 +DEBIAN_REVISION := $(shell dpkg-parsechangelog | sed -rne 's,^Version: .*-(.*),\1,p') +ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) + NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) +endif + +DEB_HOST_MULTIARCH = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_HOST_ARCH_BITS = $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS) +DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) + + +confargs := \ + --with-c-include-dirs=/usr/include/$(DEB_HOST_MULTIARCH):/usr/include/$(DEB_HOST_GNU_TYPE):/usr/include \ + --with-cxx-include-root=/usr/include/c++/$(GCC_VERSION) \ + --with-cxx-include-arch=$(DEB_HOST_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) + +ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH_BITS),64) + confargs += --with-cxx-include-32bit-dir=32 +else + confargs += --with-cxx-include-64bit-dir=64 +endif + +opt_flags = -g -O2 +ifneq (,$(findstring $(DEB_HOST_ARCH),armel)) + opt_flags += -marm +endif + + +%: + dh $@ --buildsystem=cmake --builddirectory=$(TARGET_BUILD) + +override_dh_auto_configure: + xzcat /usr/src/llvm-$(LLVM_VERSION)/llvm-$(LLVM_VERSION).tar.xz|tar -x -f - + mkdir -p tools/clang/include/clang/Debian + mkdir -p $(TARGET_BUILD) + sed -e "s|@DEB_HOST_MULTIARCH@|$(dpkg-architecture -qDEB_HOST_MULTIARCH)|" \ + -e "s|@DEB_HOST_GNU_TYPE@|$(dpkg-architecture -qDEB_HOST_GNU_TYPE)|" \ + -e "s|@DEB_PATCHSETVERSION@|$(DEBIAN_REVISION)|" \ + debian/debian_path.h > tools/clang/include/clang/Debian/debian_path.h + +# Remove some old symlinks + cd llvm-$(LLVM_VERSION)/tools/ && \ + if test -h clang; then \ + rm clang; \ + fi; \ + ln -s ../../tools/clang .; \ + readlink clang; \ + if test -h lldb; then \ + rm lldb; \ + fi; \ + ln -s ../../tools/lldb .; \ + + + cd llvm-$(LLVM_VERSION)/projects/ && \ + if test -h compiler-rt; then \ + rm compiler-rt; \ + fi; \ + ln -s ../../compiler-rt .; \ + readlink compiler-rt + +# Start the actual configure + cd $(TARGET_BUILD) && \ + ../llvm-$(LLVM_VERSION)/configure $(confargs) \ + --prefix=/usr/ \ + --disable-assertions --enable-shared --enable-optimized \ + --with-optimize-option=' $(opt_flags)' --enable-pic --enable-libffi \ + CLANG_VENDOR=Debian || { cat config.log; exit 1; } +# cd $(TARGET_BUILD) && cmake ../llvm-$(LLVM_VERSION)/ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON + +override_dh_auto_build: + $(MAKE) $(NJOBS) -C $(TARGET_BUILD) VERBOSE=1 ONLY_TOOLS="clang lldb" CLANG_VENDOR=Debian CXXFLAGS=-std=c++0x +# Only available in clang 3.3 +# cd $(CURDIR)/tools/clang/docs && make -f Makefile.sphinx +# && make -f Makefile.sphinx man + +override_dh_auto_install: + chrpath -d build-clang/Release/bin/clang + $(MAKE) -C $(TARGET_BUILD) VERBOSE=1 ONLY_TOOLS="clang lldb" install DESTDIR=$(CURDIR)/debian/tmp/ + cd debian/tmp/usr/lib/&& mv libclang.so libclang.so.$(SONAME_EXT) && ln -s libclang.so.$(SONAME_EXT) libclang.so +# cd build-clang/tools/clang/runtime/compiler-rt/ && rm -rf $$(find . -iname "SubDir.lib*" -o -iname .dir) && rm -rf $$(find -empty) + mkdir -p $(CURDIR)/debian/compiler-rt/usr/bin/ + cp compiler-rt/lib/asan/scripts/asan_symbolize.py $(CURDIR)/debian/compiler-rt/usr/bin/asan_symbolize +# Create this fake directory to make the install libclang-common-dev happy +# under the unsupported archs of compiler-rt + mkdir -p $(CURDIR)/debian/tmp/usr/lib/clang/$(LLVM_VERSION)/lib + +.PHONY: override_dh_strip +override_dh_strip: + dh_strip --dbg-package=libclang$(SONAME_EXT)-dbg + +override_dh_auto_test: + $(MAKE) -C $(TARGET_BUILD) check || true + +override_dh_auto_clean: + rm -rf build-clang llvm-$(LLVM_VERSION) tools/clang/include/clang/Debian/debian_path.h diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..eb3378a6 --- /dev/null +++ b/debian/watch @@ -0,0 +1,4 @@ +version=3 +opts=uversionmangle=s/\.(tar.*|tgz|zip|gz|bz2)$//i,dversionmangle=s/[-.+~]?(cvs|svn|git|snapshot|pre|hg)(.*)$//i,pasv \ +http://llvm.org/releases/download.html (?:.*/)?clang-?_?([\d+\.]+|\d+)\.(tar.*|tgz|zip|gz|bz2|) debian debian/orig-tar.sh +