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
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?
(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
We discussed this in #gentoo-llvm and we concluded gcc-config should only update the file if it exists.
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.
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(+)
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(+)