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 6A34A139083 for ; Sat, 16 Dec 2017 20:15:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 90380E0DA7; Sat, 16 Dec 2017 20:15:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6EE79E0DA7 for ; Sat, 16 Dec 2017 20:15:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3BD8733BDE1 for ; Sat, 16 Dec 2017 20:15:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A383EAE7C for ; Sat, 16 Dec 2017 20:15:07 +0000 (UTC) From: "Andreas Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Hüttel" Message-ID: <1513455221.aab6bf7095a0ab921c78b07a202db207ce07a5f8.dilfridge@gentoo> Subject: [gentoo-commits] proj/gcc-config:master commit in: / X-VCS-Repository: proj/gcc-config X-VCS-Files: gcc-config X-VCS-Directories: / X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas Hüttel X-VCS-Revision: aab6bf7095a0ab921c78b07a202db207ce07a5f8 X-VCS-Branch: master Date: Sat, 16 Dec 2017 20:15:07 +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: 75231061-a798-4f9c-bc07-f15ad5066fa9 X-Archives-Hash: 3c2f7d0bc84a17fb823a0127a302c052 commit: aab6bf7095a0ab921c78b07a202db207ce07a5f8 Author: Shane Peelar gmail com> AuthorDate: Thu Sep 21 17:05:14 2017 +0000 Commit: Andreas Hüttel gentoo org> CommitDate: Sat Dec 16 20:13:41 2017 +0000 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=aab6bf70 Add support for symlinking appropriate LTO plugin Since Binutils 2.25, automatic loading of LTO plugins is supported from binutils, but the LTO plugins must be in the bfd-plugins directory in order to be found. This patches gcc-config to automatically do this. Signed-off-by: Shane Peelar gmail.com> gcc-config | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gcc-config b/gcc-config index ff8d8ac..e9afa24 100755 --- a/gcc-config +++ b/gcc-config @@ -689,6 +689,19 @@ switch_profile() { update_wrappers ${CTARGET} + # Update LTO plugin for GCC. Supported as of binutils 2.25. + local BFD_PLUGINS_DIR + local LIBLTO_PLUGIN + LIBLTO_PLUGIN="${EROOT}usr/libexec/gcc/${CTARGET}/${CC_COMP_VERSION}/liblto_plugin.so" + if is_cross_compiler; then + BFD_PLUGINS_DIR="${EROOT}usr/${CHOST}/${CTARGET}/binutils-bin/lib/bfd-plugins" + else + BFD_PLUGINS_DIR="${EROOT}usr/${CHOST}/binutils-bin/lib/bfd-plugins" + fi + ewarn "Updating LTO plugin symlink in ${BFD_PLUGINS_DIR}" + mkdir -p "${BFD_PLUGINS_DIR}" + ln -sf "${LIBLTO_PLUGIN}" "${BFD_PLUGINS_DIR}" + if [[ ${ROOT} == "/" ]] && \ [[ ${FORCE} == "yes" || ${envd_changed} -gt 0 ]] then