Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 876901 - sys-devel/clang-toolchain-symlinks: stop installing i686-pc-linux-gnu-* (multilib) symlinks (or sys-devel/gcc-config: install i686-pc-linux-gnu-* symlinks?)
Summary: sys-devel/clang-toolchain-symlinks: stop installing i686-pc-linux-gnu-* (mult...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-13 01:00 UTC by Sam James
Modified: 2022-10-13 19:31 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-13 01:00:13 UTC
Originally reported by Ionen. Very much related to bug 872416.

Clang is installing these (and I think it's fair for it to do so):
# equery f sys-devel/clang-toolchain-symlinks | grep i686
/usr/lib/llvm/15/bin/i686-pc-linux-gnu-c++
/usr/lib/llvm/15/bin/i686-pc-linux-gnu-cc
/usr/lib/llvm/15/bin/i686-pc-linux-gnu-cpp
/usr/lib/llvm/16/bin/i686-pc-linux-gnu-c++
/usr/lib/llvm/16/bin/i686-pc-linux-gnu-cc
/usr/lib/llvm/16/bin/i686-pc-linux-gnu-cpp

But gcc-config doesn't currently provide them. This means we have a situation like in bug 872416 but only for multilib builds.

1. Do we find a way for gcc-config to do it, probably by just installing wrappers w/ -m32 calls?

2. Or do we just get clang-toolchain-symlinks to stop installing them for now?
Comment 1 Ionen Wolkens gentoo-dev 2022-10-13 02:06:04 UTC
ftr this came up because multilib doesn't export CPP unlike CC (given this tend to cause other problems), and then autoconf picks clang's i686-pc-linux-gnu-cpp which may or may not lead to issues.

If go with adding i686-*, note there's others missing that are present in *-symlinks, e.g. binutils-config's i686-*-ld, i686-*-strip. If wanted to be consistent even if not in symlinks, also i686-*-pkg-config and maybe more.

It'll also conflict with matching i686 crossdev for some rare users. Assume(?) they want to keep x86 stuff in a different crossdev ROOT, albeit their doing this tend to cause issues like bug #472038. Supporting this is questionable but will likely need to inform/handle in some way if retake these.

That aside, boring i686-w32-mingw32 shell wrappers that use -m32 is what I did for mingw64-toolchain so that it'd be interchangeable with crossdev without complexity (crossdev builds a i686* without -m64 support, so it's always -m32), ideally wish it'd be like clang that handles this without wrappers but not something I've looked at.

tl;dr think may be better to drop llvm's i686 symlinks for now unless want the full venture
Comment 2 Larry the Git Cow gentoo-dev 2022-10-13 15:41:16 UTC
The bug has been referenced in the following commit(s):

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

commit 40be2519bcd439fc67a3a8c77656388d05a3c3c4
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2022-10-13 15:38:01 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-10-13 15:41:13 +0000

    sys-devel/lld-toolchain-symlinks: Do not multilib by default
    
    Bug: https://bugs.gentoo.org/876901
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 ...nks-14.ebuild => lld-toolchain-symlinks-14-r1.ebuild} | 16 +++++++++++-----
 ...nks-15.ebuild => lld-toolchain-symlinks-15-r1.ebuild} | 16 +++++++++++-----
 ...nks-16.ebuild => lld-toolchain-symlinks-16-r1.ebuild} | 16 +++++++++++-----
 sys-devel/lld-toolchain-symlinks/metadata.xml            |  5 +++++
 4 files changed, 38 insertions(+), 15 deletions(-)

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

commit 831fe6faf3f10d6ec9081dabe6c912ed910f43f8
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2022-10-13 15:34:42 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-10-13 15:41:12 +0000

    sys-devel/clang-toolchain-symlinks: Do not multilib by default
    
    Bug: https://bugs.gentoo.org/876901
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 ...-r1.ebuild => clang-toolchain-symlinks-14-r2.ebuild} | 17 ++++++++++++-----
 ...-r1.ebuild => clang-toolchain-symlinks-15-r2.ebuild} | 17 ++++++++++++-----
 ...-r1.ebuild => clang-toolchain-symlinks-16-r2.ebuild} | 17 ++++++++++++-----
 sys-devel/clang-toolchain-symlinks/metadata.xml         |  5 +++++
 4 files changed, 41 insertions(+), 15 deletions(-)

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

commit 5ec6220049870a8d8f097823a8e682b8fa1df823
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2022-10-13 15:31:16 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-10-13 15:41:11 +0000

    sys-devel/llvm-toolchain-symlinks: Do not multilib by default
    
    Bug: https://bugs.gentoo.org/876901
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 ...ks-14.ebuild => llvm-toolchain-symlinks-14-r1.ebuild} | 16 +++++++++++-----
 ...ks-15.ebuild => llvm-toolchain-symlinks-15-r1.ebuild} | 16 +++++++++++-----
 ...ks-16.ebuild => llvm-toolchain-symlinks-16-r1.ebuild} | 16 +++++++++++-----
 sys-devel/llvm-toolchain-symlinks/metadata.xml           |  5 +++++
 4 files changed, 38 insertions(+), 15 deletions(-)