On Tue, Apr 20, 2021 at 8:49 PM Martin Liška <mli...@suse.cz> wrote: > > On 4/20/21 2:46 PM, Richard Biener wrote: > > OK. Can you somehow arrange for trunk to pick up LTO_major from GCC > > major automagically then? > > I have a pretty nice solution for it where I extended (and simplified) > the existing gcov-iov.c generator. Doing that we can remove gcc/version.[ch]. > > Using the patch, the following version.h is generated: > > #ifndef VERSION_H > #define VERSION_H > > /* Generated automatically by genversion. */ > > #define GCC_major_version 12 > > /* The complete version string, assembled from several pieces. > BASEVER, DATESTAMP, DEVPHASE, and REVISION are defined by the > Makefile. */ > > #define version_string "12.0.0 20210420 (experimental)" > #define pkgversion_string "(GCC) " > > /* This is the location of the online document giving instructions for > reporting bugs. If you distribute a modified version of GCC, > please configure with --with-bugurl pointing to a document giving > instructions for reporting bugs to you, not us. (You are of course > welcome to forward us bugs reported to you, if you determine that > they are not bugs in your modifications.) */ > > #define bug_report_url "<https://gcc.gnu.org/bugs/>" > > #define GCOV_VERSION ((gcov_unsigned_t)0x42323020) /* B20 */ > > #endif /* VERSION_H */ > > Ready for master?
Nice. This is OK if others do not have further comments. I think we'd want to explore whether we can integrate genchecksum.c as well and make the PCH checksum based on a set of source files (including the generated auto-host.h) - that might allow removing the two-stage link and my "hack" to re-use the version from prev-gcc as well as our openSUSE "hack" for reproducible builds which elides genchecksum.c for the use of the build-id in the actual executables. Richard. > Thanks, > Martin