public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/66029] New: Build error compiling gcc5.1 using LTO
@ 2015-05-05 22:21 t at sharklasers dot com
  2015-05-05 22:25 ` [Bug lto/66029] " t at sharklasers dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: t at sharklasers dot com @ 2015-05-05 22:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

            Bug ID: 66029
           Summary: Build error compiling gcc5.1 using LTO
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: t at sharklasers dot com
  Target Milestone: ---

Created attachment 35469
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35469&action=edit
complete command line

I compiled gcc5.1 without LTO optimizations and tried to compile it again with
LTO using the new 5.1 compiler.


"openSUSE 13.2 (Harlequin) (x86_64)"

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-5.1.0/configure --prefix=gcc5.1
--enable-languages=c,c++ --enable-gold=yes --enable-ld=yes --enable-lto
--enable-bootstrap --disable-multilib
Thread model: posix
gcc version 5.1.0 (GCC)


/usr/bin/ld: error in /tmp/cc4PfHUo.ltrans1.ltrans.o(.eh_frame); no
.eh_frame_hdr table will be created.
`_Unwind_Resume' referenced in section `.text' of
/tmp/cc4PfHUo.ltrans1.ltrans.o: defined in discarded section `.text' of
unwind-dw2.o (symbol from plugin)
`_Unwind_Resume' referenced in section `.text' of
/tmp/cc4PfHUo.ltrans3.ltrans.o: defined in discarded section `.text' of
unwind-dw2.o (symbol from plugin)
`_Unwind_Resume' referenced in section `.text' of
/tmp/cc4PfHUo.ltrans3.ltrans.o: defined in discarded section `.text' of
unwind-dw2.o (symbol from plugin)
`_Unwind_Resume' referenced in section `.text.unlikely' of
/tmp/cc4PfHUo.ltrans8.ltrans.o: defined in discarded section `.text' of
unwind-dw2.o (symbol from plugin)
collect2: error: ld returned 1 exit status
Makefile:2606: recipe for target 'build/genmatch' failed


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/66029] Build error compiling gcc5.1 using LTO
  2015-05-05 22:21 [Bug lto/66029] New: Build error compiling gcc5.1 using LTO t at sharklasers dot com
@ 2015-05-05 22:25 ` t at sharklasers dot com
  2015-05-05 23:24 ` hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: t at sharklasers dot com @ 2015-05-05 22:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #1 from JD <t at sharklasers dot com> ---
I compiled with used:
-O3 -flto -fuse-linker-plugin -fno-fat-lto-objects

and tried to link with:
-flto=4 -O3 -fuse-linker-plugin


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/66029] Build error compiling gcc5.1 using LTO
  2015-05-05 22:21 [Bug lto/66029] New: Build error compiling gcc5.1 using LTO t at sharklasers dot com
  2015-05-05 22:25 ` [Bug lto/66029] " t at sharklasers dot com
@ 2015-05-05 23:24 ` hjl.tools at gmail dot com
  2015-05-05 23:30 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2015-05-05 23:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2015-05-05
     Ever confirmed|0                           |1

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to JD from comment #0)
> Created attachment 35469 [details]
> complete command line
> 
> I compiled gcc5.1 without LTO optimizations and tried to compile it again
> with LTO using the new 5.1 compiler.
> 
> 
> "openSUSE 13.2 (Harlequin) (x86_64)"
> 
> $ gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
> Target: x86_64-unknown-linux-gnu
> Configured with: ../gcc-5.1.0/configure --prefix=gcc5.1
> --enable-languages=c,c++ --enable-gold=yes --enable-ld=yes --enable-lto
> --enable-bootstrap --disable-multilib
> Thread model: posix
> gcc version 5.1.0 (GCC)

Please configure GCC with --with-build-config=bootstrap-lto for LTO build.
BTW, which linker are you using?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/66029] Build error compiling gcc5.1 using LTO
  2015-05-05 22:21 [Bug lto/66029] New: Build error compiling gcc5.1 using LTO t at sharklasers dot com
  2015-05-05 22:25 ` [Bug lto/66029] " t at sharklasers dot com
  2015-05-05 23:24 ` hjl.tools at gmail dot com
@ 2015-05-05 23:30 ` pinskia at gcc dot gnu.org
  2015-05-06 14:15 ` t at sharklasers dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-05-05 23:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Also what version of binutils is on the system?  Can you try using latest
release from FSF rather than SUSE one?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/66029] Build error compiling gcc5.1 using LTO
  2015-05-05 22:21 [Bug lto/66029] New: Build error compiling gcc5.1 using LTO t at sharklasers dot com
                   ` (2 preceding siblings ...)
  2015-05-05 23:30 ` pinskia at gcc dot gnu.org
@ 2015-05-06 14:15 ` t at sharklasers dot com
  2015-05-06 14:17 ` t at sharklasers dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: t at sharklasers dot com @ 2015-05-06 14:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #5 from JD <t at sharklasers dot com> ---
Created attachment 35477
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35477&action=edit
errors using binutils 2.25


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/66029] Build error compiling gcc5.1 using LTO
  2015-05-05 22:21 [Bug lto/66029] New: Build error compiling gcc5.1 using LTO t at sharklasers dot com
                   ` (3 preceding siblings ...)
  2015-05-06 14:15 ` t at sharklasers dot com
@ 2015-05-06 14:17 ` t at sharklasers dot com
  2015-05-06 14:21 ` trippels at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: t at sharklasers dot com @ 2015-05-06 14:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #6 from JD <t at sharklasers dot com> ---
Concerning the latest release of binutils, I have to admit I've never used a
local installation, so I might be doing something wrong here.

I downloaded and compiled version 2.25 and with that I get undefined references
to libiberty functions. I attached the diagnostics.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/66029] Build error compiling gcc5.1 using LTO
  2015-05-05 22:21 [Bug lto/66029] New: Build error compiling gcc5.1 using LTO t at sharklasers dot com
                   ` (4 preceding siblings ...)
  2015-05-06 14:17 ` t at sharklasers dot com
@ 2015-05-06 14:21 ` trippels at gcc dot gnu.org
  2015-05-06 14:48 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-05-06 14:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trippels at gcc dot gnu.org

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to JD from comment #6)
> Concerning the latest release of binutils, I have to admit I've never used a
> local installation, so I might be doing something wrong here.
> 
> I downloaded and compiled version 2.25 and with that I get undefined
> references to libiberty functions. I attached the diagnostics.

