From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1109165-garchives=archives.gentoo.org@lists.gentoo.org>
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 25423138334
	for <garchives@archives.gentoo.org>; Thu,  5 Sep 2019 07:24:05 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5B4BFE0798;
	Thu,  5 Sep 2019 07:24:04 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(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 3F7FEE0798
	for <gentoo-commits@lists.gentoo.org>; Thu,  5 Sep 2019 07:24:04 +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 DBA6534AC64
	for <gentoo-commits@lists.gentoo.org>; Thu,  5 Sep 2019 07:24:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 344A1763
	for <gentoo-commits@lists.gentoo.org>; Thu,  5 Sep 2019 07:24:01 +0000 (UTC)
From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" <slyfox@gentoo.org>
Message-ID: <1567668005.231bc60d6fa6b8eb309ac2ca308f7c60213f81a3.slyfox@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: slyfox
X-VCS-Committer-Name: Sergei Trofimovich
X-VCS-Revision: 231bc60d6fa6b8eb309ac2ca308f7c60213f81a3
X-VCS-Branch: master
Date: Thu,  5 Sep 2019 07:24:01 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 16e85715-85d9-4c06-820c-b70346205783
X-Archives-Hash: 05646f3b620e4898dac52d41770e24cb

commit:     231bc60d6fa6b8eb309ac2ca308f7c60213f81a3
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  5 07:20:05 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Sep  5 07:20:05 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=231bc60d

gcc-config: drop GCC_PATH reconstruction in /etc/env.d/gcc

toolchain.eclass constructs correct GCC_PATH since 2007:
commit 7d9f89700a2ee50674c0d871ec6d21b468ac6206
("start moving to GCC_PATH for env.d #174422 and cleanup "
"gcc-config logic so that it doesnt matter what the ROOT value is")

We don't need to rewrite /etc/env.d/gcc/<TARGET>-<VER>
files anymore (owned by gcc ebuilds).

Bug: https://bugs.gentoo.org/174422
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 gcc-config | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/gcc-config b/gcc-config
index 762695f..7f2d69f 100755
--- a/gcc-config
+++ b/gcc-config
@@ -145,26 +145,6 @@ is_cross_compiler() {
 	[[ ${CC_COMP/${CHOST}} == ${CC_COMP} ]]
 }
 
-convert_profile_paths() {
-	# Older gcc's used PATH= and ROOTPATH= in the env.d files.
-	# Newer one's only use GCC_PATH=.  Convert old to new here.
-	cp -p "${GCC_ENV_D}/${CC_COMP}" "${GCC_ENV_D}/${CC_COMP}.gcc-config-ref" || return 1
-	GCC_PATH=$(
-		unset GCC_PATH PATH ROOTPATH
-		source "${GCC_ENV_D}/${CC_COMP}"
-		echo ${GCC_PATH:-${PATH:-${ROOTPATH}}}
-	)
-	${SED} -i \
-		-e '/^PATH=/d' \
-		-e '/^ROOTPATH=/d' \
-		-e '/^GCC_PATH=/d' \
-		"${GCC_ENV_D}/${CC_COMP}" || return 1
-	echo "GCC_PATH=\"${GCC_PATH}\"" >> "${GCC_ENV_D}/${CC_COMP}" || return 1
-	touch -r "${GCC_ENV_D}/${CC_COMP}.gcc-config-ref" "${GCC_ENV_D}/${CC_COMP}" || return 1
-	rm -f "${GCC_ENV_D}/${CC_COMP}.gcc-config-ref" || return 1
-	return 0
-}
-
 # Usage: atomic_ln <source file> <destination dir> <destination file name>
 atomic_ln() {
 	local src=$1 dst=$2 dstfile=$3 tmp
@@ -585,10 +565,6 @@ switch_profile() {
 		ebegin "Switching native-compiler to ${CC_COMP}"
 	fi
 
-	if egrep -q '^(PATH|ROOTPATH)=' "${GCC_ENV_D}/${CC_COMP}" ; then
-		convert_profile_paths "${GCC_ENV_D}/${CC_COMP}" || return 1
-	fi
-
 	# Setup things properly again for this profile
 	unset GCC_SPECS LDPATH MULTIOSDIRS
 	source "${GCC_ENV_D}/${CC_COMP}"