Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128533 - print gcc host triple correctly in emerge --info output
Summary: print gcc host triple correctly in emerge --info output
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-02 09:12 UTC by Olaf Hering
Modified: 2007-01-28 10:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
portage.emerge.gcc-info.patch (portage.emerge.gcc-info.patch,2.52 KB, patch)
2006-04-02 09:14 UTC, Olaf Hering
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olaf Hering 2006-04-02 09:12:35 UTC
with foo-bar-blah as host triple, the gcc version appears only as 'gcc-' in the emerge --inof output.
It seems a foo-bar-blah-gnu is expected. But the -gnu prefix is not required. This patch from a non-python person fixes it for me:

Index: portage-2.1_pre7/bin/emerge
===================================================================
--- portage-2.1_pre7.orig/bin/emerge
+++ portage-2.1_pre7/bin/emerge
@@ -540,7 +540,10 @@ def getgccversion():
   if os.path.isfile(gcc_config_config):
     try:
          gccver_str = open(gcc_config_config).read().strip()
-         gccver = gcc_ver_prefix + string.join(gccver_str.split('-')[4:], '-')
+         gccver = gccver_str.split('-')[3:]
+         if gccver[0] is 'gnu':
+            del gccver[0]
+         gccver = gcc_ver_prefix + string.join(gccver, '-')
     except IndexError:
                        gccver = fallback()
Comment 1 Olaf Hering 2006-04-02 09:14:25 UTC
Created attachment 83718 [details, diff]
portage.emerge.gcc-info.patch
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2007-01-28 10:12:08 UTC
The gcc version parsing has been completely rewritten and should cover this case.