You must configure binutils with --enable-plugins.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/66029] Build error compiling gcc5.1 using LTO
  2015-05-05 22:21 [Bug lto/66029] New: Build error compiling gcc5.1 using LTO t at sharklasers dot com
                   ` (5 preceding siblings ...)
  2015-05-06 14:21 ` trippels at gcc dot gnu.org
@ 2015-05-06 14:48 ` hjl.tools at gmail dot com
  2015-05-07 15:15 ` trippels at gcc dot gnu.org
  2015-05-07 23:58 ` t at sharklasers dot com
  8 siblings, 0 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2015-05-06 14:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
There is also PR 62077.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/66029] Build error compiling gcc5.1 using LTO
  2015-05-05 22:21 [Bug lto/66029] New: Build error compiling gcc5.1 using LTO t at sharklasers dot com
                   ` (6 preceding siblings ...)
  2015-05-06 14:48 ` hjl.tools at gmail dot com
@ 2015-05-07 15:15 ` trippels at gcc dot gnu.org
  2015-05-07 23:58 ` t at sharklasers dot com
  8 siblings, 0 replies; 10+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-05-07 15:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #10 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Is the output of the following commands non-empty?

 % ar --help | grep plugin

 % echo "int main () {}" | gcc -x c++ -O2 - -flto -v 2>&1 | grep "collect2
-plugin"


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/66029] Build error compiling gcc5.1 using LTO
  2015-05-05 22:21 [Bug lto/66029] New: Build error compiling gcc5.1 using LTO t at sharklasers dot com
                   ` (7 preceding siblings ...)
  2015-05-07 15:15 ` trippels at gcc dot gnu.org
@ 2015-05-07 23:58 ` t at sharklasers dot com
  8 siblings, 0 replies; 10+ messages in thread
From: t at sharklasers dot com @ 2015-05-07 23:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #11 from JD <t at sharklasers dot com> ---
Yes, it's non-empty:

$ ar --help | grep plugin
Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin
<name>] [member-name] [count] archive-file file...
  --plugin <p> - load the specified plugin
ar: supported targets: elf64-x86-64 elf32-i386 elf32-x86-64 a.out-i386-linux
pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little
elf32-big plugin srec symbolsrec verilog tekhex binary ihex


$  echo "int main () {}" | gcc -x c++ -O2 - -flto -v 2>&1 | grep "collect2
-plugin"
 gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/collect2 -plugin
gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/liblto_plugin.so
-plugin-opt=gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccuU0Nuu.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -flto
--eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2
/usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
gcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0/crtbegin.o
-Lgcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0
-Lgcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-Lgcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0/../../.. /tmp/ccUoazVJ.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed gcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0/crtend.o
/usr/lib/../lib64/crtn.o


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-05-07 23:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-05 22:21 [Bug lto/66029] New: Build error compiling gcc5.1 using LTO t at sharklasers dot com
2015-05-05 22:25 ` [Bug lto/66029] " t at sharklasers dot com
2015-05-05 23:24 ` hjl.tools at gmail dot com
2015-05-05 23:30 ` pinskia at gcc dot gnu.org
2015-05-06 14:15 ` t at sharklasers dot com
2015-05-06 14:17 ` t at sharklasers dot com
2015-05-06 14:21 ` trippels at gcc dot gnu.org
2015-05-06 14:48 ` hjl.tools at gmail dot com
2015-05-07 15:15 ` trippels at gcc dot gnu.org
2015-05-07 23:58 ` t at sharklasers dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).