This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/81342] LTO: lto1: internal compiler error: Segmentation fault
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Jul 2017 09:07:49 +0000
- Subject: [Bug c/81342] LTO: lto1: internal compiler error: Segmentation fault
- Auto-submitted: auto-generated
- References: <bug-81342-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81342
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |INVALID
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Well, if you do
gcc -m32 -flto -c x.c
you can't simply "objcopy" that x.o file to 64bits as objcopy doesn't know
how to handle LTO bytecode.
I suppose lto-wrapper could diagnose mismatched -m32/-m64 (but those are
target flags).
The solution is to _not_ use -flto for the 32bit bootloader part. Thus
${PREFIX}gcc -c $CFLAGS -m32 code32.c -o code32.o32 -fno-lto
${PREFIX}objcopy -O elf64-x86-64 code32.o32 code32.o