fix(coreos-base/hard-host-depends): Remove clang/llvm from SDK.

Nothing should be using clang any more and just results in long compile
times when use flags change. Away with ye!
This commit is contained in:
Michael Marineau 2013-10-04 11:32:25 -07:00
parent 9a49b6b628
commit 8efddb70a4
20 changed files with 0 additions and 1354 deletions

View File

@ -90,7 +90,6 @@ RDEPEND="${RDEPEND}
sys-apps/usbutils
!sys-apps/nih-dbus-tool
=sys-devel/automake-1.10*
sys-devel/clang
sys-fs/sshfs-fuse
sys-libs/libnih
sys-power/iasl

View File

@ -15,11 +15,9 @@
=sys-apps/dtc-9999 **
=sys-devel/smatch-1.57-r1 ~amd64
=dev-lang/closure-compiler-bin-20120305 ~amd64
=sys-devel/clang-3.2 ~amd64
=dev-util/shflags-1.0.3 ~amd64
=dev-util/perf-3.4 ~amd64
=sys-libs/libnih-1.0.3 ~amd64
=sys-devel/llvm-3.2 ~amd64
=dev-python/pyusb-1.0.0_alpha3 ~amd64
# Get updated core code

View File

@ -20,7 +20,6 @@ media-libs/freeimage -cxx
media-libs/gd png
media-libs/libmtp -crypt
# We don't want any driver/hw rendering on the host
media-libs/mesa -llvm -gallium -classic
media-sound/alsa-utils -libsamplerate minimal
net-misc/curl ares static-libs
sci-geosciences/gpsd -cxx

View File

