* [gentoo-commits] dev/mgorny:master commit in: sys-devel/llvm/files/, sys-devel/clang/, sys-devel/llvm/
@ 2013-07-10 9:27 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2013-07-10 9:27 UTC (permalink / raw
To: gentoo-commits
commit: 9992ad68ac225d789398f4fe395dfce6fe3591f7
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 10 09:27:36 2013 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jul 10 09:27:36 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=9992ad68
Integrated clang & llvm ebuild, for testing.
---
sys-devel/clang/clang-9999-r100.ebuild | 20 ++
sys-devel/clang/metadata.xml | 38 +++
sys-devel/llvm/files/llvm-3.2-nodoctargz.patch | 45 ++++
sys-devel/llvm/llvm-9999.ebuild | 309 +++++++++++++++++++++++++
sys-devel/llvm/metadata.xml | 26 +++
5 files changed, 438 insertions(+)
diff --git a/sys-devel/clang/clang-9999-r100.ebuild b/sys-devel/clang/clang-9999-r100.ebuild
new file mode 100644
index 0000000..d60b42b
--- /dev/null
+++ b/sys-devel/clang/clang-9999-r100.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header$
+
+EAPI=5
+
+DESCRIPTION="C language family frontend for LLVM (meta-ebuild)"
+HOMEPAGE="http://clang.llvm.org/"
+SRC_URI=""
+
+LICENSE="UoI-NCSA"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug multitarget python +static-analyzer"
+
+RDEPEND="sys-devel/llvm[clang(-),debug=,multitarget=,python=,static-analyzer=]"
+
+# Please keep this package around since it's quite likely that we'll
+# return to separate LLVM & clang ebuilds when the cmake build system
+# is complete.
diff --git a/sys-devel/clang/metadata.xml b/sys-devel/clang/metadata.xml
new file mode 100644
index 0000000..5e2e8e0
--- /dev/null
+++ b/sys-devel/clang/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <maintainer>
+ <email>ryao@gentoo.org</email>
+ <name>Richard Yao</name>
+ </maintainer>
+ <longdescription>The goal of the Clang project is to create a new C, C++, Objective C and Objective C++ front-end for the LLVM compiler.
+
+Features and Goals
+
+Some of the goals for the project include the following:
+
+End-User Features:
+Fast compiles and low memory use
+Expressive diagnostics
+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</longdescription>
+</pkgmetadata>
diff --git a/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch b/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch
new file mode 100644
index 0000000..3a622b5
--- /dev/null
+++ b/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch
@@ -0,0 +1,45 @@
+--- docs/Makefile.orig 2012-04-30 17:00:01.000000000 +0200
++++ docs/Makefile 2012-04-30 17:15:52.000000000 +0200
+@@ -52,11 +52,10 @@
+ # 'make generated BUILD_FOR_WEBSITE=1'
+ generated:: $(generated_targets)
+
+-install-html: $(PROJ_OBJ_DIR)/html.tar.gz
++install-html:
+ $(Echo) Installing HTML documentation
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html
+ $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir)
+
+ $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
+ $(Echo) Packaging HTML documentation
+@@ -68,12 +67,11 @@
+ install-doxygen: doxygen
+ $(Echo) Installing doxygen documentation
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir)
+ $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \
+ $(FIND) . -type f -exec \
+ $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \;
+
+-doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz
++doxygen: regendoc
+
+ regendoc:
+ $(Echo) Building doxygen documentation
+@@ -99,7 +97,6 @@
+ install-ocamldoc: ocamldoc
+ $(Echo) Installing ocamldoc documentation
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir)
+ $(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \
+ $(FIND) . -type f -exec \
+ $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \;
+@@ -109,7 +106,6 @@
+ $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar*
+ $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc
+ $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/ocamldoc.tar
+- $(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/
+
+ regen-ocamldoc:
+ $(Echo) Building ocamldoc documentation
diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
new file mode 100644
index 0000000..18e1a20
--- /dev/null
+++ b/sys-devel/llvm/llvm-9999.ebuild
@@ -0,0 +1,309 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_9,2_0} )
+
+inherit subversion eutils flag-o-matic multilib python-r1 toolchain-funcs pax-utils
+
+DESCRIPTION="Low Level Virtual Machine"
+HOMEPAGE="http://llvm.org/"
+SRC_URI=""
+ESVN_REPO_URI="http://llvm.org/svn/llvm-project/llvm/trunk"
+
+LICENSE="UoI-NCSA"
+SLOT="0"
+KEYWORDS=""
+IUSE="clang debug doc gold +libffi multitarget ocaml python +static-analyzer test udis86 vim-syntax video_cards_radeon"
+
+DEPEND="dev-lang/perl
+ dev-python/sphinx
+ >=sys-devel/make-3.79
+ >=sys-devel/flex-2.5.4
+ >=sys-devel/bison-1.875d
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 )
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 )
+ sys-libs/zlib
+ gold? ( >=sys-devel/binutils-2.22[cxx] )
+ libffi? ( virtual/pkgconfig
+ virtual/libffi )
+ ocaml? ( dev-lang/ocaml )
+ udis86? ( dev-libs/udis86[pic(+)] )
+ ${PYTHON_DEPS}"
+RDEPEND="dev-lang/perl
+ libffi? ( virtual/libffi )
+ python? ( ${PYTHON_DEPS} )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
+ !<=sys-devel/clang-9999-r99"
+
+# pypy gives me around 1700 unresolved tests due to open file limit
+# being exceeded. probably GC does not close them fast enough.
+REQUIRED_USE="test? ( || ( $(python_gen_useflags 'python*') ) )"
+
+pkg_setup() {
+ # need to check if the active compiler is ok
+
+ broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 "
+ broken_gcc_x86=" 3.4.0 3.4.2 "
+ broken_gcc_amd64=" 3.4.6 "
+
+ gcc_vers=$(gcc-fullversion)
+
+ if [[ ${broken_gcc} == *" ${version} "* ]] ; then
+ elog "Your version of gcc is known to miscompile llvm."
+ elog "Check http://www.llvm.org/docs/GettingStarted.html for"
+ elog "possible solutions."
+ die "Your currently active version of gcc is known to miscompile llvm"
+ fi
+
+ if [[ ${CHOST} == i*86-* && ${broken_gcc_x86} == *" ${version} "* ]] ; then
+ elog "Your version of gcc is known to miscompile llvm on x86"
+ elog "architectures. Check"
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible"
+ elog "solutions."
+ die "Your currently active version of gcc is known to miscompile llvm"
+ fi
+
+ if [[ ${CHOST} == x86_64-* && ${broken_gcc_amd64} == *" ${version} "* ]];
+ then
+ elog "Your version of gcc is known to miscompile llvm in amd64"
+ elog "architectures. Check"
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible"
+ elog "solutions."
+ die "Your currently active version of gcc is known to miscompile llvm"
+ fi
+}
+
+src_unpack() {
+ if use clang; then
+ ESVN_PROJECT=compiler-rt S="${S}"/projects/compiler-rt subversion_fetch "http://llvm.org/svn/llvm-project/compiler-rt/trunk"
+
+ # Force version match between LLVM, compiler-rt & clang
+ local ESVN_REVISION=${ESVN_WC_REVISION}
+
+ ESVN_PROJECT=clang S="${S}"/tools/clang subversion_fetch "http://llvm.org/svn/llvm-project/cfe/trunk"
+ fi
+
+ # Do llvm last so that ESVN_WC_* is top-level.
+ subversion_src_unpack
+}
+
+src_prepare() {
+ # unfortunately ./configure won't listen to --mandir and the-like, so take
+ # care of this.
+ 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)/${PN}, \
+ -i Makefile.config.in || die "Makefile.config sed failed"
+ sed -e "/ActiveLibDir = ActivePrefix/s/lib/$(get_libdir)\/${PN}/" \
+ -i tools/llvm-config/llvm-config.cpp || die "llvm-config sed failed"
+
+ einfo "Fixing rpath and CFLAGS"
+ sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \
+ -e '/OmitFramePointer/s/-fomit-frame-pointer//' \
+ -i Makefile.rules || die "rpath sed failed"
+ if use gold; then
+ sed -e 's,\$(SharedLibDir),'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \
+ -i tools/gold/Makefile || die "gold rpath sed failed"
+ fi
+
+ # FileCheck is needed at least for dragonegg tests
+ sed -e "/NO_INSTALL = 1/s/^/#/" -i utils/FileCheck/Makefile \
+ || die "FileCheck Makefile sed failed"
+
+ if use clang; then
+ # multilib-strict
+ sed -e "/PROJ_headers\|HeaderDir/s#lib/clang#$(get_libdir)/clang#" \
+ -i tools/clang/lib/Headers/Makefile \
+ || die "clang Makefile sed failed"
+ sed -e "/PROJ_resources\|ResourceDir/s#lib/clang#$(get_libdir)/clang#" \
+ -i tools/clang/runtime/compiler-rt/Makefile \
+ || die "compiler-rt Makefile sed failed"
+ sed -e "s#/lib/#/lib{{(32|64)?}}/#" \
+ -i tools/clang/test/Preprocessor/iwithprefix.c \
+ || die "clang test sed 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 and coverage lib
+ sed -e "/LLVMgold.so/s#lib/#$(get_libdir)/llvm/#" \
+ -e "s#lib\(/libprofile_rt.a\)#$(get_libdir)/llvm\1#" \
+ -i tools/clang/lib/Driver/Tools.cpp \
+ || die "driver tools paths sed failed"
+ fi
+
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.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)"
+
+ if use clang; then
+ CONF_FLAGS+="
+ --with-clang-resource-dir=../$(get_libdir)/clang/3.4"
+ fi
+
+ if use multitarget; then
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=all"
+ else
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=host,cpp"
+ if use video_cards_radeon; then
+ CONF_FLAGS="${CONF_FLAGS},r600"
+ fi
+ fi
+
+ if use amd64; then
+ CONF_FLAGS="${CONF_FLAGS} --enable-pic"
+ fi
+
+ if use gold; then
+ CONF_FLAGS="${CONF_FLAGS} --with-binutils-include=${EPREFIX}/usr/include/"
+ fi
+ if use ocaml; then
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml"
+ else
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none"
+ fi
+
+ if use udis86; then
+ CONF_FLAGS="${CONF_FLAGS} --with-udis86"
+ fi
+
+ if use libffi; then
+ append-cppflags "$(pkg-config --cflags libffi)"
+ fi
+ CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)"
+
+ # build with a suitable Python version
+ python_export_best
+
+ # llvm prefers clang over gcc, so we may need to force that
+ tc-export CC CXX
+ econf ${CONF_FLAGS}
+}
+
+src_compile() {
+ emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1
+
+ emake -C docs -f Makefile.sphinx man
+ use doc && emake -C docs -f Makefile.sphinx html
+
+ if use debug; then
+ pax-mark m Debug+Asserts+Checks/bin/lli
+ else
+ pax-mark m Release/bin/lli
+ fi
+ if use test; then
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests
+ pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests
+ pax-mark m unittests/Support/Release/SupportTests
+ fi
+}
+
+src_test() {
+ default
+
+ emake -C tools/clang test
+}
+
+src_install() {
+ emake KEEP_SYMBOLS=1 DESTDIR="${D}" install
+
+ doman docs/_build/man/*.1
+ use doc && dohtml -r docs/_build/html/
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins utils/vim/*.vim
+ fi
+
+ if use clang; then
+ cd tools/clang || die
+
+ 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
+ fi
+
+ python_inst() {
+ if use static-analyzer ; then
+ pushd tools/scan-view >/dev/null || die
+
+ python_doscript scan-view
+
+ touch __init__.py || die
+ python_moduleinto clang
+ python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py
+
+ popd >/dev/null || die
+ fi
+
+ if use python ; then
+ pushd bindings/python/clang >/dev/null || die
+
+ python_moduleinto clang
+ python_domodule __init__.py cindex.py enumerations.py
+
+ popd >/dev/null || die
+ fi
+
+ # AddressSanitizer symbolizer (currently separate)
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py
+ }
+ python_foreach_impl python_inst
+ fi
+
+ # Fix install_names on Darwin. The build system is too complicated
+ # to just fix this, so we correct it post-install
+ local lib= f= odylib= libpv=${PV}
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ eval $(grep PACKAGE_VERSION= configure)
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION}
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib {BugpointPasses,LLVMHello}.dylib ; do
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal
+ # + omit clang libs if not enabled
+ [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue
+
+ ebegin "fixing install_name of $lib"
+ install_name_tool \
+ -id "${EPREFIX}"/usr/lib/${PN}/${lib} \
+ "${ED}"/usr/lib/${PN}/${lib}
+ eend $?
+ done
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/lib{LTO,clang}.dylib ; do
+ # omit clang libs if not enabled
+ [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue
+
+ odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${libpv}.dylib)
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}"
+ install_name_tool \
+ -change "${odylib}" \
+ "${EPREFIX}"/usr/lib/${PN}/libLLVM-${libpv}.dylib \
+ -change "@rpath/libclang.dylib" \
+ "${EPREFIX}"/usr/lib/llvm/libclang.dylib \
+ -change "${S}"/Release/lib/libclang.dylib \
+ "${EPREFIX}"/usr/lib/llvm/libclang.dylib \
+ "${f}"
+ eend $?
+ done
+ fi
+}
diff --git a/sys-devel/llvm/metadata.xml b/sys-devel/llvm/metadata.xml
new file mode 100644
index 0000000..7d34900
--- /dev/null
+++ b/sys-devel/llvm/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <longdescription>Low Level Virtual Machine (LLVM) is:
+ 1. A compilation strategy designed to enable effective program optimization across the entire lifetime of a program. LLVM supports effective optimization at compile time, link-time (particularly interprocedural), run-time and offline (i.e., after software is installed), while remaining transparent to developers and maintaining compatibility with existing build scripts.
+ 2. A virtual instruction set - LLVM is a low-level object code representation that uses simple RISC-like instructions, but provides rich, language-independent, type information and dataflow (SSA) information about operands. This combination enables sophisticated transformations on object code, while remaining light-weight enough to be attached to the executable. This combination is key to allowing link-time, run-time, and offline transformations.
+ 3. A compiler infrastructure - LLVM is also a collection of source code that implements the language and compilation strategy. The primary components of the LLVM infrastructure are a GCC-based C and C++ front-end, a link-time optimization framework with a growing set of global and interprocedural analyses and transformations, static back-ends for many popular (and some obscure) architectures, a back-end which emits portable C code, and a Just-In-Time compilers for several architectures.
+ 4. LLVM does not imply things that you would expect from a high-level virtual machine. It does not require garbage collection or run-time code generation (In fact, LLVM makes a great static compiler!). Note that optional LLVM components can be used to build high-level virtual machines and other systems that need these services.</longdescription>
+ <use>
+ <flag name='clang'>Build the clang C/C++ compiler</flag>
+ <flag name='doc'>Build and install the HTML documentation and regenerate the man pages</flag>
+ <flag name='gold'>Build the gold linker plugin</flag>
+ <flag name='llvm-gcc'>Build LLVM with <pkg>sys-devel/llvm-gcc</pkg></flag>
+ <flag name='multitarget'>Build all host targets (default: host only)</flag>
+ <flag name='static-analyzer'>Install the Clang static analyzer (requires USE=clang)</flag>
+ <flag name='udis86'>Enable support for <pkg>dev-libs/udis86</pkg> disassembler library</flag>
+ </use>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] dev/mgorny:master commit in: sys-devel/llvm/files/, sys-devel/clang/, sys-devel/llvm/
@ 2013-07-18 21:52 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2013-07-18 21:52 UTC (permalink / raw
To: gentoo-commits
commit: 84983975af34457a15152918636594e7fe219481
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 18 21:52:41 2013 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul 18 21:52:41 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=84983975
Backport the LLVM/Clang changes to 3.3.
---
...lang-9999-r100.ebuild => clang-3.3-r100.ebuild} | 4 +-
sys-devel/clang/clang-9999-r100.ebuild | 2 +-
sys-devel/llvm/Manifest | 4 +
...clang-3.1-gentoo-runtime-gcc-detection-v3.patch | 29 ++
sys-devel/llvm/files/llvm-3.3-R600_debug.patch | 22 ++
sys-devel/llvm/llvm-3.3-r1.ebuild | 400 +++++++++++++++++++++
6 files changed, 458 insertions(+), 3 deletions(-)
diff --git a/sys-devel/clang/clang-9999-r100.ebuild b/sys-devel/clang/clang-3.3-r100.ebuild
similarity index 68%
copy from sys-devel/clang/clang-9999-r100.ebuild
copy to sys-devel/clang/clang-3.3-r100.ebuild
index d60b42b..447fc8e 100644
--- a/sys-devel/clang/clang-9999-r100.ebuild
+++ b/sys-devel/clang/clang-3.3-r100.ebuild
@@ -10,10 +10,10 @@ SRC_URI=""
LICENSE="UoI-NCSA"
SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos"
IUSE="debug multitarget python +static-analyzer"
-RDEPEND="sys-devel/llvm[clang(-),debug=,multitarget=,python=,static-analyzer=]"
+RDEPEND="~sys-devel/llvm-${PV}[clang(-),debug=,multitarget=,python=,static-analyzer=]"
# Please keep this package around since it's quite likely that we'll
# return to separate LLVM & clang ebuilds when the cmake build system
diff --git a/sys-devel/clang/clang-9999-r100.ebuild b/sys-devel/clang/clang-9999-r100.ebuild
index d60b42b..8691a84 100644
--- a/sys-devel/clang/clang-9999-r100.ebuild
+++ b/sys-devel/clang/clang-9999-r100.ebuild
@@ -13,7 +13,7 @@ SLOT="0"
KEYWORDS=""
IUSE="debug multitarget python +static-analyzer"
-RDEPEND="sys-devel/llvm[clang(-),debug=,multitarget=,python=,static-analyzer=]"
+RDEPEND="~sys-devel/llvm-${PV}[clang(-),debug=,multitarget=,python=,static-analyzer=]"
# Please keep this package around since it's quite likely that we'll
# return to separate LLVM & clang ebuilds when the cmake build system
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
new file mode 100644
index 0000000..ad8ff49
--- /dev/null
+++ b/sys-devel/llvm/Manifest
@@ -0,0 +1,4 @@
+DIST cfe-3.3.src.tar.gz 9425539 SHA256 b1b55de4ab3a57d3e0331a83e0284610191c77d924e3446498d9113d08dfb996 SHA512 06773f43f7d3529f06edb029f7de398f06a700a0f2476e00c4727e70c291028221bfac23625dfd2c220d6ac91a21670848187a934b99a21801c695127371afcc WHIRLPOOL 8b97b527f19015dd3283b9e174615170e639793f64c635ccc4ee4d8216f8de759fd0121a8ef3513fa1c6ad19b31aa3529091ffb44a01ee858edfef400881596a
+DIST compiler-rt-3.3.src.tar.gz 1568034 SHA256 0e2f3180d6316e6c43f064fdd406c5c6515e682c5f31c57c28335b68c7525423 SHA512 3e86aa8ab9810b4fbac54a40fc93a717a55c642520858c0db215a5324c1e495b4d8fcec9620251cca8e4e5f9afa34bc14364d7f785880a0700469d0201827929 WHIRLPOOL fcfd06bc860dfd901a7576cd4309f863e9d4363e36ab4c67e9e08fe3c8a37d627ee95eb96b9ed53eb6047dec06e73181b3c3e1555b1b49f1e893e6382f21ddc1
+DIST llvm-3.3-manpages.tar.bz2 27098 SHA256 46bb22d63d5fe7dd04e1a7bb7e16c03d93f2ed51d31540cfb9d97ed70059aa77 SHA512 6f24b66b13025d0606908f91ad9b4fc6de1b4aac2d97d261f6b989065476cf153d2f84792f8dd4972b95fb1a45a3931c328df3bcf8ce5ab21170a7a912a39783 WHIRLPOOL 31b9c3635b698f404b75b87c7891b4b6be9cbeb6062bcb6fba5476b0b3069a486ba60c27ab2b12b8a2da9404f666617162041860f023951050a9fc4c7d27748a
+DIST llvm-3.3.src.tar.gz 13602421 SHA256 68766b1e70d05a25e2f502e997a3cb3937187a3296595cf6e0977d5cd6727578 SHA512 1b7f7c5e907a68f642dcbe48fdff9585cb1504022bc9d386f310ebe5d25103d0d5f7cf0abf19e0e3fd666970160a98c90033754e2b79b2fac0cf866c984f8038 WHIRLPOOL a89c0b470fde562a3402e7878b91bc0573d433ca0a60e62c9c46946d7948a4fb657b116b6bac032555e29c70d82c751876adb398fe240f5c8d0a9a2378ce1866
diff --git a/sys-devel/llvm/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch b/sys-devel/llvm/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch
new file mode 100644
index 0000000..49f1085
--- /dev/null
+++ b/sys-devel/llvm/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch
@@ -0,0 +1,29 @@
+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,25 @@ Generic_GCC::GCCInstallationDetector::GC
+ Prefixes.push_back(D.InstalledDir + "/..");
+ }
+
++ llvm::OwningPtr<llvm::MemoryBuffer> File;
++ for (unsigned k = 0, ke = CandidateTripleAliases.size(); k < ke; ++k) {
++ if (!llvm::MemoryBuffer::getFile(D.SysRoot + "/etc/env.d/gcc/config-" + CandidateTripleAliases[k].str(), 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/" + CandidateTripleAliases[k].str() + "/" + VersionText;
++ if (!llvm::sys::fs::exists(GentooPath + "/crtbegin.o", Exists) && Exists)
++ {
++ Version = GCCVersion::Parse(VersionText);
++ GCCInstallPath = GentooPath;
++ GCCParentLibPath = GCCInstallPath + "/../../..";
++ GCCTriple.setTriple(CandidateTripleAliases[k]);
++ 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");
diff --git a/sys-devel/llvm/files/llvm-3.3-R600_debug.patch b/sys-devel/llvm/files/llvm-3.3-R600_debug.patch
new file mode 100644
index 0000000..b104273
--- /dev/null
+++ b/sys-devel/llvm/files/llvm-3.3-R600_debug.patch
@@ -0,0 +1,22 @@
+Fixes compilation of llvm-3.3 on gcc-4.6 and 4.7 when VIDEO_CARDS=radeon
+
+This issue is caused because although Q is a multiset the original code tries to get
+a set iterator which can't be converted in a multiset one.
+
+The fix is as simple as just using a multiset iterator.
+
+Patch by Francisco Blas Izquierdo Riera (klondike)
+Consider the changes in the Public Domain
+https://bugs.gentoo.org/show_bug.cgi?id=474096
+
+--- lib/Target/R600/R600MachineScheduler.cpp
++++ lib/Target/R600/R600MachineScheduler.cpp
+@@ -290,7 +290,7 @@
+ SUnit *R600SchedStrategy::PopInst(std::multiset<SUnit *, CompareSUnit> &Q) {
+ if (Q.empty())
+ return NULL;
+- for (std::set<SUnit *, CompareSUnit>::iterator It = Q.begin(), E = Q.end();
++ for (std::multiset<SUnit *, CompareSUnit>::iterator It = Q.begin(), E = Q.end();
+ It != E; ++It) {
+ SUnit *SU = *It;
+ InstructionsGroupCandidate.push_back(SU->getInstr());
diff --git a/sys-devel/llvm/llvm-3.3-r1.ebuild b/sys-devel/llvm/llvm-3.3-r1.ebuild
new file mode 100644
index 0000000..5cd52a6
--- /dev/null
+++ b/sys-devel/llvm/llvm-3.3-r1.ebuild
@@ -0,0 +1,400 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_9,2_0} )
+
+inherit eutils flag-o-matic multilib multilib-minimal \
+ python-r1 toolchain-funcs pax-utils
+
+DESCRIPTION="Low Level Virtual Machine"
+HOMEPAGE="http://llvm.org/"
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.gz
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.gz
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.gz )
+ !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )"
+
+LICENSE="UoI-NCSA"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="clang debug doc gold kernel_FreeBSD +libffi multitarget ocaml python
+ +static-analyzer test udis86 vim-syntax video_cards_radeon"
+
+DEPEND="dev-lang/perl
+ >=sys-devel/make-3.79
+ >=sys-devel/flex-2.5.4
+ >=sys-devel/bison-1.875d
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 )
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 )
+ sys-libs/zlib
+ doc? ( dev-python/sphinx )
+ gold? ( >=sys-devel/binutils-2.22[cxx] )
+ libffi? ( virtual/pkgconfig
+ virtual/libffi[${MULTILIB_USEDEP}] )
+ ocaml? ( dev-lang/ocaml )
+ udis86? ( dev-libs/udis86[pic(+),${MULTILIB_USEDEP}] )
+ ${PYTHON_DEPS}"
+RDEPEND="dev-lang/perl
+ libffi? ( virtual/libffi[${MULTILIB_USEDEP}] )
+ clang? ( python? ( ${PYTHON_DEPS} ) )
+ udis86? ( dev-libs/udis86[pic(+),${MULTILIB_USEDEP}] )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
+ !<=sys-devel/clang-3.3-r99
+ !>=sys-devel/clang-9999
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+
+# pypy gives me around 1700 unresolved tests due to open file limit
+# being exceeded. probably GC does not close them fast enough.
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ test? ( || ( $(python_gen_useflags 'python*') ) )"
+
+S=${WORKDIR}/${P}.src
+
+pkg_setup() {
+ # need to check if the active compiler is ok
+
+ broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 "
+ broken_gcc_x86=" 3.4.0 3.4.2 "
+ broken_gcc_amd64=" 3.4.6 "
+
+ gcc_vers=$(gcc-fullversion)
+
+ if [[ ${broken_gcc} == *" ${version} "* ]] ; then
+ elog "Your version of gcc is known to miscompile llvm."
+ elog "Check http://www.llvm.org/docs/GettingStarted.html for"
+ elog "possible solutions."
+ die "Your currently active version of gcc is known to miscompile llvm"
+ fi
+
+ if [[ ${CHOST} == i*86-* && ${broken_gcc_x86} == *" ${version} "* ]] ; then
+ elog "Your version of gcc is known to miscompile llvm on x86"
+ elog "architectures. Check"
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible"
+ elog "solutions."
+ die "Your currently active version of gcc is known to miscompile llvm"
+ fi
+
+ if [[ ${CHOST} == x86_64-* && ${broken_gcc_amd64} == *" ${version} "* ]];
+ then
+ elog "Your version of gcc is known to miscompile llvm in amd64"
+ elog "architectures. Check"
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible"
+ elog "solutions."
+ die "Your currently active version of gcc is known to miscompile llvm"
+ fi
+}
+
+src_prepare() {
+ multilib_src_prepare() {
+ cd "${BUILD_DIR}" || die
+
+ # unfortunately ./configure won't listen to --mandir and the-like, so take
+ # care of this.
+ 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)/${PN}, \
+ -i Makefile.config.in || die "Makefile.config sed failed"
+ sed -e "/ActiveLibDir = ActivePrefix/s/lib/$(get_libdir)\/${PN}/" \
+ -i tools/llvm-config/llvm-config.cpp || die "llvm-config sed failed"
+
+ einfo "Fixing rpath and CFLAGS"
+ sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \
+ -e '/OmitFramePointer/s/-fomit-frame-pointer//' \
+ -i Makefile.rules || die "rpath sed failed"
+
+ if use clang; then
+ # Set correct path for the coverage lib
+ sed -e "s#lib\(/libprofile_rt.a\)#$(get_libdir)/llvm\1#" \
+ -i tools/clang/lib/Driver/Tools.cpp \
+ || die "driver tools paths sed failed"
+ fi
+ }
+
+ rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \
+ || die "symlinks removal failed"
+ mv "${WORKDIR}"/cfe-${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"
+
+
+ if use gold; then
+ sed -e 's,\$(SharedLibDir),'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \
+ -i tools/gold/Makefile || die "gold rpath sed failed"
+ fi
+
+ # FileCheck is needed at least for dragonegg tests
+ sed -e "/NO_INSTALL = 1/s/^/#/" -i utils/FileCheck/Makefile \
+ || die "FileCheck Makefile sed failed"
+
+ if use clang; then
+ # 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 "driver tools paths sed failed"
+
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913
+ epatch "${FILESDIR}"/clang-3.1-gentoo-runtime-gcc-detection-v3.patch
+
+ # Fix search paths on FreeBSD, bug #409269
+ # This patch causes problem for multilib on fbsd, see comments in the patch
+ # (aballier@g.o)
+ # epatch "${FILESDIR}"/clang-3.1-gentoo-freebsd-fix-lib-path.patch
+
+ # Fix regression caused by removal of USE=system-cxx-headers, bug #417541
+ # Needs to be updated for 3.2
+ #epatch "${FILESDIR}"/clang-3.1-gentoo-freebsd-fix-cxx-paths-v2.patch
+ fi
+
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch
+ epatch "${FILESDIR}"/${P}-R600_debug.patch
+
+ # User patches
+ epatch_user
+
+ multilib_copy_sources
+ multilib_foreach_abi multilib_src_prepare
+}
+
+multilib_src_configure() {
+ local CONF_FLAGS="--enable-keep-symbols
+ --enable-shared
+ --with-optimize-option=
+ $(use_enable !debug optimized)
+ $(use_enable debug assertions)
+ $(use_enable debug expensive-checks)"
+
+ if use clang; then
+ CONF_FLAGS+="
+ --with-clang-resource-dir=../lib/clang/${PV}"
+ fi
+
+ if use multitarget; then
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=all"
+ else
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=host,cpp"
+ fi
+
+ if [[ ${ABI} == amd64 ]]; then
+ CONF_FLAGS="${CONF_FLAGS} --enable-pic"
+ fi
+
+ if multilib_is_native_abi && use gold; then
+ CONF_FLAGS="${CONF_FLAGS} --with-binutils-include=${EPREFIX}/usr/include/"
+ fi
+ if multilib_is_native_abi && use ocaml; then
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml"
+ else
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none"
+ fi
+
+ if use udis86; then
+ CONF_FLAGS="${CONF_FLAGS} --with-udis86"
+ fi
+
+ if use video_cards_radeon; then
+ CONF_FLAGS="${CONF_FLAGS}
+ --enable-experimental-targets=R600"
+ fi
+
+ if use libffi; then
+ append-cppflags "$(pkg-config --cflags libffi)"
+ fi
+ CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)"
+
+ # build with a suitable Python version
+ python_export_best
+
+ # llvm prefers clang over gcc, so we may need to force that
+ tc-export CC CXX
+ econf ${CONF_FLAGS}
+}
+
+multilib_src_compile() {
+ local mymakeopts=(
+ VERBOSE=1
+ REQUIRES_RTTI=1
+ )
+
+ # Tests need all the LLVM built.
+ if multilib_is_native_abi || use test; then
+ emake "${mymakeopts[@]}"
+ else
+ # we need to build libs for llvm, then whole clang,
+ # since libs-only omits clang dir
+ # and clang fails to sub-compile with libs-only.
+ emake "${mymakeopts[@]}" libs-only
+ use clang && emake -C tools/clang "${mymakeopts[@]}"
+ fi
+
+ if multilib_is_native_abi && use doc; then
+ emake -C docs -f Makefile.sphinx man
+ emake -C docs -f Makefile.sphinx html
+ fi
+
+ if use debug; then
+ pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld
+ pax-mark m Debug+Asserts+Checks/bin/lli
+ else
+ pax-mark m Release/bin/llvm-rtdyld
+ pax-mark m Release/bin/lli
+ fi
+ if use test; then
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests
+ pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests
+ pax-mark m unittests/Support/Release/SupportTests
+ fi
+}
+
+multilib_src_test() {
+ default
+
+ use clang && emake -C tools/clang test
+}
+
+src_install() {
+ local MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/llvm/Config/config.h
+ /usr/include/llvm/Config/llvm-config.h
+ )
+
+ use clang && MULTILIB_WRAPPED_HEADERS+=(
+ /usr/include/clang/Config/config.h
+ )
+
+ multilib-minimal_src_install
+
+ # Remove unnecessary headers on FreeBSD, bug #417171
+ use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{arm_neon,std,float,iso,limits,tgmath,varargs}*.h
+}
+
+multilib_src_install() {
+ local mymakeopts=(
+ DESTDIR="${D}"
+ )
+
+ if multilib_is_native_abi; then
+ emake "${mymakeopts[@]}" install
+
+ # Move files back.
+ if path_exists -o "${ED}"/tmp/llvm-config.*; then
+ mv "${ED}"/tmp/llvm-config.* "${ED}"/usr/bin || die
+ fi
+ else
+ # we need to install libs for llvm, then whole clang
+ # since libs-only omits clang dir
+ # and clang install-libs doesn't install headers and stuff
+ # (we build it anyway, so install is not a problem)
+ emake "${mymakeopts[@]}" install-libs
+ use clang && emake -C tools/clang "${mymakeopts[@]}" install
+
+ # Preserve ABI-variant of llvm-config,
+ # then drop all the executables since LLVM doesn't like to
+ # clobber when installing.
+ mkdir -p "${ED}"/tmp || die
+ mv "${ED}"/usr/bin/llvm-config "${ED}"/tmp/llvm-config.${ABI} || die
+ rm -r "${ED}"/usr/bin || die
+ fi
+
+ if multilib_is_native_abi && use doc; then
+ # Note: use !doc is handled in multilib_src_install_all
+ doman docs/_build/man/*.1
+ dohtml -r docs/_build/html/
+ fi
+
+ if multilib_is_native_abi && use clang; then
+ cd tools/clang || die
+
+ 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
+ fi
+
+ python_inst() {
+ if use static-analyzer ; then
+ pushd tools/scan-view >/dev/null || die
+
+ python_doscript scan-view
+
+ touch __init__.py || die
+ python_moduleinto clang
+ python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py
+
+ popd >/dev/null || die
+ fi
+
+ if use python ; then
+ pushd bindings/python/clang >/dev/null || die
+
+ python_moduleinto clang
+ python_domodule __init__.py cindex.py enumerations.py
+
+ popd >/dev/null || die
+ fi
+
+ # AddressSanitizer symbolizer (currently separate)
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py
+ }
+ python_foreach_impl python_inst
+ fi
+
+ # Fix install_names on Darwin. The build system is too complicated
+ # to just fix this, so we correct it post-install
+ local lib= f= odylib= libpv=${PV}
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ eval $(grep PACKAGE_VERSION= configure)
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION}
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib {BugpointPasses,LLVMHello}.dylib ; do
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal
+ # + omit clang libs if not enabled
+ [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue
+
+ ebegin "fixing install_name of $lib"
+ install_name_tool \
+ -id "${EPREFIX}"/usr/lib/${PN}/${lib} \
+ "${ED}"/usr/lib/${PN}/${lib}
+ eend $?
+ done
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/lib{LTO,clang}.dylib ; do
+ # omit clang libs if not enabled
+ [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue
+
+ odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${libpv}.dylib)
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}"
+ install_name_tool \
+ -change "${odylib}" \
+ "${EPREFIX}"/usr/lib/${PN}/libLLVM-${libpv}.dylib \
+ -change "@rpath/libclang.dylib" \
+ "${EPREFIX}"/usr/lib/llvm/libclang.dylib \
+ -change "${S}"/Release/lib/libclang.dylib \
+ "${EPREFIX}"/usr/lib/llvm/libclang.dylib \
+ "${f}"
+ eend $?
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ use doc || doman "${WORKDIR}"/${P}-manpages/*.1
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins utils/vim/*.vim
+ fi
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] dev/mgorny:master commit in: sys-devel/llvm/files/, sys-devel/clang/, sys-devel/llvm/
@ 2013-07-21 15:34 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2013-07-21 15:34 UTC (permalink / raw
To: gentoo-commits
commit: 29e19875add788c4b551f42c15489cafd9c71cbe
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 21 15:34:31 2013 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul 21 15:34:31 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=29e19875
sys-devel/clang, sys-devel/llvm: Moved to the tree.
---
sys-devel/clang/clang-3.3-r100.ebuild | 20 -
sys-devel/clang/clang-9999-r100.ebuild | 20 -
sys-devel/clang/metadata.xml | 38 --
sys-devel/llvm/Manifest | 4 -
...clang-3.1-gentoo-runtime-gcc-detection-v3.patch | 29 --
.../llvm/files/clang-3.3-gentoo-install.patch | 71 ----
sys-devel/llvm/files/llvm-3.2-nodoctargz.patch | 45 ---
sys-devel/llvm/files/llvm-3.3-R600_debug.patch | 22 --
sys-devel/llvm/files/llvm-3.3-gentoo-install.patch | 149 --------
sys-devel/llvm/files/llvm-3.3-insecure-rpath.patch | 30 --
sys-devel/llvm/files/llvm-3.4-gentoo-install.patch | 145 --------
sys-devel/llvm/llvm-3.3-r1.ebuild | 403 ---------------------
sys-devel/llvm/llvm-9999-r1.ebuild | 374 -------------------
sys-devel/llvm/metadata.xml | 26 --
14 files changed, 1376 deletions(-)
diff --git a/sys-devel/clang/clang-3.3-r100.ebuild b/sys-devel/clang/clang-3.3-r100.ebuild
deleted file mode 100644
index 447fc8e..0000000
--- a/sys-devel/clang/clang-3.3-r100.ebuild
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header$
-
-EAPI=5
-
-DESCRIPTION="C language family frontend for LLVM (meta-ebuild)"
-HOMEPAGE="http://clang.llvm.org/"
-SRC_URI=""
-
-LICENSE="UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos"
-IUSE="debug multitarget python +static-analyzer"
-
-RDEPEND="~sys-devel/llvm-${PV}[clang(-),debug=,multitarget=,python=,static-analyzer=]"
-
-# Please keep this package around since it's quite likely that we'll
-# return to separate LLVM & clang ebuilds when the cmake build system
-# is complete.
diff --git a/sys-devel/clang/clang-9999-r100.ebuild b/sys-devel/clang/clang-9999-r100.ebuild
deleted file mode 100644
index 8691a84..0000000
--- a/sys-devel/clang/clang-9999-r100.ebuild
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header$
-
-EAPI=5
-
-DESCRIPTION="C language family frontend for LLVM (meta-ebuild)"
-HOMEPAGE="http://clang.llvm.org/"
-SRC_URI=""
-
-LICENSE="UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
-IUSE="debug multitarget python +static-analyzer"
-
-RDEPEND="~sys-devel/llvm-${PV}[clang(-),debug=,multitarget=,python=,static-analyzer=]"
-
-# Please keep this package around since it's quite likely that we'll
-# return to separate LLVM & clang ebuilds when the cmake build system
-# is complete.
diff --git a/sys-devel/clang/metadata.xml b/sys-devel/clang/metadata.xml
deleted file mode 100644
index 5e2e8e0..0000000
--- a/sys-devel/clang/metadata.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer>
- <email>voyageur@gentoo.org</email>
- <name>Bernard Cafarelli</name>
- </maintainer>
- <maintainer>
- <email>mgorny@gentoo.org</email>
- <name>Michał Górny</name>
- </maintainer>
- <maintainer>
- <email>ryao@gentoo.org</email>
- <name>Richard Yao</name>
- </maintainer>
- <longdescription>The goal of the Clang project is to create a new C, C++, Objective C and Objective C++ front-end for the LLVM compiler.
-
-Features and Goals
-
-Some of the goals for the project include the following:
-
-End-User Features:
-Fast compiles and low memory use
-Expressive diagnostics
-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</longdescription>
-</pkgmetadata>
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
deleted file mode 100644
index ad8ff49..0000000
--- a/sys-devel/llvm/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST cfe-3.3.src.tar.gz 9425539 SHA256 b1b55de4ab3a57d3e0331a83e0284610191c77d924e3446498d9113d08dfb996 SHA512 06773f43f7d3529f06edb029f7de398f06a700a0f2476e00c4727e70c291028221bfac23625dfd2c220d6ac91a21670848187a934b99a21801c695127371afcc WHIRLPOOL 8b97b527f19015dd3283b9e174615170e639793f64c635ccc4ee4d8216f8de759fd0121a8ef3513fa1c6ad19b31aa3529091ffb44a01ee858edfef400881596a
-DIST compiler-rt-3.3.src.tar.gz 1568034 SHA256 0e2f3180d6316e6c43f064fdd406c5c6515e682c5f31c57c28335b68c7525423 SHA512 3e86aa8ab9810b4fbac54a40fc93a717a55c642520858c0db215a5324c1e495b4d8fcec9620251cca8e4e5f9afa34bc14364d7f785880a0700469d0201827929 WHIRLPOOL fcfd06bc860dfd901a7576cd4309f863e9d4363e36ab4c67e9e08fe3c8a37d627ee95eb96b9ed53eb6047dec06e73181b3c3e1555b1b49f1e893e6382f21ddc1
-DIST llvm-3.3-manpages.tar.bz2 27098 SHA256 46bb22d63d5fe7dd04e1a7bb7e16c03d93f2ed51d31540cfb9d97ed70059aa77 SHA512 6f24b66b13025d0606908f91ad9b4fc6de1b4aac2d97d261f6b989065476cf153d2f84792f8dd4972b95fb1a45a3931c328df3bcf8ce5ab21170a7a912a39783 WHIRLPOOL 31b9c3635b698f404b75b87c7891b4b6be9cbeb6062bcb6fba5476b0b3069a486ba60c27ab2b12b8a2da9404f666617162041860f023951050a9fc4c7d27748a
-DIST llvm-3.3.src.tar.gz 13602421 SHA256 68766b1e70d05a25e2f502e997a3cb3937187a3296595cf6e0977d5cd6727578 SHA512 1b7f7c5e907a68f642dcbe48fdff9585cb1504022bc9d386f310ebe5d25103d0d5f7cf0abf19e0e3fd666970160a98c90033754e2b79b2fac0cf866c984f8038 WHIRLPOOL a89c0b470fde562a3402e7878b91bc0573d433ca0a60e62c9c46946d7948a4fb657b116b6bac032555e29c70d82c751876adb398fe240f5c8d0a9a2378ce1866
diff --git a/sys-devel/llvm/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch b/sys-devel/llvm/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch
deleted file mode 100644
index 49f1085..0000000
--- a/sys-devel/llvm/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch
+++ /dev/null
@@ -1,29 +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,25 @@ Generic_GCC::GCCInstallationDetector::GC
- Prefixes.push_back(D.InstalledDir + "/..");
- }
-
-+ llvm::OwningPtr<llvm::MemoryBuffer> File;
-+ for (unsigned k = 0, ke = CandidateTripleAliases.size(); k < ke; ++k) {
-+ if (!llvm::MemoryBuffer::getFile(D.SysRoot + "/etc/env.d/gcc/config-" + CandidateTripleAliases[k].str(), 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/" + CandidateTripleAliases[k].str() + "/" + VersionText;
-+ if (!llvm::sys::fs::exists(GentooPath + "/crtbegin.o", Exists) && Exists)
-+ {
-+ Version = GCCVersion::Parse(VersionText);
-+ GCCInstallPath = GentooPath;
-+ GCCParentLibPath = GCCInstallPath + "/../../..";
-+ GCCTriple.setTriple(CandidateTripleAliases[k]);
-+ 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");
diff --git a/sys-devel/llvm/files/clang-3.3-gentoo-install.patch b/sys-devel/llvm/files/clang-3.3-gentoo-install.patch
deleted file mode 100644
index b8291f2..0000000
--- a/sys-devel/llvm/files/clang-3.3-gentoo-install.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 1a539a8868070e49966c6b5f5e4b9f1257acd7dc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@mgorny.alt.pl>
-Date: Fri, 19 Jul 2013 10:23:57 +0200
-Subject: [PATCH] clang gentoo install
-
----
- tools/clang/lib/Driver/Tools.cpp | 4 ++--
- tools/clang/tools/scan-build/scan-build | 4 ++--
- tools/clang/tools/scan-view/scan-view | 2 +-
- 3 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/tools/clang/lib/Driver/Tools.cpp b/tools/clang/lib/Driver/Tools.cpp
-index e014980..6e60513 100644
---- a/tools/clang/lib/Driver/Tools.cpp
-+++ b/tools/clang/lib/Driver/Tools.cpp
-@@ -219,7 +219,7 @@ static void addProfileRT(const ToolChain &TC, const ArgList &Args,
- // 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) + "/../@libdir@/llvm/libprofile_rt.a";
-
- CmdArgs.push_back(Args.MakeArgString(ProfileRT));
- }
-@@ -6177,7 +6177,7 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA,
- // forward.
- if (D.IsUsingLTO(Args) || Args.hasArg(options::OPT_use_gold_plugin)) {
- CmdArgs.push_back("-plugin");
-- std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so";
-+ std::string Plugin = ToolChain.getDriver().Dir + "/../@libdir@/llvm/LLVMgold.so";
- CmdArgs.push_back(Args.MakeArgString(Plugin));
-
- // Try to pass driver level flags relevant to LTO code generation down to
-diff --git a/tools/clang/tools/scan-build/scan-build b/tools/clang/tools/scan-build/scan-build
-index 22d5289..dcb4822 100755
---- a/tools/clang/tools/scan-build/scan-build
-+++ b/tools/clang/tools/scan-build/scan-build
-@@ -410,7 +410,7 @@ sub CopyFiles {
-
- my $Dir = shift;
-
-- my $JS = Cwd::realpath("$RealBin/sorttable.js");
-+ my $JS = Cwd::realpath("@EPREFIX@/usr/share/llvm/sorttable.js");
-
- DieDiag("Cannot find 'sorttable.js'.\n")
- if (! -r $JS);
-@@ -420,7 +420,7 @@ sub CopyFiles {
- DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n")
- if (! -r "$Dir/sorttable.js");
-
-- my $CSS = Cwd::realpath("$RealBin/scanview.css");
-+ my $CSS = Cwd::realpath("@EPREFIX@/usr/share/llvm/scanview.css");
-
- DieDiag("Cannot find 'scanview.css'.\n")
- if (! -r $CSS);
-diff --git a/tools/clang/tools/scan-view/scan-view b/tools/clang/tools/scan-view/scan-view
-index fb27da6..1f8ddb8 100755
---- a/tools/clang/tools/scan-view/scan-view
-+++ b/tools/clang/tools/scan-view/scan-view
-@@ -54,7 +54,7 @@ def start_browser(port, options):
- webbrowser.open(url)
-
- def run(port, options, root):
-- import ScanView
-+ from clang import ScanView
- try:
- print 'Starting scan-view at: http://%s:%d'%(options.host,
- port)
---
-1.8.3.2
-
diff --git a/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch b/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch
deleted file mode 100644
index 3a622b5..0000000
--- a/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- docs/Makefile.orig 2012-04-30 17:00:01.000000000 +0200
-+++ docs/Makefile 2012-04-30 17:15:52.000000000 +0200
-@@ -52,11 +52,10 @@
- # 'make generated BUILD_FOR_WEBSITE=1'
- generated:: $(generated_targets)
-
--install-html: $(PROJ_OBJ_DIR)/html.tar.gz
-+install-html:
- $(Echo) Installing HTML documentation
- $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html
- $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html
-- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir)
-
- $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
- $(Echo) Packaging HTML documentation
-@@ -68,12 +67,11 @@
- install-doxygen: doxygen
- $(Echo) Installing doxygen documentation
- $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen
-- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir)
- $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \
- $(FIND) . -type f -exec \
- $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \;
-
--doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz
-+doxygen: regendoc
-
- regendoc:
- $(Echo) Building doxygen documentation
-@@ -99,7 +97,6 @@
- install-ocamldoc: ocamldoc
- $(Echo) Installing ocamldoc documentation
- $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html
-- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir)
- $(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \
- $(FIND) . -type f -exec \
- $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \;
-@@ -109,7 +106,6 @@
- $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar*
- $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc
- $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/ocamldoc.tar
-- $(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/
-
- regen-ocamldoc:
- $(Echo) Building ocamldoc documentation
diff --git a/sys-devel/llvm/files/llvm-3.3-R600_debug.patch b/sys-devel/llvm/files/llvm-3.3-R600_debug.patch
deleted file mode 100644
index b104273..0000000
--- a/sys-devel/llvm/files/llvm-3.3-R600_debug.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Fixes compilation of llvm-3.3 on gcc-4.6 and 4.7 when VIDEO_CARDS=radeon
-
-This issue is caused because although Q is a multiset the original code tries to get
-a set iterator which can't be converted in a multiset one.
-
-The fix is as simple as just using a multiset iterator.
-
-Patch by Francisco Blas Izquierdo Riera (klondike)
-Consider the changes in the Public Domain
-https://bugs.gentoo.org/show_bug.cgi?id=474096
-
---- lib/Target/R600/R600MachineScheduler.cpp
-+++ lib/Target/R600/R600MachineScheduler.cpp
-@@ -290,7 +290,7 @@
- SUnit *R600SchedStrategy::PopInst(std::multiset<SUnit *, CompareSUnit> &Q) {
- if (Q.empty())
- return NULL;
-- for (std::set<SUnit *, CompareSUnit>::iterator It = Q.begin(), E = Q.end();
-+ for (std::multiset<SUnit *, CompareSUnit>::iterator It = Q.begin(), E = Q.end();
- It != E; ++It) {
- SUnit *SU = *It;
- InstructionsGroupCandidate.push_back(SU->getInstr());
diff --git a/sys-devel/llvm/files/llvm-3.3-gentoo-install.patch b/sys-devel/llvm/files/llvm-3.3-gentoo-install.patch
deleted file mode 100644
index 8b19353..0000000
--- a/sys-devel/llvm/files/llvm-3.3-gentoo-install.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From 378109dbae7e4772d9b096384904c638a6a34028 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@mgorny.alt.pl>
-Date: Fri, 19 Jul 2013 10:10:52 +0200
-Subject: [PATCH 1/2] gentoo install fixes
-
----
- Makefile.config.in | 6 +++---
- Makefile.rules | 7 +++----
- tools/gold/Makefile | 2 +-
- tools/llvm-config/BuildVariables.inc.in | 2 ++
- tools/llvm-config/Makefile | 4 ++++
- tools/llvm-config/llvm-config.cpp | 5 +++--
- utils/FileCheck/Makefile | 2 +-
- 7 files changed, 17 insertions(+), 11 deletions(-)
-
-diff --git a/Makefile.config.in b/Makefile.config.in
-index fd4f6ef..5634ecc 100644
---- a/Makefile.config.in
-+++ b/Makefile.config.in
-@@ -95,10 +95,10 @@ PROJ_internal_prefix := $(prefix)
- endif
-
- PROJ_bindir := $(PROJ_prefix)/bin
--PROJ_libdir := $(PROJ_prefix)/lib
-+PROJ_libdir := $(PROJ_prefix)/$(GENTOO_LIBDIR)/llvm
- PROJ_datadir := $(PROJ_prefix)/share
--PROJ_docsdir := $(PROJ_prefix)/docs/llvm
--PROJ_etcdir := $(PROJ_prefix)/etc/llvm
-+PROJ_docsdir := $(PROJ_prefix)/share/doc/@PF@
-+PROJ_etcdir := @EPREFIX@/etc/llvm
- PROJ_includedir := $(PROJ_prefix)/include
- PROJ_infodir := $(PROJ_prefix)/info
- PROJ_mandir := $(PROJ_prefix)/share/man
-diff --git a/Makefile.rules b/Makefile.rules
-index f0c542b..db252f7 100644
---- a/Makefile.rules
-+++ b/Makefile.rules
-@@ -276,7 +276,7 @@ ifeq ($(ENABLE_OPTIMIZED),1)
- # Don't use -fomit-frame-pointer on Darwin or FreeBSD.
- ifneq ($(HOST_OS),FreeBSD)
- ifneq ($(HOST_OS),Darwin)
-- OmitFramePointer := -fomit-frame-pointer
-+ OmitFramePointer :=
- endif
- endif
-
-@@ -601,7 +601,6 @@ endif
- ifdef SHARED_LIBRARY
- ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
- ifneq ($(HOST_OS),Darwin)
-- LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
- endif
- endif
- endif
-@@ -639,7 +638,7 @@ endif
- ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
- ifneq ($(HOST_OS), Darwin)
- ifdef TOOLNAME
-- LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
-+ LD.Flags += $(RPATH) -Wl,'$(PROJ_libdir)'
- ifdef EXAMPLE_TOOL
- LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag)
- else
-@@ -648,7 +647,7 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
- endif
- else
- ifneq ($(DARWIN_MAJVERS),4)
-- LD.Flags += $(RPATH) -Wl,@executable_path/../lib
-+ LD.Flags += $(RPATH) -Wl,'$(PROJ_libdir)'
- endif
- ifeq ($(RC_XBS),YES)
- TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/llvm-lto.XXXXXX)
-diff --git a/tools/gold/Makefile b/tools/gold/Makefile
-index 496e31c..d36b340 100644
---- a/tools/gold/Makefile
-+++ b/tools/gold/Makefile
-@@ -24,7 +24,7 @@ include $(LEVEL)/Makefile.config
- # Because off_t is used in the public API, the largefile parts are required for
- # ABI compatibility.
- CXXFLAGS += -I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
--LDFLAGS += -L$(SharedLibDir)/$(SharedPrefix)
-+LDFLAGS += -L$(PROJ_libdir)
-
- include $(LEVEL)/Makefile.common
-
-diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
-index fe87afb..fd9f2c6 100644
---- a/tools/llvm-config/BuildVariables.inc.in
-+++ b/tools/llvm-config/BuildVariables.inc.in
-@@ -25,3 +25,5 @@
- #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
- #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
- #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
-+#define LLVM_RPATH "@LLVM_RPATH@"
-+#define LLVM_LIBDIR "@LLVM_LIBDIR@"
-diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile
-index b20b6bf..fc56781 100644
---- a/tools/llvm-config/Makefile
-+++ b/tools/llvm-config/Makefile
-@@ -55,6 +55,10 @@ $(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir
- >> temp.sed
- $(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \
- >> temp.sed
-+ $(Verb) $(ECHO) 's/@LLVM_RPATH@/$(subst /,\/,$(RPATH))/' \
-+ >> temp.sed
-+ $(Verb) $(ECHO) 's/@LLVM_LIBDIR@/$(subst /,\/,$(GENTOO_LIBDIR))/' \
-+ >> temp.sed
- $(Verb) $(SED) -f temp.sed < $< > $@
- $(Verb) $(RM) temp.sed
-
-diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
-index 7edf5ec..4541c28 100644
---- a/tools/llvm-config/llvm-config.cpp
-+++ b/tools/llvm-config/llvm-config.cpp
-@@ -250,7 +250,7 @@ int main(int argc, char **argv) {
- ActivePrefix = CurrentExecPrefix;
- ActiveIncludeDir = ActivePrefix + "/include";
- ActiveBinDir = ActivePrefix + "/bin";
-- ActiveLibDir = ActivePrefix + "/lib";
-+ ActiveLibDir = ActivePrefix + "/" LLVM_LIBDIR "/llvm";
- ActiveIncludeOption = "-I" + ActiveIncludeDir;
- }
-
-@@ -277,7 +277,8 @@ int main(int argc, char **argv) {
- } else if (Arg == "--cxxflags") {
- OS << ActiveIncludeOption << ' ' << LLVM_CXXFLAGS << '\n';
- } else if (Arg == "--ldflags") {
-- OS << "-L" << ActiveLibDir << ' ' << LLVM_LDFLAGS
-+ OS << "-L" << ActiveLibDir << ' '
-+ << LLVM_RPATH << " -Wl," << ActiveLibDir << ' ' << LLVM_LDFLAGS
- << ' ' << LLVM_SYSTEM_LIBS << '\n';
- } else if (Arg == "--libs") {
- PrintLibs = true;
-diff --git a/utils/FileCheck/Makefile b/utils/FileCheck/Makefile
-index 268b7bc..e7674f9 100644
---- a/utils/FileCheck/Makefile
-+++ b/utils/FileCheck/Makefile
-@@ -15,7 +15,7 @@ USEDLIBS = LLVMSupport.a
- TOOL_NO_EXPORTS = 1
-
- # Don't install this utility
--NO_INSTALL = 1
-+#NO_INSTALL = 1
-
- include $(LEVEL)/Makefile.common
-
---
-1.8.3.2
-
diff --git a/sys-devel/llvm/files/llvm-3.3-insecure-rpath.patch b/sys-devel/llvm/files/llvm-3.3-insecure-rpath.patch
deleted file mode 100644
index 659f237..0000000
--- a/sys-devel/llvm/files/llvm-3.3-insecure-rpath.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From d23d21bc76693dd2a43b5d76c68972ac01a055ba Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@mgorny.alt.pl>
-Date: Sat, 20 Jul 2013 15:56:56 +0200
-Subject: [PATCH] Remove insecure RUNPATHs.
-
-LLVM seems to build fine without them, and they were removed for 3.4
-already.
----
- Makefile.rules | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/Makefile.rules b/Makefile.rules
-index db252f7..a29481b 100644
---- a/Makefile.rules
-+++ b/Makefile.rules
-@@ -639,11 +639,6 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
- ifneq ($(HOST_OS), Darwin)
- ifdef TOOLNAME
- LD.Flags += $(RPATH) -Wl,'$(PROJ_libdir)'
-- ifdef EXAMPLE_TOOL
-- LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag)
-- else
-- LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag)
-- endif
- endif
- else
- ifneq ($(DARWIN_MAJVERS),4)
---
-1.8.3.2
-
diff --git a/sys-devel/llvm/files/llvm-3.4-gentoo-install.patch b/sys-devel/llvm/files/llvm-3.4-gentoo-install.patch
deleted file mode 100644
index 659486a..0000000
--- a/sys-devel/llvm/files/llvm-3.4-gentoo-install.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From be2ee7ba7ab4c1aec86d3d9e49e1be241afd8abd Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@mgorny.alt.pl>
-Date: Fri, 19 Jul 2013 10:10:52 +0200
-Subject: [PATCH 1/2] gentoo install fixes
-
----
- Makefile.config.in | 6 +++---
- Makefile.rules | 7 +++----
- tools/gold/Makefile | 2 +-
- tools/llvm-config/BuildVariables.inc.in | 2 ++
- tools/llvm-config/Makefile | 4 ++++
- tools/llvm-config/llvm-config.cpp | 5 +++--
- utils/FileCheck/Makefile | 2 +-
- 7 files changed, 17 insertions(+), 11 deletions(-)
-
-diff --git a/Makefile.config.in b/Makefile.config.in
-index dcca45f..e75ae2e 100644
---- a/Makefile.config.in
-+++ b/Makefile.config.in
-@@ -95,10 +95,10 @@ PROJ_internal_prefix := $(prefix)
- endif
-
- PROJ_bindir := $(PROJ_prefix)/bin
--PROJ_libdir := $(PROJ_prefix)/lib
-+PROJ_libdir := $(PROJ_prefix)/$(GENTOO_LIBDIR)/llvm
- PROJ_datadir := $(PROJ_prefix)/share
--PROJ_docsdir := $(PROJ_prefix)/docs/llvm
--PROJ_etcdir := $(PROJ_prefix)/etc/llvm
-+PROJ_docsdir := $(PROJ_prefix)/share/doc/@PF@
-+PROJ_etcdir := @EPREFIX@/etc/llvm
- PROJ_includedir := $(PROJ_prefix)/include
- PROJ_infodir := $(PROJ_prefix)/info
- PROJ_mandir := $(PROJ_prefix)/share/man
-diff --git a/Makefile.rules b/Makefile.rules
-index 1bc78f1..60cd228 100644
---- a/Makefile.rules
-+++ b/Makefile.rules
-@@ -277,7 +277,7 @@ ifeq ($(ENABLE_OPTIMIZED),1)
- ifneq ($(HOST_OS),FreeBSD)
- ifneq ($(HOST_OS),GNU/kFreeBSD)
- ifneq ($(HOST_OS),Darwin)
-- OmitFramePointer := -fomit-frame-pointer
-+ OmitFramePointer :=
- endif
- endif
- endif
-@@ -605,7 +605,6 @@ endif
- ifdef SHARED_LIBRARY
- ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
- ifneq ($(HOST_OS),Darwin)
-- LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
- endif
- endif
- endif
-@@ -643,11 +642,11 @@ endif
- ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
- ifneq ($(HOST_OS), Darwin)
- ifdef TOOLNAME
-- LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' $(DynamicFlag)
-+ LD.Flags += $(RPATH) -Wl,'$(PROJ_libdir)' $(DynamicFlag)
- endif
- else
- ifneq ($(DARWIN_MAJVERS),4)
-- LD.Flags += $(RPATH) -Wl,@executable_path/../lib
-+ LD.Flags += $(RPATH) -Wl,'$(PROJ_libdir)'
- endif
- ifeq ($(RC_XBS),YES)
- TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/llvm-lto.XXXXXX)
-diff --git a/tools/gold/Makefile b/tools/gold/Makefile
-index 496e31c..d36b340 100644
---- a/tools/gold/Makefile
-+++ b/tools/gold/Makefile
-@@ -24,7 +24,7 @@ include $(LEVEL)/Makefile.config
- # Because off_t is used in the public API, the largefile parts are required for
- # ABI compatibility.
- CXXFLAGS += -I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
--LDFLAGS += -L$(SharedLibDir)/$(SharedPrefix)
-+LDFLAGS += -L$(PROJ_libdir)
-
- include $(LEVEL)/Makefile.common
-
-diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
-index fe87afb..fd9f2c6 100644
---- a/tools/llvm-config/BuildVariables.inc.in
-+++ b/tools/llvm-config/BuildVariables.inc.in
-@@ -25,3 +25,5 @@
- #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
- #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
- #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
-+#define LLVM_RPATH "@LLVM_RPATH@"
-+#define LLVM_LIBDIR "@LLVM_LIBDIR@"
-diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile
-index b20b6bf..fc56781 100644
---- a/tools/llvm-config/Makefile
-+++ b/tools/llvm-config/Makefile
-@@ -55,6 +55,10 @@ $(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir
- >> temp.sed
- $(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \
- >> temp.sed
-+ $(Verb) $(ECHO) 's/@LLVM_RPATH@/$(subst /,\/,$(RPATH))/' \
-+ >> temp.sed
-+ $(Verb) $(ECHO) 's/@LLVM_LIBDIR@/$(subst /,\/,$(GENTOO_LIBDIR))/' \
-+ >> temp.sed
- $(Verb) $(SED) -f temp.sed < $< > $@
- $(Verb) $(RM) temp.sed
-
-diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
-index 3924e2e..f439c60 100644
---- a/tools/llvm-config/llvm-config.cpp
-+++ b/tools/llvm-config/llvm-config.cpp
-@@ -250,7 +250,7 @@ int main(int argc, char **argv) {
- ActivePrefix = CurrentExecPrefix;
- ActiveIncludeDir = ActivePrefix + "/include";
- ActiveBinDir = ActivePrefix + "/bin";
-- ActiveLibDir = ActivePrefix + "/lib";
-+ ActiveLibDir = ActivePrefix + "/" LLVM_LIBDIR "/llvm";
- ActiveIncludeOption = "-I" + ActiveIncludeDir;
- }
-
-@@ -277,7 +277,8 @@ int main(int argc, char **argv) {
- } else if (Arg == "--cxxflags") {
- OS << ActiveIncludeOption << ' ' << LLVM_CXXFLAGS << '\n';
- } else if (Arg == "--ldflags") {
-- OS << "-L" << ActiveLibDir << ' ' << LLVM_LDFLAGS
-+ OS << "-L" << ActiveLibDir << ' '
-+ << LLVM_RPATH << " -Wl," << ActiveLibDir << ' ' << LLVM_LDFLAGS
- << ' ' << LLVM_SYSTEM_LIBS << '\n';
- } else if (Arg == "--libs") {
- PrintLibs = true;
-diff --git a/utils/FileCheck/Makefile b/utils/FileCheck/Makefile
-index 268b7bc..e7674f9 100644
---- a/utils/FileCheck/Makefile
-+++ b/utils/FileCheck/Makefile
-@@ -15,7 +15,7 @@ USEDLIBS = LLVMSupport.a
- TOOL_NO_EXPORTS = 1
-
- # Don't install this utility
--NO_INSTALL = 1
-+#NO_INSTALL = 1
-
- include $(LEVEL)/Makefile.common
-
---
-1.8.3.2
-
diff --git a/sys-devel/llvm/llvm-3.3-r1.ebuild b/sys-devel/llvm/llvm-3.3-r1.ebuild
deleted file mode 100644
index 6fd495f..0000000
--- a/sys-devel/llvm/llvm-3.3-r1.ebuild
+++ /dev/null
@@ -1,403 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header$
-
-EAPI=5
-
-PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_9,2_0} )
-
-inherit eutils flag-o-matic multilib multilib-minimal \
- python-r1 toolchain-funcs pax-utils
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="http://llvm.org/"
-SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.gz
- clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.gz
- http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.gz )
- !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )"
-
-LICENSE="UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos"
-IUSE="clang debug doc gold kernel_FreeBSD +libffi multitarget ocaml python
- +static-analyzer test udis86 video_cards_radeon"
-
-DEPEND="dev-lang/perl
- >=sys-devel/make-3.79
- >=sys-devel/flex-2.5.4
- >=sys-devel/bison-1.875d
- || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 )
- || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 )
- sys-libs/zlib
- doc? ( dev-python/sphinx )
- gold? ( >=sys-devel/binutils-2.22[cxx] )
- libffi? ( virtual/pkgconfig
- virtual/libffi[${MULTILIB_USEDEP}] )
- ocaml? ( dev-lang/ocaml )
- udis86? ( dev-libs/udis86[pic(+),${MULTILIB_USEDEP}] )
- ${PYTHON_DEPS}"
-RDEPEND="dev-lang/perl
- libffi? ( virtual/libffi[${MULTILIB_USEDEP}] )
- clang? ( python? ( ${PYTHON_DEPS} ) )
- udis86? ( dev-libs/udis86[pic(+),${MULTILIB_USEDEP}] )
- clang? ( !<=sys-devel/clang-3.3-r99
- !>=sys-devel/clang-9999 )
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-# pypy gives me around 1700 unresolved tests due to open file limit
-# being exceeded. probably GC does not close them fast enough.
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- test? ( || ( $(python_gen_useflags 'python*') ) )"
-
-S=${WORKDIR}/${P}.src
-
-pkg_setup() {
- # need to check if the active compiler is ok
-
- broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 "
- broken_gcc_x86=" 3.4.0 3.4.2 "
- broken_gcc_amd64=" 3.4.6 "
-
- gcc_vers=$(gcc-fullversion)
-
- if [[ ${broken_gcc} == *" ${version} "* ]] ; then
- elog "Your version of gcc is known to miscompile llvm."
- elog "Check http://www.llvm.org/docs/GettingStarted.html for"
- elog "possible solutions."
- die "Your currently active version of gcc is known to miscompile llvm"
- fi
-
- if [[ ${CHOST} == i*86-* && ${broken_gcc_x86} == *" ${version} "* ]] ; then
- elog "Your version of gcc is known to miscompile llvm on x86"
- elog "architectures. Check"
- elog "http://www.llvm.org/docs/GettingStarted.html for possible"
- elog "solutions."
- die "Your currently active version of gcc is known to miscompile llvm"
- fi
-
- if [[ ${CHOST} == x86_64-* && ${broken_gcc_amd64} == *" ${version} "* ]];
- then
- elog "Your version of gcc is known to miscompile llvm in amd64"
- elog "architectures. Check"
- elog "http://www.llvm.org/docs/GettingStarted.html for possible"
- elog "solutions."
- die "Your currently active version of gcc is known to miscompile llvm"
- fi
-}
-
-src_unpack() {
- default
-
- rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \
- || die "symlinks removal failed"
-
- if use clang; then
- mv "${WORKDIR}"/cfe-${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"
- fi
-}
-
-src_prepare() {
- if use clang; then
- # Automatically select active system GCC's libraries, bugs #406163 and #417913
- epatch "${FILESDIR}"/clang-3.1-gentoo-runtime-gcc-detection-v3.patch
-
- # Fix search paths on FreeBSD, bug #409269
- # This patch causes problem for multilib on fbsd, see comments in the patch
- # (aballier@g.o)
- # epatch "${FILESDIR}"/clang-3.1-gentoo-freebsd-fix-lib-path.patch
-
- # Fix regression caused by removal of USE=system-cxx-headers, bug #417541
- # Needs to be updated for 3.2
- #epatch "${FILESDIR}"/clang-3.1-gentoo-freebsd-fix-cxx-paths-v2.patch
- fi
-
- epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch
- epatch "${FILESDIR}"/${P}-R600_debug.patch
- epatch "${FILESDIR}"/${PN}-3.3-gentoo-install.patch
- use clang && epatch "${FILESDIR}"/clang-3.3-gentoo-install.patch
-
- # Fix insecure RPATHs that were removed upstream already.
- epatch "${FILESDIR}"/${P}-insecure-rpath.patch
-
- local sub_files=(
- Makefile.config.in
- Makefile.rules
- tools/llvm-config/llvm-config.cpp
- )
- use clang && sub_files+=(
- tools/clang/lib/Driver/Tools.cpp
- tools/clang/tools/scan-build/scan-build
- )
-
- # unfortunately ./configure won't listen to --mandir and the-like, so take
- # care of this.
- # note: we're setting the main libdir intentionally.
- # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make.
- einfo "Fixing install dirs"
- sed -e "s,@libdir@,$(get_libdir),g" \
- -e "s,@PF@,${PF},g" \
- -e "s,@EPREFIX@,${EPREFIX},g" \
- -i "${sub_files[@]}" \
- || die "install paths sed failed"
-
- # User patches
- epatch_user
-}
-
-llvm_add_ldpath() {
- # Add LLVM built libraries to LD_LIBRARY_PATH.
- # This way we don't have to hack RPATHs of executables.
- local libpath
- if use debug; then
- libpath=${BUILD_DIR}/Debug+Asserts+Checks/lib
- else
- libpath=${BUILD_DIR}/Release/lib
- fi
-
- export LD_LIBRARY_PATH=${libpath}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
-}
-
-multilib_src_configure() {
- local CONF_FLAGS="--enable-keep-symbols
- --enable-shared
- --with-optimize-option=
- $(use_enable !debug optimized)
- $(use_enable debug assertions)
- $(use_enable debug expensive-checks)"
-
- if use clang; then
- CONF_FLAGS+="
- --with-clang-resource-dir=../lib/clang/${PV}"
- fi
-
- if use multitarget; then
- CONF_FLAGS="${CONF_FLAGS} --enable-targets=all"
- else
- CONF_FLAGS="${CONF_FLAGS} --enable-targets=host,cpp"
- fi
-
- if [[ ${ABI} == amd64 ]]; then
- CONF_FLAGS="${CONF_FLAGS} --enable-pic"
- fi
-
- if multilib_is_native_abi && use gold; then
- CONF_FLAGS="${CONF_FLAGS} --with-binutils-include=${EPREFIX}/usr/include/"
- fi
- if multilib_is_native_abi && use ocaml; then
- CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml"
- else
- CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none"
- fi
-
- if use udis86; then
- CONF_FLAGS="${CONF_FLAGS} --with-udis86"
- fi
-
- if use video_cards_radeon; then
- CONF_FLAGS="${CONF_FLAGS}
- --enable-experimental-targets=R600"
- fi
-
- if use libffi; then
- append-cppflags "$(pkg-config --cflags libffi)"
- fi
- CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)"
-
- # build with a suitable Python version
- python_export_best
-
- # llvm prefers clang over gcc, so we may need to force that
- tc-export CC CXX
-
- ECONF_SOURCE=${S} \
- econf ${CONF_FLAGS}
-}
-
-multilib_src_compile() {
- local mymakeopts=(
- VERBOSE=1
- REQUIRES_RTTI=1
- GENTOO_LIBDIR="$(get_libdir)"
- )
-
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
- llvm_add_ldpath
-
- # Tests need all the LLVM built.
- if multilib_is_native_abi || use test; then
- emake "${mymakeopts[@]}"
- else
- # we need to build libs for llvm, then whole clang,
- # since libs-only omits clang dir
- # and clang fails to sub-compile with libs-only.
- emake "${mymakeopts[@]}" libs-only
- use clang && emake -C tools/clang "${mymakeopts[@]}"
- fi
-
- if multilib_is_native_abi && use doc; then
- emake -C "${S}"/docs -f Makefile.sphinx man html
- fi
-
- if use debug; then
- pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld
- pax-mark m Debug+Asserts+Checks/bin/lli
- else
- pax-mark m Release/bin/llvm-rtdyld
- pax-mark m Release/bin/lli
- fi
- if use test; then
- pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests
- pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests
- pax-mark m unittests/Support/Release/SupportTests
- fi
-}
-
-multilib_src_test() {
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
- llvm_add_ldpath
-
- default
-
- use clang && emake -C tools/clang test
-}
-
-src_install() {
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/config.h
- /usr/include/llvm/Config/llvm-config.h
- )
-
- use clang && MULTILIB_WRAPPED_HEADERS+=(
- /usr/include/clang/Config/config.h
- )
-
- multilib-minimal_src_install
-
- # Remove unnecessary headers on FreeBSD, bug #417171
- use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{arm_neon,std,float,iso,limits,tgmath,varargs}*.h
-}
-
-multilib_src_install() {
- local mymakeopts=(
- DESTDIR="${D}"
- GENTOO_LIBDIR="$(get_libdir)"
- )
-
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
- llvm_add_ldpath
-
- if multilib_is_native_abi; then
- emake "${mymakeopts[@]}" install
-
- # Move files back.
- if path_exists -o "${ED}"/tmp/llvm-config.*; then
- mv "${ED}"/tmp/llvm-config.* "${ED}"/usr/bin || die
- fi
- else
- # we need to install libs for llvm, then whole clang
- # since libs-only omits clang dir
- # and clang install-libs doesn't install headers and stuff
- # (we build it anyway, so install is not a problem)
- emake "${mymakeopts[@]}" install-libs
- use clang && emake -C tools/clang "${mymakeopts[@]}" install
-
- # Preserve ABI-variant of llvm-config,
- # then drop all the executables since LLVM doesn't like to
- # clobber when installing.
- mkdir -p "${ED}"/tmp || die
- mv "${ED}"/usr/bin/llvm-config "${ED}"/tmp/llvm-config.${ABI} || die
- rm -r "${ED}"/usr/bin || die
- fi
-
- # Fix install_names on Darwin. The build system is too complicated
- # to just fix this, so we correct it post-install
- local lib= f= odylib= libpv=${PV}
- if [[ ${CHOST} == *-darwin* ]] ; then
- eval $(grep PACKAGE_VERSION= configure)
- [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION}
- for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib {BugpointPasses,LLVMHello}.dylib ; do
- # libEnhancedDisassembly is Darwin10 only, so non-fatal
- # + omit clang libs if not enabled
- [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue
-
- ebegin "fixing install_name of $lib"
- install_name_tool \
- -id "${EPREFIX}"/usr/lib/${PN}/${lib} \
- "${ED}"/usr/lib/${PN}/${lib}
- eend $?
- done
- for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/lib{LTO,clang}.dylib ; do
- # omit clang libs if not enabled
- [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue
-
- odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${libpv}.dylib)
- ebegin "fixing install_name reference to ${odylib} of ${f##*/}"
- install_name_tool \
- -change "${odylib}" \
- "${EPREFIX}"/usr/lib/${PN}/libLLVM-${libpv}.dylib \
- -change "@rpath/libclang.dylib" \
- "${EPREFIX}"/usr/lib/llvm/libclang.dylib \
- -change "${S}"/Release/lib/libclang.dylib \
- "${EPREFIX}"/usr/lib/llvm/libclang.dylib \
- "${f}"
- eend $?
- done
- fi
-}
-
-multilib_src_install_all() {
- if use doc; then
- doman docs/_build/man/*.1
- dohtml -r docs/_build/html/
- else
- doman "${WORKDIR}"/${P}-manpages/*.1
- fi
-
- insinto /usr/share/vim/vimfiles/syntax
- doins utils/vim/*.vim
-
- if use clang; then
- cd tools/clang || die
-
- 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
- fi
-
- python_inst() {
- if use static-analyzer ; then
- pushd tools/scan-view >/dev/null || die
-
- python_doscript scan-view
-
- touch __init__.py || die
- python_moduleinto clang
- python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py
-
- popd >/dev/null || die
- fi
-
- if use python ; then
- pushd bindings/python/clang >/dev/null || die
-
- python_moduleinto clang
- python_domodule __init__.py cindex.py enumerations.py
-
- popd >/dev/null || die
- fi
-
- # AddressSanitizer symbolizer (currently separate)
- python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py
- }
- python_foreach_impl python_inst
- fi
-}
diff --git a/sys-devel/llvm/llvm-9999-r1.ebuild b/sys-devel/llvm/llvm-9999-r1.ebuild
deleted file mode 100644
index ae6bbb5..0000000
--- a/sys-devel/llvm/llvm-9999-r1.ebuild
+++ /dev/null
@@ -1,374 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header$
-
-EAPI=5
-
-PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_9,2_0} )
-
-inherit subversion eutils flag-o-matic multilib multilib-minimal \
- python-r1 toolchain-funcs pax-utils
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="http://llvm.org/"
-SRC_URI=""
-ESVN_REPO_URI="http://llvm.org/svn/llvm-project/llvm/trunk"
-
-LICENSE="UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
-IUSE="clang debug doc gold +libffi multitarget ocaml python
- +static-analyzer test udis86 video_cards_radeon"
-
-DEPEND="dev-lang/perl
- dev-python/sphinx
- >=sys-devel/make-3.79
- >=sys-devel/flex-2.5.4
- >=sys-devel/bison-1.875d
- || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 )
- || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 )
- sys-libs/zlib
- gold? ( >=sys-devel/binutils-2.22[cxx] )
- libffi? ( virtual/pkgconfig
- virtual/libffi[${MULTILIB_USEDEP}] )
- ocaml? ( dev-lang/ocaml )
- udis86? ( dev-libs/udis86[pic(+),${MULTILIB_USEDEP}] )
- ${PYTHON_DEPS}"
-RDEPEND="dev-lang/perl
- libffi? ( virtual/libffi[${MULTILIB_USEDEP}] )
- clang? ( python? ( ${PYTHON_DEPS} ) )
- udis86? ( dev-libs/udis86[pic(+),${MULTILIB_USEDEP}] )
- clang? ( !<=sys-devel/clang-9999-r99 )
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-# pypy gives me around 1700 unresolved tests due to open file limit
-# being exceeded. probably GC does not close them fast enough.
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- test? ( || ( $(python_gen_useflags 'python*') ) )"
-
-pkg_setup() {
- # need to check if the active compiler is ok
-
- broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 "
- broken_gcc_x86=" 3.4.0 3.4.2 "
- broken_gcc_amd64=" 3.4.6 "
-
- gcc_vers=$(gcc-fullversion)
-
- if [[ ${broken_gcc} == *" ${version} "* ]] ; then
- elog "Your version of gcc is known to miscompile llvm."
- elog "Check http://www.llvm.org/docs/GettingStarted.html for"
- elog "possible solutions."
- die "Your currently active version of gcc is known to miscompile llvm"
- fi
-
- if [[ ${CHOST} == i*86-* && ${broken_gcc_x86} == *" ${version} "* ]] ; then
- elog "Your version of gcc is known to miscompile llvm on x86"
- elog "architectures. Check"
- elog "http://www.llvm.org/docs/GettingStarted.html for possible"
- elog "solutions."
- die "Your currently active version of gcc is known to miscompile llvm"
- fi
-
- if [[ ${CHOST} == x86_64-* && ${broken_gcc_amd64} == *" ${version} "* ]];
- then
- elog "Your version of gcc is known to miscompile llvm in amd64"
- elog "architectures. Check"
- elog "http://www.llvm.org/docs/GettingStarted.html for possible"
- elog "solutions."
- die "Your currently active version of gcc is known to miscompile llvm"
- fi
-}
-
-src_unpack() {
- if use clang; then
- ESVN_PROJECT=compiler-rt S="${S}"/projects/compiler-rt subversion_fetch "http://llvm.org/svn/llvm-project/compiler-rt/trunk"
-
- # Force version match between LLVM, compiler-rt & clang
- # but first work-around subversion.eclass smartness, bug #282486.
- subversion_wc_info "http://llvm.org/svn/llvm-project/compiler-rt/trunk"
- local ESVN_REVISION=${ESVN_WC_REVISION}
-
- ESVN_PROJECT=clang S="${S}"/tools/clang subversion_fetch "http://llvm.org/svn/llvm-project/cfe/trunk"
- fi
-
- # Do llvm last so that ESVN_WC_* is top-level.
- subversion_src_unpack
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch
- epatch "${FILESDIR}"/${PN}-3.4-gentoo-install.patch
- use clang && epatch "${FILESDIR}"/clang-3.3-gentoo-install.patch
-
- local sub_files=(
- Makefile.config.in
- Makefile.rules
- tools/llvm-config/llvm-config.cpp
- )
- use clang && sub_files+=(
- tools/clang/lib/Driver/Tools.cpp
- tools/clang/tools/scan-build/scan-build
- )
-
- # unfortunately ./configure won't listen to --mandir and the-like, so take
- # care of this.
- # note: we're setting the main libdir intentionally.
- # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make.
- einfo "Fixing install dirs"
- sed -e "s,@libdir@,$(get_libdir),g" \
- -e "s,@PF@,${PF},g" \
- -e "s,@EPREFIX@,${EPREFIX},g" \
- -i "${sub_files[@]}" \
- || die "install paths sed failed"
-
- # User patches
- epatch_user
-}
-
-llvm_add_ldpath() {
- # Add LLVM built libraries to LD_LIBRARY_PATH.
- # This way we don't have to hack RPATHs of executables.
- local libpath
- if use debug; then
- libpath=${BUILD_DIR}/Debug+Asserts+Checks/lib
- else
- libpath=${BUILD_DIR}/Release/lib
- fi
-
- export LD_LIBRARY_PATH=${libpath}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
-}
-
-multilib_src_configure() {
- local CONF_FLAGS="--enable-keep-symbols
- --enable-shared
- --with-optimize-option=
- $(use_enable !debug optimized)
- $(use_enable debug assertions)
- $(use_enable debug expensive-checks)"
-
- if use clang; then
- CONF_FLAGS+="
- --with-clang-resource-dir=../lib/clang/3.4"
- fi
-
- if use multitarget; then
- CONF_FLAGS="${CONF_FLAGS} --enable-targets=all"
- else
- CONF_FLAGS="${CONF_FLAGS} --enable-targets=host,cpp"
- if use video_cards_radeon; then
- CONF_FLAGS="${CONF_FLAGS},r600"
- fi
- fi
-
- if [[ ${ABI} == amd64 ]]; then
- CONF_FLAGS="${CONF_FLAGS} --enable-pic"
- fi
-
- if multilib_is_native_abi && use gold; then
- CONF_FLAGS="${CONF_FLAGS} --with-binutils-include=${EPREFIX}/usr/include/"
- fi
- if multilib_is_native_abi && use ocaml; then
- CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml"
- else
- CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none"
- fi
-
- if use udis86; then
- CONF_FLAGS="${CONF_FLAGS} --with-udis86"
- fi
-
- if use libffi; then
- append-cppflags "$(pkg-config --cflags libffi)"
- fi
- CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)"
-
- # build with a suitable Python version
- python_export_best
-
- # llvm prefers clang over gcc, so we may need to force that
- tc-export CC CXX
-
- ECONF_SOURCE=${S} \
- econf ${CONF_FLAGS}
-}
-
-multilib_src_compile() {
- local mymakeopts=(
- VERBOSE=1
- REQUIRES_RTTI=1
- GENTOO_LIBDIR="$(get_libdir)"
- )
-
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
- llvm_add_ldpath
-
- # Tests need all the LLVM built.
- if multilib_is_native_abi || use test; then
- emake "${mymakeopts[@]}"
- else
- # we need to build libs for llvm, then whole clang,
- # since libs-only omits clang dir
- # and clang fails to sub-compile with libs-only.
- emake "${mymakeopts[@]}" libs-only
- use clang && emake -C tools/clang "${mymakeopts[@]}"
- fi
-
- if multilib_is_native_abi; then
- emake -C "${S}"/docs -f Makefile.sphinx man
- use doc && emake -C "${S}"/docs -f Makefile.sphinx html
- fi
-
- if use debug; then
- pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld
- pax-mark m Debug+Asserts+Checks/bin/lli
- else
- pax-mark m Release/bin/llvm-rtdyld
- pax-mark m Release/bin/lli
- fi
- if use test; then
- pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests
- pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests
- pax-mark m unittests/Support/Release/SupportTests
- fi
-}
-
-multilib_src_test() {
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
- llvm_add_ldpath
-
- default
-
- use clang && emake -C tools/clang test
-}
-
-src_install() {
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/config.h
- /usr/include/llvm/Config/llvm-config.h
- )
-
- use clang && MULTILIB_WRAPPED_HEADERS+=(
- /usr/include/clang/Config/config.h
- )
-
- multilib-minimal_src_install
-}
-
-multilib_src_install() {
- local mymakeopts=(
- DESTDIR="${D}"
- GENTOO_LIBDIR="$(get_libdir)"
- )
-
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
- llvm_add_ldpath
-
- if multilib_is_native_abi; then
- emake "${mymakeopts[@]}" install
-
- # Move files back.
- if path_exists -o "${ED}"/tmp/llvm-config.*; then
- mv "${ED}"/tmp/llvm-config.* "${ED}"/usr/bin || die
- fi
- else
- # we need to install libs for llvm, then whole clang
- # since libs-only omits clang dir
- # and clang install-libs doesn't install headers and stuff
- # (we build it anyway, so install is not a problem)
- emake "${mymakeopts[@]}" install-libs
- use clang && emake -C tools/clang "${mymakeopts[@]}" install
-
- # Preserve ABI-variant of llvm-config,
- # then drop all the executables since LLVM doesn't like to
- # clobber when installing.
- mkdir -p "${ED}"/tmp || die
- mv "${ED}"/usr/bin/llvm-config "${ED}"/tmp/llvm-config.${ABI} || die
- rm -r "${ED}"/usr/bin || die
- fi
-
- # Fix install_names on Darwin. The build system is too complicated
- # to just fix this, so we correct it post-install
- local lib= f= odylib= libpv=${PV}
- if [[ ${CHOST} == *-darwin* ]] ; then
- eval $(grep PACKAGE_VERSION= configure)
- [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION}
- for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib {BugpointPasses,LLVMHello}.dylib ; do
- # libEnhancedDisassembly is Darwin10 only, so non-fatal
- # + omit clang libs if not enabled
- [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue
-
- ebegin "fixing install_name of $lib"
- install_name_tool \
- -id "${EPREFIX}"/usr/lib/${PN}/${lib} \
- "${ED}"/usr/lib/${PN}/${lib}
- eend $?
- done
- for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/lib{LTO,clang}.dylib ; do
- # omit clang libs if not enabled
- [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue
-
- odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${libpv}.dylib)
- ebegin "fixing install_name reference to ${odylib} of ${f##*/}"
- install_name_tool \
- -change "${odylib}" \
- "${EPREFIX}"/usr/lib/${PN}/libLLVM-${libpv}.dylib \
- -change "@rpath/libclang.dylib" \
- "${EPREFIX}"/usr/lib/llvm/libclang.dylib \
- -change "${S}"/Release/lib/libclang.dylib \
- "${EPREFIX}"/usr/lib/llvm/libclang.dylib \
- "${f}"
- eend $?
- done
- fi
-}
-
-multilib_src_install_all() {
- doman docs/_build/man/*.1
- use doc && dohtml -r docs/_build/html/
-
- insinto /usr/share/vim/vimfiles/syntax
- doins utils/vim/*.vim
-
- if use clang; then
- cd tools/clang || die
-
- 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
- fi
-
- python_inst() {
- if use static-analyzer ; then
- pushd tools/scan-view >/dev/null || die
-
- python_doscript scan-view
-
- touch __init__.py || die
- python_moduleinto clang
- python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py
-
- popd >/dev/null || die
- fi
-
- if use python ; then
- pushd bindings/python/clang >/dev/null || die
-
- python_moduleinto clang
- python_domodule __init__.py cindex.py enumerations.py
-
- popd >/dev/null || die
- fi
-
- # AddressSanitizer symbolizer (currently separate)
- python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py
- }
- python_foreach_impl python_inst
- fi
-}
diff --git a/sys-devel/llvm/metadata.xml b/sys-devel/llvm/metadata.xml
deleted file mode 100644
index 7d34900..0000000
--- a/sys-devel/llvm/metadata.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer>
- <email>voyageur@gentoo.org</email>
- <name>Bernard Cafarelli</name>
- </maintainer>
- <maintainer>
- <email>mgorny@gentoo.org</email>
- <name>Michał Górny</name>
- </maintainer>
- <longdescription>Low Level Virtual Machine (LLVM) is:
- 1. A compilation strategy designed to enable effective program optimization across the entire lifetime of a program. LLVM supports effective optimization at compile time, link-time (particularly interprocedural), run-time and offline (i.e., after software is installed), while remaining transparent to developers and maintaining compatibility with existing build scripts.
- 2. A virtual instruction set - LLVM is a low-level object code representation that uses simple RISC-like instructions, but provides rich, language-independent, type information and dataflow (SSA) information about operands. This combination enables sophisticated transformations on object code, while remaining light-weight enough to be attached to the executable. This combination is key to allowing link-time, run-time, and offline transformations.
- 3. A compiler infrastructure - LLVM is also a collection of source code that implements the language and compilation strategy. The primary components of the LLVM infrastructure are a GCC-based C and C++ front-end, a link-time optimization framework with a growing set of global and interprocedural analyses and transformations, static back-ends for many popular (and some obscure) architectures, a back-end which emits portable C code, and a Just-In-Time compilers for several architectures.
- 4. LLVM does not imply things that you would expect from a high-level virtual machine. It does not require garbage collection or run-time code generation (In fact, LLVM makes a great static compiler!). Note that optional LLVM components can be used to build high-level virtual machines and other systems that need these services.</longdescription>
- <use>
- <flag name='clang'>Build the clang C/C++ compiler</flag>
- <flag name='doc'>Build and install the HTML documentation and regenerate the man pages</flag>
- <flag name='gold'>Build the gold linker plugin</flag>
- <flag name='llvm-gcc'>Build LLVM with <pkg>sys-devel/llvm-gcc</pkg></flag>
- <flag name='multitarget'>Build all host targets (default: host only)</flag>
- <flag name='static-analyzer'>Install the Clang static analyzer (requires USE=clang)</flag>
- <flag name='udis86'>Enable support for <pkg>dev-libs/udis86</pkg> disassembler library</flag>
- </use>
-</pkgmetadata>
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-21 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-18 21:52 [gentoo-commits] dev/mgorny:master commit in: sys-devel/llvm/files/, sys-devel/clang/, sys-devel/llvm/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2013-07-21 15:34 Michał Górny
2013-07-10 9:27 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox