This is the mail archive of the gcc-patches@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]

[PATCH] Bump LTO_major_version


This bumps the LTO major version and makes us reject LTO objects built
with 4.5 instead of crash in the option handling code.

I tried to look at incorporating some checksum like we do for PCH, but
the mechanism can't be easily re-used and I'm somewhat lost how to
tackle the Makefile dependency issues given that LTO isn't always
enabled (I thought of doing a lto1-checksum.c similar to the cc1
and cc1plus ones and just re-use the same checksum in all frontends - 
which makes their link depend on lto1-checksum.c, conditionally).

Well, the following is at least an obvious step.

Ok for trunk?

Thanks,
Richard.

2010-11-29  Richard Guenther  <rguenther@suse.de>

	* lto-streamer.h (LTO_major_version): Bump to 2.

Index: gcc/lto-streamer.h
===================================================================
*** gcc/lto-streamer.h	(revision 167235)
--- gcc/lto-streamer.h	(working copy)
*************** along with GCC; see the file COPYING3.
*** 139,145 ****
     sections a '.' and the section type are appended.  */
  #define LTO_SECTION_NAME_PREFIX         ".gnu.lto_"
  
! #define LTO_major_version 1
  #define LTO_minor_version 0
  
  typedef unsigned char	lto_decl_flags_t;
--- 139,145 ----
     sections a '.' and the section type are appended.  */
  #define LTO_SECTION_NAME_PREFIX         ".gnu.lto_"
  
! #define LTO_major_version 2
  #define LTO_minor_version 0
  
  typedef unsigned char	lto_decl_flags_t;


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