@ -1,196 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# This package is originated from
# http://sources.gentoo.org/sys-devel/clang/clang-9999.ebuild
#
# Note that we use downloading sources from SVN because llvm.org has
# not released this version yet.
EAPI=4
RESTRICT_PYTHON_ABIS="3.*"
SUPPORT_PYTHON_ABIS="1"
inherit subversion eutils multilib python
SVN_COMMIT=${PV#*_pre}
DESCRIPTION="C language family frontend for LLVM"
HOMEPAGE="http://clang.llvm.org/"
SRC_URI=""
ESVN_REPO_URI="http://llvm.org/svn/llvm-project/cfe/trunk@${SVN_COMMIT}"
LICENSE="UoI-NCSA"
SLOT="0"
KEYWORDS="amd64"
IUSE="debug multitarget +static-analyzer test"
DEPEND="static-analyzer? ( dev-lang/perl )"
RDEPEND="~sys-devel/llvm-${PV}[multitarget=]"
S="${WORKDIR}/llvm"
src_unpack() {
# Fetching LLVM and subprojects
ESVN_PROJECT=llvm subversion_fetch "http://llvm.org/svn/llvm-project/llvm/trunk@${SVN_COMMIT}"
ESVN_PROJECT=compiler-rt S="${S}"/projects/compiler-rt subversion_fetch "http://llvm.org/svn/llvm-project/compiler-rt/trunk@${SVN_COMMIT}"
ESVN_PROJECT=clang S="${S}"/tools/clang subversion_fetch
}
src_prepare() {
if [ "/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.x-google" != $(gcc-config -B) ]; then
ewarn "Beware sheriff: gcc's binaries are not in '/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.x-google'"
ewarn "and are instead in $(gcc-config -B). This may lead to an unusable clang."
ewarn "Please test clang with a simple hello_world.cc file and update this message"
fi
# 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"
# 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,cpp"
fi
if use amd64; then
CONF_FLAGS="${CONF_FLAGS} --enable-pic"
fi
# clang 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 clang-only
}
src_test() {
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
# 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
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
}
pkg_postinst() {
python_mod_optimize clang
}
pkg_postrm() {
python_mod_cleanup clang
}

View File

@ -1,194 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# This package is originated from
# http://sources.gentoo.org/sys-devel/clang/clang-9999.ebuild
#
# Note that we use downloading sources from SVN because llvm.org has
# not released this version yet.
EAPI=4
RESTRICT_PYTHON_ABIS="3.*"
SUPPORT_PYTHON_ABIS="1"
inherit subversion eutils multilib python
DESCRIPTION="C language family frontend for LLVM"
HOMEPAGE="http://clang.llvm.org/"
SRC_URI=""
ESVN_REPO_URI="http://llvm.org/svn/llvm-project/cfe/trunk"
LICENSE="UoI-NCSA"
SLOT="0"
KEYWORDS="~amd64"
IUSE="debug multitarget +static-analyzer test"
DEPEND="static-analyzer? ( dev-lang/perl )"
RDEPEND="~sys-devel/llvm-${PV}[multitarget=]"
S="${WORKDIR}/llvm"
src_unpack() {
# Fetching LLVM and subprojects
ESVN_PROJECT=llvm subversion_fetch "http://llvm.org/svn/llvm-project/llvm/trunk"
ESVN_PROJECT=compiler-rt S="${S}"/projects/compiler-rt subversion_fetch "http://llvm.org/svn/llvm-project/compiler-rt/trunk"
ESVN_PROJECT=clang S="${S}"/tools/clang subversion_fetch
}
src_prepare() {
if [ "/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.x-google" != $(gcc-config -B) ]; then
ewarn "Beware sheriff: gcc's binaries are not in '/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.x-google'"
ewarn "and are instead in $(gcc-config -B). This may lead to an unusable clang."
ewarn "Please test clang with a simple hello_world.cc file and update this message"
fi
# 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"
# 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,cpp"
fi
if use amd64; then
CONF_FLAGS="${CONF_FLAGS} --enable-pic"
fi
# clang 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 clang-only
}
src_test() {
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
# 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
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
}
pkg_postinst() {
python_mod_optimize clang
}
pkg_postrm() {
python_mod_cleanup clang
}

View File

@ -1,53 +0,0 @@
diff -Naur llvm-2.7.orig//tools/clang/docs/Makefile llvm-2.7/tools/clang/docs/Makefile
--- llvm-2.7.orig//tools/clang/docs/Makefile 2010-04-26 18:38:45.000000000 +0200
+++ llvm-2.7/tools/clang/docs/Makefile 2010-04-26 18:41:08.000000000 +0200
@@ -46,13 +46,12 @@
# 'make generated BUILD_FOR_WEBSITE=1'
generated:: doxygen
-install-html: $(PROJ_OBJ_DIR)/html.tar.gz
+install-html:
$(Echo) Installing HTML documentation
$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html
$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/img
$(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html
# $(Verb) $(DataInstall) $(IMAGES) $(DESTDIR)$(PROJ_docsdir)/html/img
- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir)
$(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
$(Echo) Packaging HTML documentation
@@ -64,12 +63,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
diff -Naur llvm-2.7.orig//tools/clang/docs/tools/Makefile llvm-2.7/tools/clang/docs/tools/Makefile
--- llvm-2.7.orig//tools/clang/docs/tools/Makefile 2010-04-26 18:38:45.000000000 +0200
+++ llvm-2.7/tools/clang/docs/tools/Makefile 2010-04-26 18:41:29.000000000 +0200
@@ -24,7 +24,7 @@
CLANG_VERSION := trunk
# If we are in BUILD_FOR_WEBSITE mode, default to the all target.
-all:: html man ps
+all:: html man
clean:
rm -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
@@ -58,7 +58,7 @@
ifdef ONLY_MAN_DOCS
INSTALL_TARGETS := install-man
else
-INSTALL_TARGETS := install-html install-man install-ps
+INSTALL_TARGETS := install-html install-man
endif
.SUFFIXES:

View File

@ -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);

View File

@ -1 +0,0 @@
DIST llvm-3.2.src.tar.gz 12275252 SHA256 125090c4d26740f1d5e9838477c931ed7d9ad70d599ba265f46f3a42cb066343 SHA512 cc66171322dbbe40bcac0e0ea5b09df8ff52df63ded304f841f32f702270d6ab1512216413ee52498c3ebee8cd39c4cd23e3855d591944bc2ac0ae76f5be62cc WHIRLPOOL c3a39b2426293d0251b7769607ade873bb6bf8d54e7c8055773a9b75742bc8e39049fb71409a258c6f3d98775b78c280d4bfe4223ba91e5ed6ecae0eddf910e5

View File

@ -1,64 +0,0 @@
From e25389b66b5ced3a2b5461077dcc9a505d334e3d Mon Sep 17 00:00:00 2001
From: Tom Stellard <thomas.stellard@amd.com>
Date: Tue, 13 Mar 2012 14:12:21 -0400
Subject: [PATCH 1/2] r600: Add some intrinsic definitions
---
include/llvm/Intrinsics.td | 1 +
include/llvm/IntrinsicsR600.td | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)
create mode 100644 include/llvm/IntrinsicsR600.td
diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td
index 069f907..e90dd85 100644
--- a/include/llvm/Intrinsics.td
+++ b/include/llvm/Intrinsics.td
@@ -469,3 +469,4 @@
include "llvm/IntrinsicsHexagon.td"
include "llvm/IntrinsicsNVVM.td"
include "llvm/IntrinsicsMips.td"
+include "llvm/IntrinsicsR600.td"
diff --git a/include/llvm/IntrinsicsR600.td b/include/llvm/IntrinsicsR600.td
new file mode 100644
index 0000000..789fecb
--- /dev/null
+++ b/include/llvm/IntrinsicsR600.td
@@ -0,0 +1,35 @@
+//===- IntrinsicsR600.td - Defines R600 intrinsics ---------*- tablegen -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines all of the R600-specific intrinsics.
+//
+//===----------------------------------------------------------------------===//
+//
+// Authors: Tom Stellard <thomas.stellard@amd.com>
+//
+
+let TargetPrefix = "r600" in {
+
+class R600ReadPreloadRegisterIntrinsic<string name>
+ : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>,
+ GCCBuiltin<name>;
+
+multiclass R600ReadPreloadRegisterIntrinsic_xyz<string prefix> {
+ def _x : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_x")>;
+ def _y : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_y")>;
+ def _z : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_z")>;
+}
+
+defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz <
+ "__builtin_r600_read_ngroups">;
+defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz <
+ "__builtin_r600_read_tgid">;
+defm int_r600_read_tidig : R600ReadPreloadRegisterIntrinsic_xyz <
+ "__builtin_r600_read_tidig">;
+} // End TargetPrefix = "r600"
--
1.7.7.6

