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 C1DDC138331 for ; Sat, 1 Oct 2016 13:06:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0912321C081; Sat, 1 Oct 2016 13:06:06 +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 CD08421C081 for ; Sat, 1 Oct 2016 13:06:05 +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 8F31F340EDF for ; Sat, 1 Oct 2016 13:06:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5CC7A24A0 for ; Sat, 1 Oct 2016 13:06:03 +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: <1475327154.52b4c3988313f8f4875ff6d12236c0b6120bb46f.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/llvm/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/llvm/llvm-3.9.0.ebuild X-VCS-Directories: sys-devel/llvm/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 52b4c3988313f8f4875ff6d12236c0b6120bb46f X-VCS-Branch: master Date: Sat, 1 Oct 2016 13:06:03 +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: 2dd37bf6-3369-46b6-83be-f857ce4e8609 X-Archives-Hash: 4fa1ae2517224b95d38dc12adec4b279 commit: 52b4c3988313f8f4875ff6d12236c0b6120bb46f Author: Michał Górny gentoo org> AuthorDate: Sat Oct 1 06:59:20 2016 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Oct 1 13:05:54 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52b4c398 sys-devel/llvm: Backport uncond wrapper install to 3.9.0 sys-devel/llvm/llvm-3.9.0.ebuild | 76 +++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 43 deletions(-) diff --git a/sys-devel/llvm/llvm-3.9.0.ebuild b/sys-devel/llvm/llvm-3.9.0.ebuild index a5269d3..8ead13e 100644 --- a/sys-devel/llvm/llvm-3.9.0.ebuild +++ b/sys-devel/llvm/llvm-3.9.0.ebuild @@ -426,18 +426,6 @@ src_install() { ) if use clang; then - # note: magic applied in multilib_src_install()! - CLANG_VERSION=${PV%.*} - - MULTILIB_CHOST_TOOLS+=( - /usr/bin/clang - /usr/bin/clang++ - /usr/bin/clang-cl - /usr/bin/clang-${CLANG_VERSION} - /usr/bin/clang++-${CLANG_VERSION} - /usr/bin/clang-cl-${CLANG_VERSION} - ) - MULTILIB_WRAPPED_HEADERS+=( /usr/include/clang/Config/config.h ) @@ -445,29 +433,11 @@ src_install() { multilib-minimal_src_install - # Remove unnecessary headers on FreeBSD, bug #417171 - if use kernel_FreeBSD && use clang; then - rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h || die - fi -} - -multilib_src_install() { - cmake-utils_src_install - - if multilib_is_native_abi; then - # Symlink the gold plugin. - if use gold; then - dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins" - dosym "../../../../$(get_libdir)/LLVMgold.so" \ - "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so" - fi - fi - - # apply CHOST and CLANG_VERSION to clang executables - # they're statically linked so we don't have to worry about the lib if use clang; then + # Apply CHOST and version suffix to clang tools + local clang_version=${PV%.*} local clang_tools=( clang clang++ clang-cl ) - local i + local abi i # cmake gives us: # - clang-X.Y @@ -477,24 +447,44 @@ multilib_src_install() { # - clang-X.Y # - clang++-X.Y, clang-cl-X.Y -> clang-X.Y # - clang, clang++, clang-cl -> clang*-X.Y - # so we need to fix the two tools + # also in CHOST variant for i in "${clang_tools[@]:1}"; do rm "${ED%/}/usr/bin/${i}" || die - dosym "clang-${CLANG_VERSION}" "/usr/bin/${i}-${CLANG_VERSION}" - dosym "${i}-${CLANG_VERSION}" "/usr/bin/${i}" + dosym "clang-${clang_version}" "/usr/bin/${i}-${clang_version}" + dosym "${i}-${clang_version}" "/usr/bin/${i}" done - # now prepend ${CHOST} and let the multilib-build.eclass symlink it - if ! multilib_is_native_abi; then - # non-native? let's replace it with a simple wrapper + # now create wrappers for all supported ABIs + for abi in $(get_all_abis); do + local abi_flags=$(get_abi_CFLAGS "${abi}") + local abi_chost=$(get_abi_CHOST "${abi}") for i in "${clang_tools[@]}"; do - rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die - cat > "${T}"/wrapper.tmp <<-_EOF_ + cat > "${T}"/wrapper.tmp <<-_EOF_ || die #!${EPREFIX}/bin/sh - exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}" + exec "${i}-${clang_version}" ${abi_flags} "\${@}" _EOF_ - newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}" + newbin "${T}"/wrapper.tmp "${abi_chost}-${i}-${clang_version}" + dosym "${abi_chost}-${i}-${clang_version}" \ + "/usr/bin/${abi_chost}-${i}" done + done + fi + + # Remove unnecessary headers on FreeBSD, bug #417171 + if use kernel_FreeBSD && use clang; then + rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h || die + fi +} + +multilib_src_install() { + cmake-utils_src_install + + if multilib_is_native_abi; then + # Symlink the gold plugin. + if use gold; then + dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins" + dosym "../../../../$(get_libdir)/LLVMgold.so" \ + "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so" fi fi }