Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 868639 - sys-devel/gcc-config: provide Clang configuration file
Summary: sys-devel/gcc-config: provide Clang configuration file
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: https://github.com/llvm/llvm-project/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-06 00:18 UTC by emacsray
Modified: 2022-10-10 14:18 UTC (History)
4 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 emacsray 2022-09-06 00:18:56 UTC
Clang has some gcc-config code which should migrate to [configuration file](https://clang.llvm.org/docs/UsersManual.html#configuration-files).

See https://github.com/llvm/llvm-project/issues/57570 for detail. gcc-config needs to provide Clang configuration files.

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-22 23:29:21 UTC
Not sure which path gcc-config should install the config file to.

Presumably the default config file we install with clang should use "@gcc-config.options" or similar to include a small config file gcc-config would install.

Also, to which path? /etc/clang?
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-23 06:45:03 UTC
(In reply to Sam James from comment #1)
> Not sure which path gcc-config should install the config file to.
> 
> Presumably the default config file we install with clang should use
> "@gcc-config.options" or similar to include a small config file gcc-config
> would install.
> 
> Also, to which path? /etc/clang?

nevermind, mgorny pointed out what I was missing in the PR
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-08 22:11:09 UTC
We discussed this in #gentoo-llvm and we concluded gcc-config should only update the file if it exists.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-10-09 06:49:37 UTC
Little more context: I'm not 100% sure this idea is workable, as the config file would also force host's install dir when working with a --sysroot.  If it turns out that we have to revert it, I'd prefer that gcc-config wouldn't recreate the file once clang-common removed it.
Comment 5 Larry the Git Cow gentoo-dev 2022-10-09 20:55:34 UTC
The bug has been referenced in the following commit(s):

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

commit 3ba93fbb30984b59eb99883292f336e6a0b1ea8b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-10-09 20:33:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-09 20:55:26 +0000

    gcc-config: update /etc/clang/gentoo-gcc-install.cfg if exists
    
    * Set '--gcc-install-dir' for Clang to direct it to the currently
      active GCC installation.
    
    * Only write to /etc/clang/gentoo-gcc-install.cfg if it already exists
      to allow us to back out the change gracefully (by stopping installation
      in sys-devel/clang-common) as there's some concerns wrt sysroot compatibility.
    
    Bug: https://github.com/llvm/llvm-project/issues/57570
    Bug: https://bugs.gentoo.org/868639
    Signed-off-by: Sam James <sam@gentoo.org>

 gcc-config | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
Comment 6 Larry the Git Cow gentoo-dev 2022-10-10 14:18:09 UTC
The bug has been closed via the following commit(s):

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

commit 1f56ffa16dbca7cc38c49bbb977a384f894796e7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-10-10 14:16:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-10 14:17:59 +0000

    sys-devel/gcc-config: add 2.8
    
    Closes: https://bugs.gentoo.org/868639
    Bug: https://bugs.gentoo.org/872971
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc-config/Manifest              |  1 +
 sys-devel/gcc-config/gcc-config-2.8.ebuild | 60 ++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)