View File

@ -1,27 +0,0 @@
From 17667fa3450470f7c89fc2ba4631d908cf510749 Mon Sep 17 00:00:00 2001
From: Tom Stellard <thomas.stellard@amd.com>
Date: Wed, 14 Mar 2012 11:19:35 -0400
Subject: [PATCH 2/2] r600: Add get_global_size and get_local_size intrinsics
---
include/llvm/IntrinsicsR600.td | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/llvm/IntrinsicsR600.td b/include/llvm/IntrinsicsR600.td
index 789fecb..0473acb 100644
--- a/include/llvm/IntrinsicsR600.td
+++ b/include/llvm/IntrinsicsR600.td
@@ -26,6 +26,10 @@ multiclass R600ReadPreloadRegisterIntrinsic_xyz<string prefix> {
def _z : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_z")>;
}
+defm int_r600_read_global_size : R600ReadPreloadRegisterIntrinsic_xyz <
+ "__builtin_r600_read_global_size">;
+defm int_r600_read_local_size : R600ReadPreloadRegisterIntrinsic_xyz <
+ "__builtin_r600_read_local_size">;
defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz <
"__builtin_r600_read_ngroups">;
defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz <
--
1.7.7.6

View File

@ -1,43 +0,0 @@
Index: llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h
===================================================================
--- llvm-3.0-3.0.orig/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h 2011-07-25 23:24:55.000000000 +0000
+++ llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h 2011-12-02 13:06:48.000000000 +0000
@@ -34,6 +34,10 @@
} // End llvm namespace
+// Generated files will use "namespace PPC". To avoid symbol clash,
+// undefine PPC here. PPC may be predefined on some hosts.
+#undef PPC
+
// Defines symbolic names for PowerPC registers. This defines a mapping from
// register name to register number.
//
Index: llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h
===================================================================
--- llvm-3.0-3.0.orig/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h 2011-07-26 00:24:13.000000000 +0000
+++ llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h 2011-12-02 13:06:48.000000000 +0000
@@ -14,6 +14,10 @@
#ifndef LLVM_TARGET_POWERPC_PPCPREDICATES_H
#define LLVM_TARGET_POWERPC_PPCPREDICATES_H
+// Generated files will use "namespace PPC". To avoid symbol clash,
+// undefine PPC here. PPC may be predefined on some hosts.
+#undef PPC
+
namespace llvm {
namespace PPC {
/// Predicate - These are "(BI << 5) | BO" for various predicates.
Index: llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h
===================================================================
--- llvm-3.0-3.0.orig/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h 2011-07-25 19:53:23.000000000 +0000
+++ llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h 2011-12-02 16:21:23.000000000 +0000
@@ -12,6 +12,8 @@
#include "llvm/MC/MCFixup.h"
+#undef PPC
+
namespace llvm {
namespace PPC {
enum Fixups {

View File

@ -1,65 +0,0 @@
From 737fdba46f2b2b7d39bc728d15ea2334c44779e0 Mon Sep 17 00:00:00 2001
From: Ben Longbons <b.r.longbons@gmail.com>
Date: Fri, 29 Jun 2012 12:58:34 -0700
Subject: [PATCH] Revert "Patch to set is_stmt a little better for prologue
lines in a function."
This meants that the debugger could find meaningful line information.
This reverts commit 60b35f408bc3194e7ea4e96367c0b42dc5e7f850.
---
lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 ++-----
test/DebugInfo/X86/ending-run.ll | 6 ++----
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 3e79a6d..24aedfb 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1093,15 +1093,12 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) {
if (!MI->isDebugValue()) {
DebugLoc DL = MI->getDebugLoc();
if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) {
- unsigned Flags = 0;
+ unsigned Flags = DWARF2_FLAG_IS_STMT;
PrevInstLoc = DL;
if (DL == PrologEndLoc) {
Flags |= DWARF2_FLAG_PROLOGUE_END;
PrologEndLoc = DebugLoc();
}
- if (PrologEndLoc.isUnknown())
- Flags |= DWARF2_FLAG_IS_STMT;
-
if (!DL.isUnknown()) {
const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext());
recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags);
@@ -1382,7 +1379,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
MF->getFunction()->getContext());
recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
FnStartDL.getScope(MF->getFunction()->getContext()),
- 0);
+ DWARF2_FLAG_IS_STMT);
}
}
diff --git a/test/DebugInfo/X86/ending-run.ll b/test/DebugInfo/X86/ending-run.ll
index 6935c47..0cd3de1 100644
--- a/test/DebugInfo/X86/ending-run.ll
+++ b/test/DebugInfo/X86/ending-run.ll
@@ -1,11 +1,9 @@
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
; RUN: llvm-dwarfdump %t | FileCheck %s
-; Check that the line table starts at 7, not 4, but that the first
-; statement isn't until line 8.
+; Check that the line table starts at 7, not 4.
-; CHECK-NOT: 0x0000000000000000 7 0 1 0 is_stmt
-; CHECK: 0x0000000000000000 7 0 1 0
+; CHECK: 0x0000000000000000 7 0 1 0 is_stmt
; CHECK: 0x0000000000000004 8 18 1 0 is_stmt prologue_end
define i32 @callee(i32 %x) nounwind uwtable ssp {
--
1.7.10

View File

@ -1,22 +0,0 @@
diff -aur llvm-3.1.src.orig/configure llvm-3.1.src/configure
--- llvm-3.1.src.orig/configure 2012-05-11 13:48:57.000000000 -0700
+++ llvm-3.1.src/configure 2012-10-08 14:34:48.591805189 -0700
@@ -3486,8 +3486,6 @@
do
if test -d ${srcdir}/projects/${i} ; then
case ${i} in
- sample) subdirs="$subdirs projects/sample"
- ;;
privbracket) subdirs="$subdirs projects/privbracket"
;;
llvm-stacker) subdirs="$subdirs projects/llvm-stacker"
diff -aur llvm-3.1.src.orig/projects/Makefile llvm-3.1.src/projects/Makefile
--- llvm-3.1.src.orig/projects/Makefile 2010-09-09 08:49:32.000000000 -0700
+++ llvm-3.1.src/projects/Makefile 2012-10-08 14:51:55.783370351 -0700
@@ -24,5 +24,6 @@
ifeq ($(ARCH), Sparc)
DIRS := $(filter-out sample, $(DIRS))
endif
+DIRS := $(filter-out sample, $(DIRS))
include $(PROJ_SRC_ROOT)/Makefile.rules

