[PATCH,LTO]Access elf files as binary on window host

Richard Guenther richard.guenther@gmail.com
Mon Jan 11 11:24:00 GMT 2010


On Mon, Jan 11, 2010 at 1:17 AM, Andrew Hutchinson
<andrewhutchinson@cox.net> wrote:
> Hi,
>
> The attached patch changes LTO's access of ELF files, on Windows host, to
> binary. That is, it will not be subject to text conversions.
> This otherwise this completely  breaks LTO on MinGW host.
>
> On non-Windows host, the changes are nop.
>
> I have built avr target on i686-pc-Linux-gnu, with no ill effects. This was
> Bootstrapped and testsuite run from yesterdays 4.5 head.
> Result were unaffected by this patch.
>
> I also took 20100107 gcc/g++ snapshot and bootstrapped for avr target on
>  i686-pc-mingw32 host.
> This was configured and built under MSYS, using MinGW compiler. (Simply
> MinGW+msys+msysDTK+dependencies)
>
> Target libraries (avr-libc) were built and manually tested - since MinGW
> does not support testsuite infrastructure.
>
> By looking at object files, I also confirmed that flto option successfully
> executed and really did optimize across object files.
>
> In both cases target file avr.h was patched to remove #define  LINKER_NAME
> (required for  lto to work on this target)
> (see http://gcc.gnu.org/ml/gcc-patches/2010-01/msg00472.html)
>
>
> Ok for 4.5 head?

Ok.

Thanks,
Richard.

>
> 2010-01-10  Andy Hutchinson  <hutchinsonandy@gcc.gnu.org>
>
>   * lto.c (O_BINARY): Define.
>   (lto_read_section_data): Open file in binary mode.
>   * lto-elf.c (O_BINARY): Define.
>   (lto_elf_file_open): Open file in binary mode.
>
>



More information about the Gcc-patches mailing list