From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1B8D359CA9 for ; Mon, 28 Mar 2016 21:31:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 50CB121C00B; Mon, 28 Mar 2016 21:31:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9BF3121C00B for ; Mon, 28 Mar 2016 21:31:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0C9EB340BB9 for ; Mon, 28 Mar 2016 21:31:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0E3E285A for ; Mon, 28 Mar 2016 21:31:40 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1459200691.234e8985ace9589ec251d7020648b9c10e4c2d25.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/llvm/files/, sys-devel/llvm/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/llvm/files/llvm-3.9-llvm-config.patch sys-devel/llvm/llvm-9999.ebuild X-VCS-Directories: sys-devel/llvm/files/ sys-devel/llvm/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 234e8985ace9589ec251d7020648b9c10e4c2d25 X-VCS-Branch: master Date: Mon, 28 Mar 2016 21:31:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9310b6ff-6f12-4232-a400-4328cccd9c66 X-Archives-Hash: ec099140995f151b4e2d1d683a3150fa commit: 234e8985ace9589ec251d7020648b9c10e4c2d25 Author: Michał Górny gentoo org> AuthorDate: Mon Mar 28 21:22:50 2016 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Mar 28 21:31:31 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=234e8985 sys-devel/llvm: Update patches for the live ebuild sys-devel/llvm/files/llvm-3.9-llvm-config.patch | 72 +++++++++++++++---------- sys-devel/llvm/llvm-9999.ebuild | 6 ++- 2 files changed, 48 insertions(+), 30 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 index dc63b70..d4363ad 100644 --- a/sys-devel/llvm/files/llvm-3.9-llvm-config.patch +++ b/sys-devel/llvm/files/llvm-3.9-llvm-config.patch @@ -1,37 +1,51 @@ -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}") +From af798c5a6e4b2c6c98cce89b5d6fc8d33f9345cf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Wed, 2 Dec 2015 16:04:56 +0100 +Subject: [PATCH 1/2] llvm-config: Clean up exported values, update for shared + linking + +Gentoo-specific fixup for llvm-config, including: +- wiping build-specific CFLAGS, CXXFLAGS, +- updating library suffixes for shared libs, +- wiping --system-libs for shared linking, +- banning --obj-root and --src-root due to no sources installed, +- making --build-mode return "Release" rather than "Gentoo". + +Thanks to Steven Newbury for the initial patch. + +Bug: https://bugs.gentoo.org/565358 +Bug: https://bugs.gentoo.org/501684 +--- + tools/llvm-config/CMakeLists.txt | 11 ++++++++--- + tools/llvm-config/llvm-config.cpp | 20 +++++++++++++++----- + 2 files changed, 23 insertions(+), 8 deletions(-) + +diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt +index 32d0f4c..6e99832 100644 +--- a/tools/llvm-config/CMakeLists.txt ++++ b/tools/llvm-config/CMakeLists.txt +@@ -29,2 +29,6 @@ set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_ +-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}") +# 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_CFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${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}) +@@ -39 +43,2 @@ 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; +diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp +index 94d426b..fb1bdfa 100644 +--- a/tools/llvm-config/llvm-config.cpp ++++ b/tools/llvm-config/llvm-config.cpp +@@ -525 +525,2 @@ int main(int argc, char **argv) { +- OS << build_mode << '\n'; ++ // force Release since we force non-standard Gentoo build mode ++ OS << "Release" << '\n'; +@@ -540,4 +541,13 @@ int main(int argc, char **argv) { - } else if (Arg == "--obj-root") { - OS << ActivePrefix << '\n'; - } else if (Arg == "--src-root") { @@ -49,6 +63,6 @@ diff -Naur llvm-9999.orig/tools/llvm-config/llvm-config.cpp llvm-9999/tools/llvm + << Arg << " not available\n"; + exit(1); + } - } else if (Arg == "--link-shared") { - LinkMode = LinkModeShared; - } else if (Arg == "--link-static") { +-- +2.7.4 + diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild index 14c5da5..80eef1b 100644 --- a/sys-devel/llvm/llvm-9999.ebuild +++ b/sys-devel/llvm/llvm-9999.ebuild @@ -165,6 +165,10 @@ src_prepare() { # https://bugs.gentoo.org/show_bug.cgi?id=565358 eapply "${FILESDIR}"/llvm-3.9-llvm-config.patch + # Restore SOVERSIONs for shared libraries + # https://bugs.gentoo.org/show_bug.cgi?id=578392 + eapply "${FILESDIR}"/llvm-3.8-soversion.patch + # disable use of SDK on OSX, bug #568758 sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die @@ -223,7 +227,7 @@ multilib_src_configure() { local mycmakeargs=( -DLLVM_LIBDIR_SUFFIX=${libdir#lib} - -DLLVM_LINK_LLVM_DYLIB=ON + -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_TIMESTAMPS=OFF -DLLVM_TARGETS_TO_BUILD="${targets}" -DLLVM_BUILD_TESTS=$(usex test)