View File

@ -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

View File

@ -1,34 +0,0 @@
diff -aur llvm-3.1.src.orig/configure llvm-3.1.src/configure
--- llvm-3.1.src.orig/configure 2012-05-11 13:48:57.000000000 -0700
+++ llvm-3.1.src/configure 2012-10-08 13:38:31.363732213 -0700
@@ -1952,13 +1952,13 @@
-if test ${srcdir} != "." ; then
- if test -f ${srcdir}/include/llvm/Config/config.h ; then
- { { echo "$as_me:$LINENO: error: Already configured in ${srcdir}" >&5
-echo "$as_me: error: Already configured in ${srcdir}" >&2;}
- { (exit 1); exit 1; }; }
- fi
-fi
+#if test ${srcdir} != "." ; then
+# if test -f ${srcdir}/include/llvm/Config/config.h ; then
+# { { echo "$as_me:$LINENO: error: Already configured in ${srcdir}" >&5
+#echo "$as_me: error: Already configured in ${srcdir}" >&2;}
+# { (exit 1); exit 1; }; }
+# fi
+#fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -4798,7 +4798,7 @@
test -z "$BUILD_CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
{ (exit 1); exit 1; }; }
- ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ ac_build_link='${BUILD_CC-cc} -o conftest $HOST_CFLAGS $HOST_CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_build_exeext=
Only in llvm-3.1.src/: configure.orig

