[webkit-reviews] review requested: [Bug 29244] undefined reference errors when linking due to gperf and inlining : [Attachment 55713] Refactor gperf code generation and usage to fix the debug build with gcc>4.4.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 11 09:44:59 PDT 2010


Andras Becsi <abecsi at webkit.org> has asked  for review:
Bug 29244: undefined reference errors when linking due to gperf and inlining
https://bugs.webkit.org/show_bug.cgi?id=29244

Attachment 55713: Refactor gperf code generation and usage to fix the debug
build with gcc>4.4.
https://bugs.webkit.org/attachment.cgi?id=55713&action=review

------- Additional Comments from Andras Becsi <abecsi at webkit.org>
Gperf code generation is done by a new script called WebCore/make-hash-tools.pl
now,
and the generation options were moved into the gperf files, to make the options
more understandable
and the generation process less redundant across the various ports.
Hitherto gperf generated C code, these files were included in multiple C++
files across WebCore
to access the functionality provided. This resulted in debug build failure with
newer gcc versions
because of a new feature of gcc, which disables C style inlining in debug mode.

The make-hash-tools.pl script lets gperf generate C++ code for all gperf files
now, which are compiled
in their own compilation unit.
The functionality provided by the generated code is wrapped behind HashTools.h,
so there is no need
for multiple inclusions of generated C files to access these functions.

No new functionality added, no new tests needed.

Multiple patches would make the whole change confusing and error-prone, so
leaving it in one peace.
The diff is big, but simple structured, hopefully the more lengthly explanation
will make it easier to understand.


More information about the webkit-reviews mailing list