summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2016-01-25 16:27:14 +0100
committerBernard Cafarelli <voyageur@gentoo.org>2016-01-25 16:27:23 +0100
commitef49044e3259463b2eb25bc8e125507b0b6f583f (patch)
treefdd0280bf61e75010a8cce0ebf04410b93515d57 /sys-devel
parentsys-fs/cachefilesd: Correct LICENSE (diff)
downloadgentoo-ef49044e3259463b2eb25bc8e125507b0b6f583f.tar.gz
gentoo-ef49044e3259463b2eb25bc8e125507b0b6f583f.tar.bz2
gentoo-ef49044e3259463b2eb25bc8e125507b0b6f583f.zip
sys-devel/llvm: fix live ebuild
Update clang version, bug #572396 Update llvm-config patch, bug #572564 Package-Manager: portage-2.2.27
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/llvm/files/llvm-3.9-llvm-config.patch75
-rw-r--r--sys-devel/llvm/llvm-9999.ebuild6
2 files changed, 78 insertions, 3 deletions
diff --git a/sys-devel/llvm/files/llvm-3.9-llvm-config.patch b/sys-devel/llvm/files/llvm-3.9-llvm-config.patch
new file mode 100644
index 000000000000..90984e627c51
--- /dev/null
+++ b/sys-devel/llvm/files/llvm-3.9-llvm-config.patch
@@ -0,0 +1,75 @@
+diff -Naur llvm-9999.orig/tools/llvm-config/CMakeLists.txt llvm-9999/tools/llvm-config/CMakeLists.txt
+--- llvm-9999.orig/tools/llvm-config/CMakeLists.txt 2016-01-25 14:47:55.447301061 +0100
++++ llvm-9999/tools/llvm-config/CMakeLists.txt 2016-01-25 14:54:03.897257098 +0100
+@@ -22,8 +22,12 @@
+ set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
+ set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
+ set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
++# Just use CMAKE_CPP_FLAGS for CFLAGS and CXXFLAGS, otherwise compiler
++# specific flags will be set when we don't know what compiler will be used
++# with external project utilising llvm-config. C++ Standard is required.
++# TODO: figure out if we can remove -std=c++11 and move it to revdeps.
+ set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
+-set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
++set(LLVM_CXXFLAGS "${CMAKE_CPP_FLAGS} -std=c++11 ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
+ set(LLVM_BUILD_SYSTEM cmake)
+ set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
+ set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}")
+@@ -31,7 +35,8 @@
+ # Use the C++ link flags, since they should be a superset of C link flags.
+ set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")
+ set(LLVM_BUILDMODE ${CMAKE_BUILD_TYPE})
+-set(LLVM_SYSTEM_LIBS ${SYSTEM_LIBS})
++# We don't do static libs, so we don't need to supply any system-libs
++set(LLVM_SYSTEM_LIBS "")
+ if(BUILD_SHARED_LIBS)
+ set(LLVM_ENABLE_SHARED ON)
+ else()
+diff -Naur llvm-9999.orig/tools/llvm-config/llvm-config.cpp llvm-9999/tools/llvm-config/llvm-config.cpp
+--- llvm-9999.orig/tools/llvm-config/llvm-config.cpp 2016-01-25 14:47:55.447301061 +0100
++++ llvm-9999/tools/llvm-config/llvm-config.cpp 2016-01-25 14:57:05.286236312 +0100
+@@ -532,10 +532,19 @@
+ OS << LLVM_HAS_RTTI << '\n';
+ } else if (Arg == "--shared-mode") {
+ PrintSharedMode = true;
+- } else if (Arg == "--obj-root") {
+- OS << ActivePrefix << '\n';
+- } else if (Arg == "--src-root") {
+- OS << LLVM_SRC_ROOT << '\n';
++ } else if (Arg == "--obj-root" || Arg == "--src-root") {
++ if (IsInDevelopmentTree) {
++ if (Arg == "--obj-root") {
++ OS << ActivePrefix << '\n';
++ } else {
++ OS << LLVM_SRC_ROOT << '\n';
++ }
++ } else {
++ // sources are not installed
++ llvm::errs() << "llvm-config: sources not installed, "
++ << Arg << " not available\n";
++ exit(1);
++ }
+ } else if (Arg == "--link-shared") {
+ LinkMode = LinkModeShared;
+ } else if (Arg == "--link-static") {
+diff -Naur llvm-9999.orig/utils/llvm-build/llvmbuild/main.py llvm-9999/utils/llvm-build/llvmbuild/main.py
+--- llvm-9999.orig/utils/llvm-build/llvmbuild/main.py 2016-01-25 14:47:55.511301054 +0100
++++ llvm-9999/utils/llvm-build/llvmbuild/main.py 2016-01-25 14:58:13.014228689 +0100
+@@ -393,6 +393,8 @@
+ //
+ //===----------------------------------------------------------------------===//
+
++#include "llvm/Config/config.h"
++
+ """)
+ f.write('struct AvailableComponent {\n')
+ f.write(' /// The name of the component.\n')
+@@ -413,7 +415,7 @@
+ if library_name is None:
+ library_name_as_cstr = 'nullptr'
+ else:
+- library_name_as_cstr = '"lib%s.a"' % library_name
++ library_name_as_cstr = '"lib%s" LTDL_SHLIB_EXT' % library_name
+ if is_installed:
+ is_installed_as_cstr = 'true'
+ else:
diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
index 16c4d32ceacb..d9adc68fc25f 100644
--- a/sys-devel/llvm/llvm-9999.ebuild
+++ b/sys-devel/llvm/llvm-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -160,7 +160,7 @@ src_prepare() {
# Fix llvm-config for shared linking and sane flags
# https://bugs.gentoo.org/show_bug.cgi?id=565358
- epatch "${FILESDIR}"/llvm-3.8-llvm-config.patch
+ epatch "${FILESDIR}"/llvm-3.9-llvm-config.patch
# disable use of SDK on OSX, bug #568758
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
@@ -374,7 +374,7 @@ src_install() {
if use clang; then
# note: magic applied in multilib_src_install()!
- CLANG_VERSION=3.8
+ CLANG_VERSION=3.9
MULTILIB_CHOST_TOOLS+=(
/usr/bin/clang