View File

@ -1,16 +0,0 @@
diff -aur llvm-3.1.src.orig/Makefile llvm-3.1.src/Makefile
--- llvm-3.1.src.orig/Makefile 2012-01-16 18:56:49.000000000 -0800
+++ llvm-3.1.src/Makefile 2012-10-08 13:39:18.854266324 -0700
@@ -114,6 +114,11 @@
unset CXXFLAGS ; \
unset SDKROOT ; \
unset UNIVERSAL_SDK_PATH ; \
+ AR=$(HOST_AR) ;\
+ AS=$(HOST_AS) ;\
+ LD=$(HOST_LD) ;\
+ CC=$(HOST_CC) ;\
+ CXX=$(HOST_CXX) ;\
$(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \
--host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE) \
--disable-polly ; \
Only in llvm-3.1.src/: Makefile.orig

View File

@ -1,193 +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/llvm/llvm-3.1-r2.ebuild,v 1.3 2012/08/05 14:04:09 ryao Exp $
EAPI="4"
PYTHON_DEPEND="2"
inherit eutils flag-o-matic multilib toolchain-funcs python pax-utils
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="http://llvm.org/"
SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.gz"
LICENSE="UoI-NCSA"
SLOT="0"
KEYWORDS="amd64 ~arm ~ppc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
IUSE="debug gold +libffi multitarget ocaml test udis86 vim-syntax"
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 )
gold? ( >=sys-devel/binutils-2.22[cxx] )
libffi? ( virtual/pkgconfig
virtual/libffi )
ocaml? ( dev-lang/ocaml )
udis86? ( amd64? ( dev-libs/udis86[pic] )
!amd64? ( dev-libs/udis86 ) )"
RDEPEND="dev-lang/perl
libffi? ( virtual/libffi )
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
S=${WORKDIR}/${P}.src
pkg_setup() {
# Required for test and build
python_set_active_version 2
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_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
# Specify python version
python_convert_shebangs -r 2 test/Scripts
epatch "${FILESDIR}"/${P}-nodoctargz.patch
epatch "${FILESDIR}"/${PN}-3.0-PPC_macro.patch
epatch "${FILESDIR}"/${PN}-3.1-fix_debug_line_info.patch
# Apply r600 OpenCL-related patches, bug #425688
epatch "${FILESDIR}"/cl-patches/*.patch
# Make llvm cross-compile
epatch "${FILESDIR}"/xconfigure.patch
epatch "${FILESDIR}"/xmakefile.patch
epatch "${FILESDIR}"/${PN}-3.1-no-sample.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 multitarget; then
CONF_FLAGS="${CONF_FLAGS} --enable-targets=all"
else
CONF_FLAGS="${CONF_FLAGS} --enable-targets=host,cpp"
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)"
# 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
pax-mark m Release/bin/lli
if use test; then
pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests
fi
}
src_install() {
emake KEEP_SYMBOLS=1 DESTDIR="${D}" install
if use vim-syntax; then
insinto /usr/share/vim/vimfiles/syntax
doins utils/vim/*.vim
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=
if [[ ${CHOST} == *-darwin* ]] ; then
for lib in lib{EnhancedDisassembly,LLVM-${PV},LTO,profile_rt}.dylib {BugpointPasses,LLVMHello}.dylib ; do
# libEnhancedDisassembly is Darwin10 only, so non-fatal
[[ -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}/libLTO.dylib ; do
odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${PV}.dylib)
ebegin "fixing install_name reference to ${odylib} of ${f##*/}"
install_name_tool \
-change "${odylib}" \
"${EPREFIX}"/usr/lib/${PN}/libLLVM-${PV}.dylib \
"${f}"
eend $?
done
fi
}

