Summary: | sys-devel/gcc[lto] fails src_compile with binutils-config[-native-symlinks] ( /work/build/./prev-gcc/gcc-ar: Cannot find binary 'ar' ) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Kent Fredric (IRC: kent\n) (RETIRED) <kentnl> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | herrtimson, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 243502 | ||
Attachments: |
gcc-10.1.0-r1:20200617-093925.log.gz
gcc-10.1.0-default-target.patch |
Description
Kent Fredric (IRC: kent\n) (RETIRED)
![]() It's specific to gcc-ar wrapper. Created attachment 645494 [details, diff]
gcc-10.1.0-default-target.patch
Try gcc-10.1.0-default-target.patch. I'm interested in both gcc bootstrap success and ${CHOST}-gcc-ar functioning after gcc is installed.
(In reply to Sergei Trofimovich from comment #2) > Created attachment 645494 [details, diff] [details, diff] > gcc-10.1.0-default-target.patch > > Try gcc-10.1.0-default-target.patch. I'm interested in both gcc bootstrap > success and ${CHOST}-gcc-ar functioning after gcc is installed. Actually, that breaks stage2/3 comparison after bootstrap. Probably because ${CHOST}-ar used host's lto plugin instead of locally built one. We'll need an ar tool redirector in gcc similar to existing ld/nm/as redirectors: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/exec-tool.in;h=4553084829697a028c9ce4b210151ddc958d3013;hb=HEAD (In reply to Sergei Trofimovich from comment #3) > (In reply to Sergei Trofimovich from comment #2) > > Created attachment 645494 [details, diff] [details, diff] [details, diff] > > gcc-10.1.0-default-target.patch > > > > Try gcc-10.1.0-default-target.patch. I'm interested in both gcc bootstrap > > success and ${CHOST}-gcc-ar functioning after gcc is installed. > > Actually, that breaks stage2/3 comparison after bootstrap. Probably because > ${CHOST}-ar used host's lto plugin instead of locally built one. We'll need > an ar tool redirector in gcc similar to existing ld/nm/as redirectors: > https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/exec-tool.in; > h=4553084829697a028c9ce4b210151ddc958d3013;hb=HEAD > sys-devel/gcc[lto] Build using Link Time Optimizations (LTO) Does USE=lto *just* make sure gcc itself is lto'd, or does it do more than that? I assume the former, but I just want to be sure. (In reply to Kent Fredric (IRC: kent\n) from comment #4) > (In reply to Sergei Trofimovich from comment #3) > > (In reply to Sergei Trofimovich from comment #2) > > > Created attachment 645494 [details, diff] [details, diff] [details, diff] [details, diff] > > > gcc-10.1.0-default-target.patch > > > > > > Try gcc-10.1.0-default-target.patch. I'm interested in both gcc bootstrap > > > success and ${CHOST}-gcc-ar functioning after gcc is installed. > > > > Actually, that breaks stage2/3 comparison after bootstrap. Probably because > > ${CHOST}-ar used host's lto plugin instead of locally built one. We'll need > > an ar tool redirector in gcc similar to existing ld/nm/as redirectors: > > https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/exec-tool.in; > > h=4553084829697a028c9ce4b210151ddc958d3013;hb=HEAD > > > sys-devel/gcc[lto] Build using Link Time Optimizations (LTO) > > Does USE=lto *just* make sure gcc itself is lto'd, or does it do more than > that? > > I assume the former, but I just want to be sure. Depends on what you are looking for. metadata.xml says: <flag name="lto">Build using Link Time Optimizations (LTO)</flag>. (In reply to Sergei Trofimovich from comment #5) > (In reply to Kent Fredric (IRC: kent\n) from comment #4) > > (In reply to Sergei Trofimovich from comment #3) > > > (In reply to Sergei Trofimovich from comment #2) > > > > Created attachment 645494 [details, diff] [details, diff] [details, diff] [details, diff] [details, diff] > > > > gcc-10.1.0-default-target.patch > > > > > > > > Try gcc-10.1.0-default-target.patch. I'm interested in both gcc bootstrap > > > > success and ${CHOST}-gcc-ar functioning after gcc is installed. > > > > > > Actually, that breaks stage2/3 comparison after bootstrap. Probably because > > > ${CHOST}-ar used host's lto plugin instead of locally built one. We'll need > > > an ar tool redirector in gcc similar to existing ld/nm/as redirectors: > > > https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/exec-tool.in; > > > h=4553084829697a028c9ce4b210151ddc958d3013;hb=HEAD > > > > > sys-devel/gcc[lto] Build using Link Time Optimizations (LTO) > > > > Does USE=lto *just* make sure gcc itself is lto'd, or does it do more than > > that? > > > > I assume the former, but I just want to be sure. > > Depends on what you are looking for. metadata.xml says: <flag > name="lto">Build using Link Time Optimizations (LTO)</flag>. And I just quoted that. The problem is for me it is insufficiently clear. I can't tell if this: - Changes the build of GCC itself to ensure GCC is linked with -flto - Changes the build of GCC so that all binaries compiled with GCC are effectively compiled with -flto Compare with say: - ssp - pie - pch - vtv - nptl These all affect *how* gcc compiles things, not just how gcc is compiled. (In reply to Kent Fredric (IRC: kent\n) from comment #6) > (In reply to Sergei Trofimovich from comment #5) > > (In reply to Kent Fredric (IRC: kent\n) from comment #4) > > > (In reply to Sergei Trofimovich from comment #3) > > > > (In reply to Sergei Trofimovich from comment #2) > > > > > Created attachment 645494 [details, diff] [details, diff] [details, diff] [details, diff] [details, diff] [details, diff] > > > > > gcc-10.1.0-default-target.patch > > > > > > > > > > Try gcc-10.1.0-default-target.patch. I'm interested in both gcc bootstrap > > > > > success and ${CHOST}-gcc-ar functioning after gcc is installed. > > > > > > > > Actually, that breaks stage2/3 comparison after bootstrap. Probably because > > > > ${CHOST}-ar used host's lto plugin instead of locally built one. We'll need > > > > an ar tool redirector in gcc similar to existing ld/nm/as redirectors: > > > > https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/exec-tool.in; > > > > h=4553084829697a028c9ce4b210151ddc958d3013;hb=HEAD > > > > > > > sys-devel/gcc[lto] Build using Link Time Optimizations (LTO) > > > > > > Does USE=lto *just* make sure gcc itself is lto'd, or does it do more than > > > that? > > > > > > I assume the former, but I just want to be sure. > > > > Depends on what you are looking for. metadata.xml says: <flag > > name="lto">Build using Link Time Optimizations (LTO)</flag>. > > And I just quoted that. The problem is for me it is insufficiently clear. > > I can't tell if this: > > - Changes the build of GCC itself to ensure GCC is linked with -flto > - Changes the build of GCC so that all binaries compiled with GCC are > effectively compiled with -flto In gentoo gcc always enables LTO frontend. USE=lto builds gcc itself with LTO. |