Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 706318 - sys-devel/gcc-config-2.2: gcc-10: swapped target numbers
Summary: sys-devel/gcc-config-2.2: gcc-10: swapped target numbers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-25 15:49 UTC by lekto
Modified: 2020-01-26 14:37 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge.info,5.79 KB, application/x-info)
2020-01-25 15:49 UTC, lekto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lekto 2020-01-25 15:49:26 UTC
Created attachment 604288 [details]
emerge --info

>lapek ~ # eselect gcc list
> [1] x86_64-pc-linux-gnu-9.2.0
> [2] x86_64-pc-linux-gnu-10.0.0-pre9999 *
>lapek ~ # eselect gcc set 1
> * Switching native-compiler to x86_64-pc-linux-gnu-10.0.0-pre9999 ...                                                                                                                                       >[ ok ]
>lapek ~ # eselect gcc set 2
> * Switching native-compiler to x86_64-pc-linux-gnu-9.2.0 ...
>>>> Regenerating /etc/ld.so.cache...                                                                                                                                                                         >[ ok ]
>
> * If you intend to use the gcc from the new profile in an already
> * running shell, please remember to do:
>
> *   . /etc/profile
>
>lapek ~ # eselect gcc list
> [1] x86_64-pc-linux-gnu-9.2.0 *
> [2] x86_64-pc-linux-gnu-10.0.0-pre9999
>lapek ~ # eselect gcc set 2
> * Switching native-compiler to x86_64-pc-linux-gnu-9.2.0 ...                                                                                                                                                >[ ok ]
>lapek ~ # eselect gcc set 1
> * Switching native-compiler to x86_64-pc-linux-gnu-10.0.0-pre9999 ...
>>>> Regenerating /etc/ld.so.cache...                                                                                                                                                                         >[ ok ]
>
> * If you intend to use the gcc from the new profile in an already
> * running shell, please remember to do:
>
> *   . /etc/profile

Notice that while showing list eselect shows that gcc-9 is 1 and gcc-10 is 2, but when selecting gcc-9 is 2 and gcc-10 is 1.
Comment 1 Alexander Tsoy 2020-01-26 00:02:08 UTC
This is already fixed in git, but no release made yet
https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=bc80e12ab133a00ece4059df40d672889fcf6bf0
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-01-26 13:19:14 UTC
(In reply to Alexander Tsoy from comment #1)
> This is already fixed in git, but no release made yet
> https://gitweb.gentoo.org/proj/gcc-config.git/commit/
> ?id=bc80e12ab133a00ece4059df40d672889fcf6bf0

No, I think I've completely missed numbering case. There are no more commits after v2.2 release.

As a workaround you can use full target name:
    # gcc-config x86_64-pc-linux-gnu-10.0.0-pre9999
Comment 3 Larry the Git Cow gentoo-dev 2020-01-26 13:26:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=4e9362688c95ac02bafc014a16bbfd399b86ca8c

commit 4e9362688c95ac02bafc014a16bbfd399b86ca8c
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-01-26 13:23:54 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-01-26 13:23:54 +0000

    gcc-config: fix numbered access to toolchains
    
    In commit bc80e12ab1 ("gcc-config: add basic version sorting support")
    i've missed the case of accessing toolchain by number:
    
        $ gcc-config -L 1
    
    The change adds version sorting to numbered access as well.
    
    Reported-by: lekto@o2.pl
    Bug: https://bugs.gentoo.org/706318
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 gcc-config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 Larry the Git Cow gentoo-dev 2020-01-26 13:44:08 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=5ce9c530743552c7ffdc331a2f36e566bfb3b33a

commit 5ce9c530743552c7ffdc331a2f36e566bfb3b33a
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-01-26 13:43:14 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-01-26 13:43:14 +0000

    tests: add a test for bug #706318
    
    Bug: https://bugs.gentoo.org/706318
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 tests/multi-configs/test.numbered                                 | 7 +++++++
 tests/multi-configs/test.numbered.exp                             | 8 ++++++++
 tests/multi-configs/usr/lib/gcc/arm-none-eabi/4.5.3/.keep         | 0
 tests/multi-configs/usr/lib/gcc/arm-unknown-linux-gnu/4.5.3/.keep | 0
 .../usr/lib/gcc/arm-unknown-linux-gnueabi/4.5.3/.keep             | 0
 tests/multi-configs/usr/lib/gcc/x86_64-pc-linux-gnu/10.0.0/.keep  | 0
 tests/multi-configs/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/.keep  | 0
 tests/multi-configs/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/.keep   | 0
 tests/multi-configs/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/.keep   | 0
 9 files changed, 15 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2020-01-26 14:37:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2de78cfc2af4be72a28555ddc8b17c1f43f216f

commit c2de78cfc2af4be72a28555ddc8b17c1f43f216f
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-01-26 14:36:52 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-01-26 14:37:08 +0000

    sys-devel/gcc-config: bump up to 2.2.1
    
    One new change:
    - fix numbered access to toolchains, bug #706318
    
    Closes: https://bugs.gentoo.org/706318
    Package-Manager: Portage-2.3.85, Repoman-2.3.20
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/gcc-config/Manifest                |  1 +
 sys-devel/gcc-config/gcc-config-2.2.1.ebuild | 54 ++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)