From 516532c47c83c98c836788a308c3ac898c09c2cd Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 31 Jul 2006 15:26:56 +0000 Subject: [PATCH] Fix getgccversion logic for bug #137786 and bug #139662. This patch is from trunk r3632. svn path=/main/branches/2.1/; revision=4056 --- bin/emerge | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/emerge b/bin/emerge index da71d647f..b7d33e4a3 100755 --- a/bin/emerge +++ b/bin/emerge @@ -538,8 +538,8 @@ def getgccversion(): mystatus, myoutput = commands.getstatusoutput("eselect compiler show") if mystatus == os.EX_OK and len(myoutput.split("/")) == 2: part1, part2 = myoutput.split("/") - if len(part1.split("-")) > 0: - return gcc_ver_prefix + part1.split("-")[-1] + "/" + part2 + if part1.startswith(portage.settings["CHOST"] + "-"): + return myoutput.replace(portage.settings["CHOST"] + "-", gcc_ver_prefix, 1) mystatus, myoutput = commands.getstatusoutput("gcc-config -c") if mystatus == os.EX_OK and len(myoutput.split("-")) > 0: -- 2.26.2