Bug 37060 - if using gcov, should rebuild everything on gcc upgrade
Summary: if using gcov, should rebuild everything on gcc upgrade
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Simon McVittie
QA Contact: John (J5) Palmieri
URL: http://cgit.freedesktop.org/~smcv/dbu...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-05-10 03:31 UTC by Simon McVittie
Modified: 2011-05-30 07:43 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
[PATCH 1/3] Consistently include config.h in all non-generated .c files (10.74 KB, patch)
2011-05-10 03:31 UTC, Simon McVittie
Details | Splinter Review
[PATCH 2/3] Include config.h in generated C files, and regenerate dbus-gmarshal.c (4.58 KB, patch)
2011-05-10 03:32 UTC, Simon McVittie
Details | Splinter Review
[PATCH 3/3] Force a full rebuild for new gcc versions if gcov is enabled (1.87 KB, patch)
2011-05-10 03:32 UTC, Simon McVittie
Details | Splinter Review

Description Simon McVittie 2011-05-10 03:31:18 UTC
A couple of related bugs here, really:

* Best-practice for Autoconf seems to be to include config.h in all
  files in a project. If we don't do this, the existing machinery to
  force everything to be rebuilt with/without instrumentation when you
  enable/disable gcov won't fully work.

* When you upgrade your gcc, gcov will report many version mismatches,
  because it wants the instrumentation to come from the compiler that
  matches your gcov. We can force a rebuild by making the thing in config.h
  depend on the gcc version, if and only if gcov support is enabled.
Comment 1 Simon McVittie 2011-05-10 03:31:57 UTC
Created attachment 46529 [details] [review]
[PATCH 1/3] Consistently include config.h in all non-generated .c  files
Comment 2 Simon McVittie 2011-05-10 03:32:12 UTC
Created attachment 46530 [details] [review]
[PATCH 2/3] Include config.h in generated C files, and regenerate  dbus-gmarshal.c
Comment 3 Simon McVittie 2011-05-10 03:32:36 UTC
Created attachment 46531 [details] [review]
[PATCH 3/3] Force a full rebuild for new gcc versions if gcov is  enabled

This avoids a lot of "Version mismatch - expected 406p got 405*". Because
we're changing the content of each file after preprocessing, it even
defeats ccache, which is desirable here - otherwise we'd get old versions
of the profiling code being resurrected from the cache.
Comment 4 Guillaume Desmottes 2011-05-30 07:28:42 UTC
Review of attachment 46529 [details] [review]:

++
Comment 5 Guillaume Desmottes 2011-05-30 07:29:08 UTC
Review of attachment 46530 [details] [review]:

++
Comment 6 Guillaume Desmottes 2011-05-30 07:31:32 UTC
Review of attachment 46531 [details] [review]:

++
Comment 7 Guillaume Desmottes 2011-05-30 07:31:33 UTC
Review of attachment 46531 [details] [review]:

++
Comment 8 Simon McVittie 2011-05-30 07:43:51 UTC
Thanks; fixed in git for 0.94 based on Guillaume's review + no objections from the reviewer group


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.