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 EE819138334 for ; Thu, 5 Jul 2018 17:39:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 28796E0985; Thu, 5 Jul 2018 17:39:57 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 E9AE6E0985 for ; Thu, 5 Jul 2018 17:39:56 +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 2259E335CA7 for ; Thu, 5 Jul 2018 17:39:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5D8C9374 for ; Thu, 5 Jul 2018 17:39:53 +0000 (UTC) From: "Guilherme Amadio" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Guilherme Amadio" Message-ID: <1530812295.9f5cbe65e5f2689faf356e647d889aa3dab0cdd4.amadio@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/features/prefix/standalone/ X-VCS-Repository: repo/gentoo X-VCS-Files: profiles/features/prefix/standalone/profile.bashrc X-VCS-Directories: profiles/features/prefix/standalone/ X-VCS-Committer: amadio X-VCS-Committer-Name: Guilherme Amadio X-VCS-Revision: 9f5cbe65e5f2689faf356e647d889aa3dab0cdd4 X-VCS-Branch: master Date: Thu, 5 Jul 2018 17:39:53 +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: ad51af67-f99c-406d-b884-f91e963977c0 X-Archives-Hash: f51c69e4ec7724e324cdc469cbc3c754 commit: 9f5cbe65e5f2689faf356e647d889aa3dab0cdd4 Author: Guilherme Amadio gentoo org> AuthorDate: Thu Jul 5 17:27:25 2018 +0000 Commit: Guilherme Amadio gentoo org> CommitDate: Thu Jul 5 17:38:15 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f5cbe65 profiles: fix sys-devel/clang on standalone prefix On standalone prefix, sys-devel/clang needs to be configured with -DDEFAULT_SYSROOT=${EPREFIX} and also needs the same treatment as sys-devel/gcc to remove --sysroot=${EPREFIX} from ld calls. profiles/features/prefix/standalone/profile.bashrc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/profiles/features/prefix/standalone/profile.bashrc b/profiles/features/prefix/standalone/profile.bashrc index 60a2af632d1..d167e7a9155 100644 --- a/profiles/features/prefix/standalone/profile.bashrc +++ b/profiles/features/prefix/standalone/profile.bashrc @@ -15,12 +15,21 @@ if [[ ${CATEGORY}/${PN} == sys-devel/gcc && ${EBUILD_PHASE} == configure ]]; the eend $? done - # use sysroot of toolchain to get currect include and library at compile time + # use sysroot of toolchain to get correct include and library at compile time EXTRA_ECONF="${EXTRA_ECONF} --with-sysroot=${EPREFIX}" ebegin "remove --sysroot call on ld for native toolchain" sed -i 's/--sysroot=%R//' gcc/gcc.c eend $? +elif [[ ${CATEGORY}/${PN} == sys-devel/clang && ${EBUILD_PHASE} == configure ]]; then + ebegin "Use ${EPREFIX} as default sysroot" + sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" "${S}"/CMakeLists.txt + eend $? + pushd "${S}/lib/Driver/ToolChains" >/dev/null + ebegin "Remove --sysroot call on ld for native toolchain" + sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp + eend $? + popd >/dev/null elif [[ ${CATEGORY}/${PN} == sys-devel/binutils && ${EBUILD_PHASE} == prepare ]]; then ebegin "Prefixifying native library path" sed -i -r "/NATIVE_LIB_DIRS/s,((/usr(/local|)|)/lib),${EPREFIX}\1,g" \