From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3A540138206 for ; Mon, 1 Aug 2016 22:06:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1A76721C09C; Mon, 1 Aug 2016 22:05:58 +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 3C23AE0B3A for ; Mon, 1 Aug 2016 22:05:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 332E1340CFB for ; Mon, 1 Aug 2016 22:05:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6A40C2430 for ; Mon, 1 Aug 2016 22:05:52 +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: <1470088166.10067c4d5717ce3fbe6a6a50c07d409fcd88d034.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/llvm-libunwind/, sys-libs/llvm-libunwind/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/llvm-libunwind/Manifest sys-libs/llvm-libunwind/files/libunwind-3.8-cmake.patch sys-libs/llvm-libunwind/llvm-libunwind-3.8.1.ebuild sys-libs/llvm-libunwind/metadata.xml X-VCS-Directories: sys-libs/llvm-libunwind/files/ sys-libs/llvm-libunwind/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 10067c4d5717ce3fbe6a6a50c07d409fcd88d034 X-VCS-Branch: master Date: Mon, 1 Aug 2016 22:05:52 +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: 2e736455-5fcd-460c-812a-be291e564a4c X-Archives-Hash: acb5f5d9c10db92471d7d132e785e0c8 commit: 10067c4d5717ce3fbe6a6a50c07d409fcd88d034 Author: Lei Zhang gmail com> AuthorDate: Tue Jul 19 06:57:59 2016 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Aug 1 21:49:26 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10067c4d sys-libs/llvm-libunwind: new package This is LLVM's alternative implementation to sys-libs/libunwind. Package-Manager: portage-2.2.28 sys-libs/llvm-libunwind/Manifest | 1 + .../llvm-libunwind/files/libunwind-3.8-cmake.patch | 82 ++++++++++++++++++++++ .../llvm-libunwind/llvm-libunwind-3.8.1.ebuild | 42 +++++++++++ sys-libs/llvm-libunwind/metadata.xml | 16 +++++ 4 files changed, 141 insertions(+) diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest new file mode 100644 index 0000000..93c857f --- /dev/null +++ b/sys-libs/llvm-libunwind/Manifest @@ -0,0 +1 @@ +DIST libunwind-3.8.1.src.tar.xz 60596 SHA256 21e58ce09a5982255ecf86b86359179ddb0be4f8f284a95be14201df90e48453 SHA512 2a60d7c4b0aee6c58f50089ac9fa2b756ab1d74faaee32f7436ddace4510589c7ffdd20478919966ed2fa8a23ee1b5d1b26115dbd8ee2834b00b5bcd61d00b14 WHIRLPOOL f2756de12d39de2df9bf06be3024327b3ca37f2537aae17efda6e94fb9807c31cab1a2eb070aca8e7e44467ab51c69fecbeef063e07472ec59657309a16bdd1c diff --git a/sys-libs/llvm-libunwind/files/libunwind-3.8-cmake.patch b/sys-libs/llvm-libunwind/files/libunwind-3.8-cmake.patch new file mode 100644 index 0000000..5f995be --- /dev/null +++ b/sys-libs/llvm-libunwind/files/libunwind-3.8-cmake.patch @@ -0,0 +1,82 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d9b2367..b6bb5fd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -43,7 +43,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") + set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/share/llvm/cmake") + set(LLVM_LIT_PATH "${LLVM_PATH}/utils/lit/lit.py") +- else () ++ elseif (NOT LIBUNWIND_BUILT_STANDALONE) + message(FATAL_ERROR "llvm-config not found and LLVM_MAIN_SRC_DIR not defined. " + "Reconfigure with -DLLVM_CONFIG=path/to/llvm-config " + "or -DLLVM_PATH=path/to/llvm-source-root.") +@@ -53,7 +53,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") + include("${LLVM_CMAKE_PATH}/AddLLVM.cmake") + include("${LLVM_CMAKE_PATH}/HandleLLVMOptions.cmake") +- else () ++ elseif (NOT LIBUNWIND_BUILT_STANDALONE) + message(FATAL_ERROR "Not found: ${LLVM_CMAKE_PATH}") + endif () + +@@ -103,6 +103,7 @@ option(LIBUNWIND_ENABLE_ASSERTIONS "Enable assertions independent of build mode. + option(LIBUNWIND_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) + option(LIBUNWIND_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF) + option(LIBUNWIND_ENABLE_SHARED "Build libunwind as a shared library." ON) ++option(LIBUNWIND_ENABLE_STATIC "Build libunwind as a static library." OFF) + + set(LIBUNWIND_GCC_TOOLCHAIN "" CACHE STRING "GCC toolchain for cross compiling.") + set(LIBUNWIND_SYSROOT "" CACHE STRING "Sysroot for cross compiling.") +@@ -136,9 +137,9 @@ macro(append_if list condition var) + endmacro() + + set(LIBUNWIND_C_FLAGS "") +-set(LIBUNWIND_CXX_FLAGS "") ++set(LIBUNWIND_CXX_FLAGS "-std=c++11") + set(LIBUNWIND_COMPILE_FLAGS "") +-set(LIBUNWIND_LINK_FLAGS "") ++set(LIBUNWIND_LINK_FLAGS "-Wl,-z,noexecstack") + + append_if(LIBUNWIND_COMPILE_FLAGS LIBUNWIND_HAS_WERROR_FLAG -Werror=return-type) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ee01e9a..c66673e 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -18,7 +18,8 @@ set(LIBUNWIND_ASM_SOURCES + UnwindRegistersSave.S) + set_source_files_properties(${LIBUNWIND_ASM_SOURCES} + PROPERTIES +- LANGUAGE C) ++ LANGUAGE C ++ COMPILE_FLAGS "-Wa,--noexecstack") + + set(LIBUNWIND_HEADERS + AddressSpace.hpp +@@ -51,8 +52,10 @@ set(LIBUNWIND_SOURCES + + if (LIBUNWIND_ENABLE_SHARED) + add_library(unwind SHARED ${LIBUNWIND_SOURCES} ${LIBUNWIND_HEADERS}) +-else() +- add_library(unwind STATIC ${LIBUNWIND_SOURCES} ${LIBUNWIND_HEADERS}) ++endif () ++if (LIBUNWIND_ENABLE_STATIC) ++ add_library(unwind_static STATIC ${LIBUNWIND_SOURCES} ${LIBUNWIND_HEADERS}) ++ set_target_properties(unwind_static PROPERTIES OUTPUT_NAME unwind) + endif () + + # Generate library list. +@@ -106,7 +109,10 @@ set_target_properties(unwind + set_property(SOURCE ${LIBUNWIND_CXX_SOURCES} + APPEND_STRING PROPERTY COMPILE_FLAGS "${LIBUNWIND_CXX_FLAGS}") + +-install(TARGETS unwind +- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} +- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) ++if (LIBUNWIND_ENABLE_SHARED) ++ install(TARGETS unwind LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}) ++endif () ++if (LIBUNWIND_ENABLE_STATIC) ++ install(TARGETS unwind_static ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) ++endif () diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-3.8.1.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-3.8.1.ebuild new file mode 100644 index 0000000..46082d3 --- /dev/null +++ b/sys-libs/llvm-libunwind/llvm-libunwind-3.8.1.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit cmake-utils + +MY_P="libunwind-${PV}" +DESCRIPTION="C++ runtime stack unwinder from LLVM" +HOMEPAGE="https://github.com/llvm-mirror/libunwind" +SRC_URI="http://llvm.org/releases/${PV}/${MY_P}.src.tar.xz" + +LICENSE="|| ( UoI-NCSA MIT )" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+static-libs" + +DEPEND="" +RDEPEND="!sys-libs/libunwind" + +S="${WORKDIR}/${MY_P}.src" + +src_prepare() { + default + eapply "${FILESDIR}/libunwind-3.8-cmake.patch" +} + +src_configure() { + local libdir=$(get_libdir) + + local mycmakeargs=( + # work-around attempting to use llvm-config to get llvm sources + # (that are not needed at all) + -DLLVM_CONFIG=OFF + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + -DLIBUNWIND_BUILT_STANDALONE=ON + -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs) + ) + + cmake-utils_src_configure +} diff --git a/sys-libs/llvm-libunwind/metadata.xml b/sys-libs/llvm-libunwind/metadata.xml new file mode 100644 index 0000000..2380c52 --- /dev/null +++ b/sys-libs/llvm-libunwind/metadata.xml @@ -0,0 +1,16 @@ + + + + + zhanglei.april@gmail.com + Lei Zhang + + + blueness@gentoo.org + Anthony G. Basile + + + mgorny@gentoo.org + Michał Górny + +