diff options
author | Michał Górny <mgorny@gentoo.org> | 2012-05-26 07:40:49 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2012-05-26 07:40:49 +0000 |
commit | 2389827160ea9e2da64c074ccdc9b812f65b5184 (patch) | |
tree | c8a85ee1dc8094226bcfb80c61382909fbb1340d /sys-devel/clang | |
parent | Depend also on xml-dtd. Fixes bug#384133. (diff) | |
download | historical-2389827160ea9e2da64c074ccdc9b812f65b5184.tar.gz historical-2389827160ea9e2da64c074ccdc9b812f65b5184.tar.bz2 historical-2389827160ea9e2da64c074ccdc9b812f65b5184.zip |
Include compiler-rt; fixes #417419. Increase parser recursion limit wrt #417545. Also fix BSD include removal.
Package-Manager: portage-2.2.0_alpha107_p2/cvs/Linux x86_64
Diffstat (limited to 'sys-devel/clang')
-rw-r--r-- | sys-devel/clang/ChangeLog | 9 | ||||
-rw-r--r-- | sys-devel/clang/Manifest | 17 | ||||
-rw-r--r-- | sys-devel/clang/clang-3.1-r2.ebuild | 199 | ||||
-rw-r--r-- | sys-devel/clang/files/clang-3.1-increase-parser-recursion-limit.patch | 15 |
4 files changed, 238 insertions, 2 deletions
diff --git a/sys-devel/clang/ChangeLog b/sys-devel/clang/ChangeLog index 30768ed21e96..3ef7be447d00 100644 --- a/sys-devel/clang/ChangeLog +++ b/sys-devel/clang/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-devel/clang # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.63 2012/05/26 01:34:57 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.64 2012/05/26 07:40:48 mgorny Exp $ + +*clang-3.1-r2 (26 May 2012) + + 26 May 2012; Michał Górny <mgorny@gentoo.org> +clang-3.1-r2.ebuild, + +files/clang-3.1-increase-parser-recursion-limit.patch: + Include compiler-rt; fixes #417419. Increase parser recursion limit wrt + #417545. Also fix BSD include removal. *clang-3.1-r1 (26 May 2012) diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest index 0e52a8c11b3d..0acea1a0dbd6 100644 --- a/sys-devel/clang/Manifest +++ b/sys-devel/clang/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + AUX clang-2.7-fixdoc.patch 1977 RMD160 62f52e5580baa396d93c56735c0039c8691b43b6 SHA1 351c1d2cf86b6da75a6ed19083d7a857333f007c SHA256 36c2214e575ed3fd78938279739e82c4f750f8726f8387e1414c18532501314a AUX clang-2.8-alignof.patch 11984 RMD160 3ddf038274481a325ced3a736a5109302d0c50b5 SHA1 7d040a7d2d54e64b85cd2ac188d151d8b89fc62a SHA256 2c1d648c64cc6582a00b0adbc5c65e3ac89a1bb1816e0691902866730a332fa2 AUX clang-2.8-darwin-prefix.patch 4989 RMD160 e2c863f62b6f9ef3b26b9b2a41cfd9950fb174b4 SHA1 dfda0f3d1f9bac791ed7fb0c06d8c91e931a8fd5 SHA256 808d6d47b7eb133a4e1091bf24b64690fe14d3f5b66fec7a9ed3d91aeb1f03d7 @@ -14,10 +17,12 @@ AUX clang-3.1-gentoo-freebsd-fix-cxx-paths.patch 7959 RMD160 c00347f375bde4ef8c3 AUX clang-3.1-gentoo-freebsd-fix-lib-path.patch 646 RMD160 5c78398bf16c0cad3cc1d4c018cd8eb3dfeac30d SHA1 e9d5e4183ab8729d167afcdb7923ab8e9abe7c49 SHA256 4e0ac4fd0d5ce22d055c010d6696f8e625cfe56b10e26dc6575c81084c151751 AUX clang-3.1-gentoo-linux-fix-cxx-include.patch 836 RMD160 1ec5d07904cb6f8bac1bd6b364a23529695385ec SHA1 1e9d097f521bc1ac5ee04971442c069b07c20607 SHA256 5fa3d5094321084fdffad75492007c5f194cab2d4bb3b6d5eceaeae28ee1a1c0 AUX clang-3.1-gentoo-runtime-gcc-detection.patch 1272 RMD160 c204c5aac4eb7be0247c65f2fee6246d63b3cb72 SHA1 a86028612d67b16d77973735028778260cbd3832 SHA256 d50176ae5aa1264bc8dd18c8e25e316d14bc0e8237e58980779d7f76d528d187 +AUX clang-3.1-increase-parser-recursion-limit.patch 495 RMD160 ee36c645b66a71839fb8fef8827b51652ee0a0c2 SHA1 154f47395be58673b814c8140bde3dcb42edcc82 SHA256 a0800603a8162de3beff5cc508648d6c4f5c0b095635ec8317682b04c6ce8e95 DIST clang-2.8.tgz 5666777 RMD160 f00956b6de29cc09f3992aeabd140f2189c6cf39 SHA1 94977c84ce136307dbbeade95e67bfe3c25161ff SHA256 ed83481553e6a39a8a2953e89630d881d87833506f096a90f18d93ec2bdee0c1 DIST clang-2.9.tgz 6243772 RMD160 4ab79cbd0e2ad25a2272e6ee2fbbf546818dbd73 SHA1 5fd3b5cec050ec12858c1602b23cf096282ad4a4 SHA256 70c41f3f782a71cbaa7bc8d6ea29fce4263ad3e8558dfecc6dc11cdef17909df DIST clang-3.0.tar.gz 7240578 RMD160 640b309116db4357627c0b81ebba5dab824d9eeb SHA1 1fa11f07f957bd9c9de003d1b5a7a9ba1e0055e4 SHA256 b64e72da356d7c3428cfd7ac620d49ec042c84eaee13c26024879f555f4e126d DIST clang-3.1.src.tar.gz 8158418 RMD160 5ae09d3d69d4f1e50e07f6bf3474da96e6a84feb SHA1 19f33b187a50d22fda2a6f9ed989699a9a9efd62 SHA256 ff63e215dcd3e2838ffdea38502f8d35bab17e487f3c3799579961e452d5a786 +DIST compiler-rt-3.1.src.tar.gz 1259340 RMD160 c09239db5e798396b34d98f3ffdb9b4f2456b84e SHA1 62b7646eee6c81f3078ea398fee160b264b5bd84 SHA256 1bd4624e7465b05ea713198f19c1c235bae2d35a411c15a4648300bc74294f5c DIST llvm-2.8-r1.tgz 9112527 RMD160 3f5a71d07e105a7cf46eafc7a9006a927035012c SHA1 6d49fe039d28e8664de25491c775cb2c599e30c1 SHA256 25addb742f1c6cc12877ed0ee924dda962d848368ee095be8e48342ae613d43b DIST llvm-2.9.tgz 9574781 RMD160 caeaa067fda1eb34196b356a087645f83731cfb7 SHA1 500f587f840199ac53c4fc7572839d08fa9d9123 SHA256 661236cfa17428b48cfa9cbb9909f7569c64b8ecd219fd91dbc00e3b557b3779 DIST llvm-3.0.tar.gz 10350539 RMD160 85211cafbed1c5d838ac54669017b5298613f975 SHA1 b683e7294fcf69887c0d709025d4640f5dca755b SHA256 519eb11d3499ce99c6ffdb8718651fc91425ed7690eac91c8d6853474f7c0477 @@ -26,6 +31,16 @@ EBUILD clang-2.8-r3.ebuild 6768 RMD160 7b552f45bca12124fe5659a9d3690b60706d14cb EBUILD clang-2.9-r1.ebuild 6431 RMD160 cb9ed182675f9a76beb2caa0fc1fe26bfc534dd9 SHA1 1a7a912396c7d1823cd1867bb4be9679a31b2c0e SHA256 f9993c92ea46a43debdf55563b70093530e1eabebcee270c01e4d0e3b9490d1a EBUILD clang-3.0-r4.ebuild 7155 RMD160 65d79627dfaa26bfd327dd173bb4b2b69883e4ca SHA1 ded3b2503e357a8335a816774fb4fcc4deceb50c SHA256 012f34451fdaaf2cc6947e013ba584a8df07bd37b15fb48ba436da71da436aad EBUILD clang-3.1-r1.ebuild 6078 RMD160 9240f45ff4f9b9fefde458968aa4002bd6409aa3 SHA1 60421abed151ce0a463b978c2d15d0236fb16d97 SHA256 92f13108a43de981b35437e9b7b68861fce5be395f313d4298b53d2e7e6999fe +EBUILD clang-3.1-r2.ebuild 6485 RMD160 9326ceb9602bf4fa1f69df9039bc7f2df0639fd4 SHA1 001e5c1e387dbaa829aee39ce128933fdbba6059 SHA256 0c96abfb01000edf03792c3fc008a8c24dc38d79937db91b94fe42058c448032 EBUILD clang-9999.ebuild 5654 RMD160 841c52548946fbb662ecf07653d8f7d77ba83607 SHA1 f1a1639d29f9da5e775c9df29620df16168fe801 SHA256 f6c8ec9c9439859eae3f1a71d55e91fe8f51ba07249cddaaf2191898743cd7cd -MISC ChangeLog 12394 RMD160 c45d72533cf03153869f4f56bca930316201b210 SHA1 4e9c83a492476ed643204463afc505c5004ce480 SHA256 a9bf629cb7fbf98f72c7043fdc84f419a52e77aa3e67ef20e6e51c02f2c888b6 +MISC ChangeLog 12671 RMD160 64c27e48912f50825a0afc9d78780b47f60d7ec3 SHA1 d61d5bd9b9f7c3ab546507dc90d2681c0af3fb3a SHA256 8a4af5bc841c81435b854b3dba28ef8630f5bd1202b4679276b726849bffc62a MISC metadata.xml 1433 RMD160 bff5bd3bda0d6f2e8cbf2fb08e69e373c3184276 SHA1 3607c4f901a2f06ced2fa1fbbe81d83b579f5f1d SHA256 b1863d24caf445334a13132900dad174f320b12adcf5df278dcbf41d180ba03d +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iJwEAQEIAAYFAk/AiQwACgkQfXuS5UK5QB1ktwP/YCrHh0EwpobVheyrVIwGrHuM +Hq/bmq6Hdhj5GdtsKlnyirSKn6rG1wwl3rTwMJ6FW5RLPYEiYTX7+YkSLA5mjNWJ +Ib3QioxVfCyOrhqf6Sn/TZqTTkjFRQT2lkBAqflpHz2JJ9h++Cb5tCCw93/ZT5+k +FPXpbrM7sdc/j5Y1Y8g= +=zPJO +-----END PGP SIGNATURE----- diff --git a/sys-devel/clang/clang-3.1-r2.ebuild b/sys-devel/clang/clang-3.1-r2.ebuild new file mode 100644 index 000000000000..a6513b90a37f --- /dev/null +++ b/sys-devel/clang/clang-3.1-r2.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-3.1-r2.ebuild,v 1.1 2012/05/26 07:40:48 mgorny Exp $ + +EAPI=4 + +RESTRICT_PYTHON_ABIS="3.*" +SUPPORT_PYTHON_ABIS="1" + +inherit eutils multilib python + +DESCRIPTION="C language family frontend for LLVM" +HOMEPAGE="http://clang.llvm.org/" +# Fetching LLVM as well: see http://llvm.org/bugs/show_bug.cgi?id=4840 +SRC_URI="http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.gz + http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.gz + http://llvm.org/releases/${PV}/${P}.src.tar.gz" + +LICENSE="UoI-NCSA" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="debug kernel_FreeBSD multitarget +static-analyzer test" + +DEPEND="static-analyzer? ( dev-lang/perl )" +RDEPEND="~sys-devel/llvm-${PV}[multitarget=]" + +S=${WORKDIR}/llvm-${PV}.src + +src_prepare() { + mv "${WORKDIR}"/clang-${PV}.src "${S}"/tools/clang \ + || die "clang source directory move failed" + mv "${WORKDIR}"/compiler-rt-${PV}.src "${S}"/projects/compiler-rt \ + || die "compiler-rt source directory move failed" + + # Same as llvm doc patches + epatch "${FILESDIR}"/${PN}-2.7-fixdoc.patch + + # multilib-strict + sed -e "/PROJ_headers/s#lib/clang#$(get_libdir)/clang#" \ + -i tools/clang/lib/Headers/Makefile \ + || die "clang Makefile failed" + sed -e "/PROJ_resources/s#lib/clang#$(get_libdir)/clang#" \ + -i tools/clang/runtime/compiler-rt/Makefile \ + || die "compiler-rt Makefile failed" + # fix the static analyzer for in-tree install + sed -e 's/import ScanView/from clang \0/' \ + -i tools/clang/tools/scan-view/scan-view \ + || die "scan-view sed failed" + sed -e "/scanview.css\|sorttable.js/s#\$RealBin#${EPREFIX}/usr/share/${PN}#" \ + -i tools/clang/tools/scan-build/scan-build \ + || die "scan-build sed failed" + # Set correct path for gold plugin + sed -e "/LLVMgold.so/s#lib/#$(get_libdir)/llvm/#" \ + -i tools/clang/lib/Driver/Tools.cpp \ + || die "gold plugin path sed failed" + # Specify python version + python_convert_shebangs 2 tools/clang/tools/scan-view/scan-view + python_convert_shebangs -r 2 test/Scripts + python_convert_shebangs 2 projects/compiler-rt/lib/asan/scripts/asan_symbolize.py + + # From llvm src_prepare + einfo "Fixing install dirs" + sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \ + -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \ + -e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir)/llvm, \ + -i Makefile.config.in || die "Makefile.config sed failed" + + einfo "Fixing rpath and CFLAGS" + sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/llvm, \ + -e '/OmitFramePointer/s/-fomit-frame-pointer//' \ + -i Makefile.rules || die "rpath sed failed" + + # Use system llc (from llvm ebuild) for tests + sed -e "/^llc_props =/s/os.path.join(llvm_tools_dir, 'llc')/'llc'/" \ + -i tools/clang/test/lit.cfg || die "test path sed failed" + + # Automatically select active system GCC's libraries, bug #406163 + epatch "${FILESDIR}"/${P}-gentoo-runtime-gcc-detection.patch + + # Fix search paths on FreeBSD, bug #409269 + epatch "${FILESDIR}"/${P}-gentoo-freebsd-fix-lib-path.patch + + # Fix regression caused by removal of USE=system-cxx-headers, bug #417541 + epatch "${FILESDIR}"/${P}-gentoo-freebsd-fix-cxx-paths.patch + + # Fix regression that prevents Clang from building itself on Linux, bug #417537 + epatch "${FILESDIR}"/${P}-gentoo-linux-fix-cxx-include.patch + + # Increase recursion limit, bug #417545, upstream r155823 + epatch "${FILESDIR}"/${P}-increase-parser-recursion-limit.patch + + # User patches + epatch_user +} + +src_configure() { + local CONF_FLAGS="--enable-shared + --with-optimize-option= + $(use_enable !debug optimized) + $(use_enable debug assertions) + $(use_enable debug expensive-checks)" + + # Setup the search path to include the Prefix includes + if use prefix ; then + CONF_FLAGS="${CONF_FLAGS} \ + --with-c-include-dirs=${EPREFIX}/usr/include:/usr/include" + fi + + if use multitarget; then + CONF_FLAGS="${CONF_FLAGS} --enable-targets=all" + else + CONF_FLAGS="${CONF_FLAGS} --enable-targets=host-only" + fi + + if use amd64; then + CONF_FLAGS="${CONF_FLAGS} --enable-pic" + fi + + econf ${CONF_FLAGS} +} + +src_compile() { + emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 clang-only +} + +src_test() { + cd "${S}"/test || die "cd failed" + emake site.exp + + cd "${S}"/tools/clang || die "cd clang failed" + + echo ">>> Test phase [test]: ${CATEGORY}/${PF}" + + testing() { + if ! emake -j1 VERBOSE=1 test; then + has test $FEATURES && die "Make test failed. See above for details." + has test $FEATURES || eerror "Make test failed. See above for details." + fi + } + python_execute_function testing +} + +src_install() { + cd "${S}"/tools/clang || die "cd clang failed" + emake KEEP_SYMBOLS=1 DESTDIR="${D}" install + + if use static-analyzer ; then + dobin tools/scan-build/ccc-analyzer + dosym ccc-analyzer /usr/bin/c++-analyzer + dobin tools/scan-build/scan-build + + insinto /usr/share/${PN} + doins tools/scan-build/scanview.css + doins tools/scan-build/sorttable.js + + cd tools/scan-view || die "cd scan-view failed" + dobin scan-view + install-scan-view() { + insinto "$(python_get_sitedir)"/clang + doins Reporter.py Resources ScanView.py startfile.py + touch "${ED}"/"$(python_get_sitedir)"/clang/__init__.py + } + python_execute_function install-scan-view + fi + + # Fix install_names on Darwin. The build system is too complicated + # to just fix this, so we correct it post-install + if [[ ${CHOST} == *-darwin* ]] ; then + for lib in libclang.dylib ; do + ebegin "fixing install_name of $lib" + install_name_tool -id "${EPREFIX}"/usr/lib/llvm/${lib} \ + "${ED}"/usr/lib/llvm/${lib} + eend $? + done + for f in usr/bin/{c-index-test,clang} usr/lib/llvm/libclang.dylib ; do + ebegin "fixing references in ${f##*/}" + install_name_tool \ + -change "@rpath/libclang.dylib" \ + "${EPREFIX}"/usr/lib/llvm/libclang.dylib \ + -change "@executable_path/../lib/libLLVM-${PV}.dylib" \ + "${EPREFIX}"/usr/lib/llvm/libLLVM-${PV}.dylib \ + -change "${S}"/Release/lib/libclang.dylib \ + "${EPREFIX}"/usr/lib/llvm/libclang.dylib \ + "${ED}"/$f + eend $? + done + fi + + # Remove unnecessary headers on FreeBSD, bug #417171 + use kernel_FreeBSD && rm "${ED}"usr/$(get_libdir)/clang/${PV}/include/{arm_neon,std,float,iso,limits,tgmath,varargs}*.h +} + +pkg_postinst() { + python_mod_optimize clang +} + +pkg_postrm() { + python_mod_cleanup clang +} diff --git a/sys-devel/clang/files/clang-3.1-increase-parser-recursion-limit.patch b/sys-devel/clang/files/clang-3.1-increase-parser-recursion-limit.patch new file mode 100644 index 000000000000..91606d1ca724 --- /dev/null +++ b/sys-devel/clang/files/clang-3.1-increase-parser-recursion-limit.patch @@ -0,0 +1,15 @@ +Backported from r155737.
+
+diff --git a/llvm-3.1.src/tools/clang/include/clang/Parse/Parser.h b/llvm-3.1.src/tools/clang/include/clang/Parse/Parser.h
+index 0ae5dc8..2a7464f 100644
+--- a/llvm-3.1.src/tools/clang/include/clang/Parse/Parser.h
++++ b/llvm-3.1.src/tools/clang/include/clang/Parse/Parser.h
+@@ -451,7 +451,7 @@ private:
+ }
+ }
+
+- enum { MaxDepth = 256 };
++ enum { MaxDepth = 512 };
+
+ bool diagnoseOverflow();
+ bool diagnoseMissingClose();
|