This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Success with MinGW and AVR and LTO - almost


I have just succeed in building last snapshot version 4.5.0 20100107 for AVR target with working LTO on both LINUX and MinGW hosts!

As noted before #define LINKER_NAME has to be deleted from target avr.h (I will raise patch for this)

I also built avr target for MINGW under MSYS and this has no obvious issues for either build or use with normal (non-lto) compilation
However, LTO use failed completely.


LTO using libelf needs to handle files as BINARY with Windows. This would seem to apply to any target on MinGW

I hacked fopen/open calls in lto.c and lto-elf.c to use O_BINARY and "rb" and compilation with -flto was then successful!

I am not sure how this should be fixed properly.

Andy






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]