View File

@ -1,189 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# This package is originated from
# http://sources.gentoo.org/sys-devel/llvm/llvm-9999.ebuild
EAPI="4"
PYTHON_DEPEND="2"
inherit subversion eutils flag-o-matic multilib toolchain-funcs python pax-utils
SVN_COMMIT=${PV#*_pre}
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="http://llvm.org/"
SRC_URI=""
ESVN_REPO_URI="http://llvm.org/svn/llvm-project/llvm/trunk@${SVN_COMMIT}"
LICENSE="UoI-NCSA"
SLOT="0"
KEYWORDS="amd64"
IUSE="debug doc gold +libffi multitarget ocaml test udis86 vim-syntax"
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 )
gold? ( >=sys-devel/binutils-2.22[cxx] )
libffi? ( dev-util/pkgconfig
virtual/libffi )
ocaml? ( dev-lang/ocaml )
udis86? ( amd64? ( dev-libs/udis86[pic] )
!amd64? ( dev-libs/udis86 ) )"
RDEPEND="dev-lang/perl
libffi? ( virtual/libffi )
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
pkg_setup() {
# Required for test and build
python_set_active_version 2
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_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
# Specify python version
python_convert_shebangs -r 2 test/Scripts
epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch
epatch "${FILESDIR}"/${PN}-3.0-PPC_macro.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 multitarget; then
CONF_FLAGS="${CONF_FLAGS} --enable-targets=all"
else
CONF_FLAGS="${CONF_FLAGS} --enable-targets=host,cpp"
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)"
# 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
pax-mark m Release/bin/lli
if use test; then
pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests
fi
}
src_install() {
emake KEEP_SYMBOLS=1 DESTDIR="${D}" install
if use vim-syntax; then
insinto /usr/share/vim/vimfiles/syntax
doins utils/vim/*.vim
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}.dylib {BugpointPasses,LLVMHello}.dylib ; do
# libEnhancedDisassembly is Darwin10 only, so non-fatal
[[ -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}/libLTO.dylib ; do
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 \
"${f}"
eend $?
done
fi
}

View File

@ -1,187 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# This package is originated from
# http://sources.gentoo.org/sys-devel/llvm/llvm-9999.ebuild
EAPI="4"
PYTHON_DEPEND="2"
inherit subversion eutils flag-o-matic multilib toolchain-funcs python 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="~amd64"
IUSE="debug doc gold +libffi multitarget ocaml test udis86 vim-syntax"
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 )
gold? ( >=sys-devel/binutils-2.22[cxx] )
libffi? ( dev-util/pkgconfig
virtual/libffi )
ocaml? ( dev-lang/ocaml )
udis86? ( amd64? ( dev-libs/udis86[pic] )
!amd64? ( dev-libs/udis86 ) )"
RDEPEND="dev-lang/perl
libffi? ( virtual/libffi )
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
pkg_setup() {
# Required for test and build
python_set_active_version 2
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_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
# Specify python version
python_convert_shebangs -r 2 test/Scripts
epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch
epatch "${FILESDIR}"/${PN}-3.0-PPC_macro.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 multitarget; then
CONF_FLAGS="${CONF_FLAGS} --enable-targets=all"
else
CONF_FLAGS="${CONF_FLAGS} --enable-targets=host,cpp"
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)"
# 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
pax-mark m Release/bin/lli
if use test; then
pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests
fi
}
src_install() {
emake KEEP_SYMBOLS=1 DESTDIR="${D}" install
if use vim-syntax; then
insinto /usr/share/vim/vimfiles/syntax
doins utils/vim/*.vim
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}.dylib {BugpointPasses,LLVMHello}.dylib ; do
# libEnhancedDisassembly is Darwin10 only, so non-fatal
[[ -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}/libLTO.dylib ; do
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 \
"${f}"
eend $?
done
fi
}