Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 695706 - flag-o-matic.eclass: test-flag-PROG(): verify selected compiler exists before trying to use it
Summary: flag-o-matic.eclass: test-flag-PROG(): verify selected compiler exists before...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-27 07:05 UTC by Tim Harder
Modified: 2019-09-30 09:00 UTC (History)
0 users

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


Attachments
0001-flag-o-matic.eclass.patch (0001-flag-o-matic.eclass-test-flag-PROG-verify-selected-c.patch,1.04 KB, patch)
2019-09-27 07:05 UTC, Tim Harder
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Harder gentoo-dev 2019-09-27 07:05:02 UTC
Created attachment 591140 [details, diff]
0001-flag-o-matic.eclass.patch

See the attached patch.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-09-27 07:13:44 UTC
Look good! Fell free to push.
Comment 2 Larry the Git Cow gentoo-dev 2019-09-27 09:13:38 UTC
The bug has been closed via the following commit(s):

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

commit cab160d3c614472e20f145e65a2d7f72bdf615b7
Author:     Tim Harder <radhermit@gentoo.org>
AuthorDate: 2019-09-27 06:58:01 +0000
Commit:     Tim Harder <radhermit@gentoo.org>
CommitDate: 2019-09-27 09:10:53 +0000

    flag-o-matic.eclass: test-flag-PROG(): verify selected compiler exists
    
    Before trying to use it. Fixes stricter phase running done by pkgcore
    which explicitly dies when encountering unknown commands.
    
    Closes: https://bugs.gentoo.org/695706
    
    Signed-off-by: Tim Harder <radhermit@gentoo.org>

 eclass/flag-o-matic.eclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Comment 3 Larry the Git Cow gentoo-dev 2019-09-30 09:00:43 UTC
The bug has been referenced in the following commit(s):

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

commit 60328373651331a8d1beab33f4a499e0b3ad61d7
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-09-30 08:52:04 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-09-30 09:00:31 +0000

    flag-o-matic.eclass: fix test-flag-PROG() for CC="gcc -m64"
    
    bug #695706 added compiler validation via 'type -p ${CC}', but that
    does not take into account possible options present in ${CC} itself:
    
      $ type -P x86_64-pc-linux-gnu-gcc -m64; echo $?
      /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc
      1
    
      $ type -P x86_64-pc-linux-gnu-gcc     ; echo $?
      /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc
      0
    
    The change picks first argument (binary name) and validates only that.
    
    Reported-by: Pavol Cupka
    Closes: https://bugs.gentoo.org/695888
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=695706
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/flag-o-matic.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)