diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2012-12-03 21:31:36 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2012-12-03 21:31:36 +0000 |
commit | 674cec0a2e9a33bd4dc8df5e56460064c88c7ed2 (patch) | |
tree | 8ca61d1931e6a9d54e742729925fe90ca57720f2 /sys-devel | |
parent | Keyword amd64-linux and x86-linux (diff) | |
download | gentoo-2-674cec0a2e9a33bd4dc8df5e56460064c88c7ed2.tar.gz gentoo-2-674cec0a2e9a33bd4dc8df5e56460064c88c7ed2.tar.bz2 gentoo-2-674cec0a2e9a33bd4dc8df5e56460064c88c7ed2.zip |
Release candidate bump, sync changes in live ebuild, remove some 3.1 versions. Still need to fix the gentoo-freebsd-fix-cxx-paths patch
(Portage version: 2.2.0_alpha144/cvs/Linux x86_64, signed Manifest commit with key C74525F2)
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/clang/ChangeLog | 14 | ||||
-rw-r--r-- | sys-devel/clang/clang-3.1-r1.ebuild | 191 | ||||
-rw-r--r-- | sys-devel/clang/clang-3.1-r2.ebuild | 199 | ||||
-rw-r--r-- | sys-devel/clang/clang-3.2_rc2.ebuild (renamed from sys-devel/clang/clang-3.1-r4.ebuild) | 36 | ||||
-rw-r--r-- | sys-devel/clang/clang-9999.ebuild | 5 | ||||
-rw-r--r-- | sys-devel/clang/files/clang-3.1-fix_cxx_include_root.patch | 21 | ||||
-rw-r--r-- | sys-devel/clang/files/clang-3.1-gentoo-freebsd-fix-cxx-paths.patch | 187 | ||||
-rw-r--r-- | sys-devel/clang/files/clang-3.1-gentoo-linux-fix-cxx-include.patch | 13 | ||||
-rw-r--r-- | sys-devel/clang/files/clang-3.1-gentoo-runtime-gcc-detection.patch | 26 |
9 files changed, 32 insertions, 660 deletions
diff --git a/sys-devel/clang/ChangeLog b/sys-devel/clang/ChangeLog index ed27df84ebe1..775c907fbc8d 100644 --- a/sys-devel/clang/ChangeLog +++ b/sys-devel/clang/ChangeLog @@ -1,6 +1,18 @@ # 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.77 2012/08/30 09:41:16 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.78 2012/12/03 21:31:35 voyageur Exp $ + +*clang-3.2_rc2 (03 Dec 2012) + + 03 Dec 2012; Bernard Cafarelli <voyageur@gentoo.org> -clang-3.1-r1.ebuild, + -clang-3.1-r2.ebuild, -clang-3.1-r4.ebuild, + -files/clang-3.1-fix_cxx_include_root.patch, + -files/clang-3.1-gentoo-freebsd-fix-cxx-paths.patch, + -files/clang-3.1-gentoo-linux-fix-cxx-include.patch, + -files/clang-3.1-gentoo-runtime-gcc-detection.patch, +clang-3.2_rc2.ebuild, + clang-9999.ebuild: + Release candidate bump, sync changes in live ebuild, remove some 3.1 + versions. Still need to fix the gentoo-freebsd-fix-cxx-paths patch 30 Aug 2012; Bernard Cafarelli <voyageur@gentoo.org> -files/cl-patches/0001-Add-r600-TargetInfo.patch, diff --git a/sys-devel/clang/clang-3.1-r1.ebuild b/sys-devel/clang/clang-3.1-r1.ebuild deleted file mode 100644 index 0843db9e4053..000000000000 --- a/sys-devel/clang/clang-3.1-r1.ebuild +++ /dev/null @@ -1,191 +0,0 @@ -# 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-r1.ebuild,v 1.1 2012/05/26 01:34:57 ryao 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}/${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" - - # 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 - - # 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 - - # 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/lib/clang/3.1/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/clang-3.1-r2.ebuild b/sys-devel/clang/clang-3.1-r2.ebuild deleted file mode 100644 index 276c491f4442..000000000000 --- a/sys-devel/clang/clang-3.1-r2.ebuild +++ /dev/null @@ -1,199 +0,0 @@ -# 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.4 2012/06/02 09:58:27 chithanh 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 ~arm ~x86 ~amd64-fbsd ~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 r155737 - 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/clang-3.1-r4.ebuild b/sys-devel/clang/clang-3.2_rc2.ebuild index 1c678993c304..d8bf5db35a35 100644 --- a/sys-devel/clang/clang-3.1-r4.ebuild +++ b/sys-devel/clang/clang-3.2_rc2.ebuild @@ -1,8 +1,8 @@ # 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-r4.ebuild,v 1.4 2012/08/05 14:07:08 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-3.2_rc2.ebuild,v 1.1 2012/12/03 21:31:35 voyageur Exp $ -EAPI=4 +EAPI=5 RESTRICT_PYTHON_ABIS="3.*" SUPPORT_PYTHON_ABIS="1" @@ -12,9 +12,9 @@ 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" +SRC_URI="http://llvm.org/pre-releases/${PV/_rc*}/${PV/3.2_}/llvm-${PV/_}.src.tar.gz + http://llvm.org/pre-releases/${PV/_rc*}/${PV/3.2_}/compiler-rt-${PV/_}.src.tar.gz + http://llvm.org/pre-releases/${PV/_rc*}/${PV/3.2_}/${P/_}.src.tar.gz" LICENSE="UoI-NCSA" SLOT="0" @@ -24,12 +24,14 @@ 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 +S=${WORKDIR}/llvm.src src_prepare() { - mv "${WORKDIR}"/clang-${PV}.src "${S}"/tools/clang \ + rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ + || die "symlinks removal failed" + mv "${WORKDIR}"/cfe.src "${S}"/tools/clang \ || die "clang source directory move failed" - mv "${WORKDIR}"/compiler-rt-${PV}.src "${S}"/projects/compiler-rt \ + mv "${WORKDIR}"/compiler-rt.src "${S}"/projects/compiler-rt \ || die "compiler-rt source directory move failed" # Same as llvm doc patches @@ -75,16 +77,14 @@ src_prepare() { -i tools/clang/test/lit.cfg || die "test path sed failed" # Automatically select active system GCC's libraries, bugs #406163 and #417913 - epatch "${FILESDIR}"/${P}-gentoo-runtime-gcc-detection-v3.patch + epatch "${FILESDIR}"/${PN}-3.1-gentoo-runtime-gcc-detection-v3.patch # Fix search paths on FreeBSD, bug #409269 - epatch "${FILESDIR}"/${P}-gentoo-freebsd-fix-lib-path.patch + epatch "${FILESDIR}"/${PN}-3.1-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-v2.patch - - # Increase recursion limit, bug #417545, upstream r155737 - epatch "${FILESDIR}"/${P}-increase-parser-recursion-limit.patch + # Needs to be updated for 3.2 + #epatch "${FILESDIR}"/${PN}-3.1-gentoo-freebsd-fix-cxx-paths-v2.patch # User patches epatch_user @@ -106,7 +106,7 @@ src_configure() { if use multitarget; then CONF_FLAGS="${CONF_FLAGS} --enable-targets=all" else - CONF_FLAGS="${CONF_FLAGS} --enable-targets=host-only" + CONF_FLAGS="${CONF_FLAGS} --enable-targets=host,cpp" fi if use amd64; then @@ -123,9 +123,6 @@ src_compile() { } 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}" @@ -162,6 +159,9 @@ src_install() { python_execute_function install-scan-view fi + # AddressSanitizer symbolizer (currently separate) + dobin "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py + # 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 diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild index cb2dd0d22311..2c5826393c1c 100644 --- a/sys-devel/clang/clang-9999.ebuild +++ b/sys-devel/clang/clang-9999.ebuild @@ -1,6 +1,6 @@ # 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-9999.ebuild,v 1.31 2012/07/27 18:22:45 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-9999.ebuild,v 1.32 2012/12/03 21:31:35 voyageur Exp $ EAPI=4 @@ -111,9 +111,6 @@ src_compile() { } 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}" diff --git a/sys-devel/clang/files/clang-3.1-fix_cxx_include_root.patch b/sys-devel/clang/files/clang-3.1-fix_cxx_include_root.patch deleted file mode 100644 index e7c52515c834..000000000000 --- a/sys-devel/clang/files/clang-3.1-fix_cxx_include_root.patch +++ /dev/null @@ -1,21 +0,0 @@ -Bug #387309 - ---- llvm/tools/clang/lib/Driver/ToolChains.cpp.orig 2011-11-09 23:10:04.000000000 +0100 -+++ llvm/tools/clang/lib/Driver/ToolChains.cpp 2011-11-09 23:11:04.000000000 +0100 -@@ -1586,12 +1586,13 @@ - // This is of the form /foo/bar/include/c++/4.5.2/ - if (CxxIncludeRoot.back() == '/') - llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the / -+ llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the g++-v4 -+ llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the include - StringRef Version = llvm::sys::path::filename(CxxIncludeRoot); - llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the version -- llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the c++ -- llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the include -+ llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the ARCH - GCCInstallPath = CxxIncludeRoot.str(); -- GCCInstallPath.append("/lib/gcc/"); -+ GCCInstallPath.append("/"); - GCCInstallPath.append(CXX_INCLUDE_ARCH); - GCCInstallPath.append("/"); - GCCInstallPath.append(Version); diff --git a/sys-devel/clang/files/clang-3.1-gentoo-freebsd-fix-cxx-paths.patch b/sys-devel/clang/files/clang-3.1-gentoo-freebsd-fix-cxx-paths.patch deleted file mode 100644 index 987aa22d9518..000000000000 --- a/sys-devel/clang/files/clang-3.1-gentoo-freebsd-fix-cxx-paths.patch +++ /dev/null @@ -1,187 +0,0 @@ -diff --git a/a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp b/b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp -index 1e282f2..1d6835b 100644 ---- a/a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp -+++ b/b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp -@@ -2305,6 +2305,161 @@ void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, - } - } - -+void FreeBSD::AddClangSystemIncludeArgs(const ArgList &DriverArgs, -+ ArgStringList &CC1Args) const { -+ const Driver &D = getDriver(); -+ -+ if (DriverArgs.hasArg(options::OPT_nostdinc)) -+ return; -+ -+ if (!DriverArgs.hasArg(options::OPT_nostdlibinc)) -+ addSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/local/include"); -+ -+ if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { -+ llvm::sys::Path P(D.ResourceDir); -+ P.appendComponent("include"); -+ addSystemInclude(DriverArgs, CC1Args, P.str()); -+ } -+ -+ if (DriverArgs.hasArg(options::OPT_nostdlibinc)) -+ return; -+ -+ // Check for configure-time C include directories. -+ StringRef CIncludeDirs(C_INCLUDE_DIRS); -+ if (CIncludeDirs != "") { -+ SmallVector<StringRef, 5> dirs; -+ CIncludeDirs.split(dirs, ":"); -+ for (SmallVectorImpl<StringRef>::iterator I = dirs.begin(), E = dirs.end(); -+ I != E; ++I) { -+ StringRef Prefix = llvm::sys::path::is_absolute(*I) ? D.SysRoot : ""; -+ addExternCSystemInclude(DriverArgs, CC1Args, Prefix + *I); -+ } -+ return; -+ } -+ -+ // Lacking those, try to detect the correct set of system includes for the -+ // target triple. -+ -+ // Implement generic Debian multiarch support. -+ const StringRef X86_64MultiarchIncludeDirs[] = { -+ "/usr/include/x86_64-linux-gnu", -+ -+ // FIXME: These are older forms of multiarch. It's not clear that they're -+ // in use in any released version of Debian, so we should consider -+ // removing them. -+ "/usr/include/i686-linux-gnu/64", -+ "/usr/include/i486-linux-gnu/64" -+ }; -+ const StringRef X86MultiarchIncludeDirs[] = { -+ "/usr/include/i386-linux-gnu", -+ -+ // FIXME: These are older forms of multiarch. It's not clear that they're -+ // in use in any released version of Debian, so we should consider -+ // removing them. -+ "/usr/include/x86_64-linux-gnu/32", -+ "/usr/include/i686-linux-gnu", -+ "/usr/include/i486-linux-gnu" -+ }; -+ const StringRef ARMMultiarchIncludeDirs[] = { -+ "/usr/include/arm-linux-gnueabi" -+ }; -+ const StringRef MIPSMultiarchIncludeDirs[] = { -+ "/usr/include/mips-linux-gnu" -+ }; -+ const StringRef MIPSELMultiarchIncludeDirs[] = { -+ "/usr/include/mipsel-linux-gnu" -+ }; -+ const StringRef PPCMultiarchIncludeDirs[] = { -+ "/usr/include/powerpc-linux-gnu" -+ }; -+ const StringRef PPC64MultiarchIncludeDirs[] = { -+ "/usr/include/powerpc64-linux-gnu" -+ }; -+ ArrayRef<StringRef> MultiarchIncludeDirs; -+ if (getTriple().getArch() == llvm::Triple::x86_64) { -+ MultiarchIncludeDirs = X86_64MultiarchIncludeDirs; -+ } else if (getTriple().getArch() == llvm::Triple::x86) { -+ MultiarchIncludeDirs = X86MultiarchIncludeDirs; -+ } else if (getTriple().getArch() == llvm::Triple::arm) { -+ MultiarchIncludeDirs = ARMMultiarchIncludeDirs; -+ } else if (getTriple().getArch() == llvm::Triple::mips) { -+ MultiarchIncludeDirs = MIPSMultiarchIncludeDirs; -+ } else if (getTriple().getArch() == llvm::Triple::mipsel) { -+ MultiarchIncludeDirs = MIPSELMultiarchIncludeDirs; -+ } else if (getTriple().getArch() == llvm::Triple::ppc) { -+ MultiarchIncludeDirs = PPCMultiarchIncludeDirs; -+ } else if (getTriple().getArch() == llvm::Triple::ppc64) { -+ MultiarchIncludeDirs = PPC64MultiarchIncludeDirs; -+ } -+ for (ArrayRef<StringRef>::iterator I = MultiarchIncludeDirs.begin(), -+ E = MultiarchIncludeDirs.end(); -+ I != E; ++I) { -+ if (llvm::sys::fs::exists(D.SysRoot + *I)) { -+ addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + *I); -+ break; -+ } -+ } -+ -+ if (getTriple().getOS() == llvm::Triple::RTEMS) -+ return; -+ -+ // Add an include of '/include' directly. This isn't provided by default by -+ // system GCCs, but is often used with cross-compiling GCCs, and harmless to -+ // add even when Clang is acting as-if it were a system compiler. -+ addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/include"); -+ -+ addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/include"); -+} -+ -+/// \brief Helper to add the thre variant paths for a libstdc++ installation. -+/*static*/ bool FreeBSD::addLibStdCXXIncludePaths(Twine Base, Twine TargetArchDir, -+ const ArgList &DriverArgs, -+ ArgStringList &CC1Args) { -+ if (!llvm::sys::fs::exists(Base)) -+ return false; -+ addSystemInclude(DriverArgs, CC1Args, Base); -+ addSystemInclude(DriverArgs, CC1Args, Base + "/" + TargetArchDir); -+ addSystemInclude(DriverArgs, CC1Args, Base + "/backward"); -+ return true; -+} -+ -+void FreeBSD::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, -+ ArgStringList &CC1Args) const { -+ if (DriverArgs.hasArg(options::OPT_nostdlibinc) || -+ DriverArgs.hasArg(options::OPT_nostdincxx)) -+ return; -+ -+ // Check if libc++ has been enabled and provide its include paths if so. -+ if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) { -+ // libc++ is always installed at a fixed path on Linux currently. -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/include/c++/v1"); -+ return; -+ } -+ -+ // We need a detected GCC installation on Linux to provide libstdc++'s -+ // headers. We handled the libc++ case above. -+ if (!GCCInstallation.isValid()) -+ return; -+ -+ // By default, look for the C++ headers in an include directory adjacent to -+ // the lib directory of the GCC installation. Note that this is expect to be -+ // equivalent to '/usr/include/c++/X.Y' in almost all cases. -+ StringRef LibDir = GCCInstallation.getParentLibPath(); -+ StringRef InstallDir = GCCInstallation.getInstallPath(); -+ StringRef Version = GCCInstallation.getVersion(); -+ if (!addLibStdCXXIncludePaths(LibDir + "/../include/c++/" + Version, -+ (GCCInstallation.getTriple().str() + -+ GCCInstallation.getMultiarchSuffix()), -+ DriverArgs, CC1Args)) { -+ // Gentoo is weird and places its headers inside the GCC install, so if the -+ // first attempt to find the headers fails, try this pattern. -+ addLibStdCXXIncludePaths(InstallDir + "/include/g++-v4", -+ getDriver().DefaultTargetTriple, -+ DriverArgs, CC1Args); -+ } -+} -+ - /// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly. - - DragonFly::DragonFly(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) -diff --git a/a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.h b/b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.h -index eaa6be1..bba891e 100644 ---- a/a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.h -+++ b/b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.h -@@ -489,6 +489,16 @@ public: - - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const; -+ -+ virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs, -+ ArgStringList &CC1Args) const; -+ virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, -+ ArgStringList &CC1Args) const; -+ -+private: -+ static bool addLibStdCXXIncludePaths(Twine Base, Twine TargetArchDir, -+ const ArgList &DriverArgs, -+ ArgStringList &CC1Args); - }; - - class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_ELF { diff --git a/sys-devel/clang/files/clang-3.1-gentoo-linux-fix-cxx-include.patch b/sys-devel/clang/files/clang-3.1-gentoo-linux-fix-cxx-include.patch deleted file mode 100644 index 0a8beef5300b..000000000000 --- a/sys-devel/clang/files/clang-3.1-gentoo-linux-fix-cxx-include.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -upNr a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp ---- a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2012-05-25 20:32:28.859469000 -0400 -+++ b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2012-05-25 20:33:15.988680000 -0400 -@@ -2305,8 +2305,7 @@ void Linux::AddClangCXXStdlibIncludeArgs - // Gentoo is weird and places its headers inside the GCC install, so if the - // first attempt to find the headers fails, try this pattern. - addLibStdCXXIncludePaths(InstallDir + "/include/g++-v4", -- (GCCInstallation.getTriple().str() + -- GCCInstallation.getMultiarchSuffix()), -+ getDriver().DefaultTargetTriple, - DriverArgs, CC1Args); - } - } diff --git a/sys-devel/clang/files/clang-3.1-gentoo-runtime-gcc-detection.patch b/sys-devel/clang/files/clang-3.1-gentoo-runtime-gcc-detection.patch deleted file mode 100644 index 6f0fca07ebb6..000000000000 --- a/sys-devel/clang/files/clang-3.1-gentoo-runtime-gcc-detection.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -upNr a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp ---- a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2012-05-24 03:32:31.593191000 -0400 -+++ b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2012-05-24 03:38:31.733163513 -0400 -@@ -1145,6 +1145,22 @@ Generic_GCC::GCCInstallationDetector::GC - Prefixes.push_back(D.InstalledDir + "/.."); - } - -+ llvm::OwningPtr<llvm::MemoryBuffer> File; -+ if (!llvm::MemoryBuffer::getFile(D.SysRoot + "/etc/env.d/gcc/config-" + D.DefaultTargetTriple, File)) -+ { -+ bool Exists; -+ const std::string VersionText = File.get()->getBuffer().rsplit('-').second.substr(0,5).str(); -+ const std::string GentooPath = D.SysRoot + "/usr/lib/gcc/" + D.DefaultTargetTriple + "/" + VersionText; -+ if (!llvm::sys::fs::exists(GentooPath + "/crtbegin.o", Exists) && Exists) -+ { -+ Version = GCCVersion::Parse(VersionText); -+ GCCInstallPath = GentooPath; -+ GCCParentLibPath = GCCInstallPath + "/../../.."; -+ IsValid = true; -+ return; -+ } -+ } -+ - // Loop over the various components which exist and select the best GCC - // installation available. GCC installs are ranked by version number. - Version = GCCVersion::Parse("0.0.0"); |