This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Discussion about merging Go frontend
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc at gcc dot gnu dot org, Dave Korn <dave dot korn dot cygwin at gmail dot com>, Andi Kleen <andi at firstfloor dot org>, Andrew Pinski <pinskia at gmail dot com>, Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 6 Nov 2010 20:57:55 +0100
- Subject: Re: Discussion about merging Go frontend
- References: <mcr7hh8qhb5.fsf@google.com> <4CC60C5E.6050605@gmail.com> <mcr1v79bx8q.fsf@google.com>
> 2010-10-28 Ian Lance Taylor <iant@google.com>
>
> * lto-objfile.c: New file.
> * lto-elf.c: Remove file.
This has removed the support for compatible architectures present in lto-elf.c
and hasn't added any replacement in libiberty, so a bunch of LTO tests fail
again on 32-bit SPARC/Solaris.
The old code reads:
/* Return true if ELF_MACHINE is compatible with the cached value of the
architecture and possibly update the latter. Return false otherwise.
Note: if you want to add more EM_* cases, you'll need to provide the
corresponding definitions at the beginning of the file. */
static bool
is_compatible_architecture (Elf64_Half elf_machine)
{
if (cached_file_attrs.elf_machine == elf_machine)
return true;
switch (cached_file_attrs.elf_machine)
{
case EM_SPARC:
if (elf_machine == EM_SPARC32PLUS)
{
cached_file_attrs.elf_machine = elf_machine;
return true;
}
break;
case EM_SPARC32PLUS:
if (elf_machine == EM_SPARC)
return true;
break;
default:
break;
}
return false;
}
so it was not only accepting object files with compatible architectures in the
same LTO compilation, but also updating the current architecture for later
write operations. This is modelled on the linker.
--
Eric Botcazou