| Summary: | dev-util/ccache-4.0: mangles -fcolor-diagnostics and hides the compiler not supporting it in compile-but-not-link mode | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Mihai Moldovan <ionic> |
| Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ansla80, sam, toolchain |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | https://github.com/ccache/ccache/issues/711 | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
/tmp/ccache.log
webkit-gtk-2.28.4-ccache-nocolor.patch |
||
|
Description
Mihai Moldovan
2020-10-27 15:14:18 UTC
Created attachment 668813 [details]
/tmp/ccache.log
Adding maintainer to CC. Isn't the real issue here that net-libs/webkit-gtk-2.28.4 performs the check with one compiler (ccache + gcc in this case) then performs the actual build with a different compiler (gcc)? (In reply to Andrei Slavoiu from comment #3) > Isn't the real issue here that net-libs/webkit-gtk-2.28.4 performs the check > with one compiler (ccache + gcc in this case) then performs the actual build > with a different compiler (gcc)? You could think so, but no. webkit-gtk is actually using the ccache-wrapped compiler all the way. I explicitly mentioned the compile-but-not-link mode, since *normal* compilation fails correctly, even with ccache 4.0: # /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc -fcolor-diagnostics /tmp/src.c -o /tmp/blargh x86_64-pc-linux-gnu-gcc: error: unrecognized command line option ‘-fcolor-diagnostics’ Weirdly, it only wrongly succeeds when using the -c compiler flag. > Steps to Reproduce: > MWE: > # cat src.c > int main(void) { return 0; } > # /usr/bin/x86_64-pc-linux-gnu-gcc -c -fcolor-diagnostics src.c -o > /tmp/blargh > x86_64-pc-linux-gnu-gcc: error: unrecognized command line option > ‘-fcolor-diagnostics’ > /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc > -c -fcolor-diagnostics src.c -o /tmp/blargh > [no output, so the command succeeded] Yeah, that's an unfortunate breakage. Filed as https://github.com/ccache/ccache/issues/711 Created attachment 669296 [details, diff]
webkit-gtk-2.28.4-ccache-nocolor.patch
Meanwhile webkit-gtk-2.28.4-ccache-nocolor.patch is a workaround not to inject potentially unsupported diagnostics flags.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7158e6d5be786b4e656beea266330943fe2243d1 commit 7158e6d5be786b4e656beea266330943fe2243d1 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-11-22 20:57:12 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-11-22 20:57:23 +0000 dev-util/ccache: bump up to 4.1 Among other things it should fix inconsistent handling of `-fcolor-diagnostics` in compiler and linker drivers noticed by Mihai Moldovan. Closes: https://bugs.gentoo.org/751463 Package-Manager: Portage-3.0.10, Repoman-3.0.2 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> dev-util/ccache/Manifest | 1 + dev-util/ccache/ccache-4.1.ebuild | 108 +++++++++++++++++++++ dev-util/ccache/files/ccache-4.1-atomic.patch | 23 +++++ .../ccache/files/ccache-4.1-avoid-run-user.patch | 18 ++++ 4 files changed, 150 insertions(+) |