Bug 58437 - WebKit fails to build with gcc 4.6
Summary: WebKit fails to build with gcc 4.6
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-13 06:10 PDT by Thierry Reding
Modified: 2011-04-18 01:30 PDT (History)
2 users (show)

See Also:


Attachments
Fix build with gcc 4.6. (418 bytes, patch)
2011-04-13 06:13 PDT, Thierry Reding
no flags Details | Formatted Diff | Diff
Fix build with gcc 4.6. (1.60 KB, patch)
2011-04-14 00:14 PDT, Thierry Reding
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Reding 2011-04-13 06:10:09 PDT
When the Source/WebCore/dom/make_names.pl script is run, the C preprocessor
is run with the -P option. Apparently, the preprocessor behavior was changed
in gcc 4.6 because running with the -P option makes it eat all empty lines,
which gcc 4.5 doesn't. The make_names.pl script, however, relies on these
empty lines when parsing.

The attached patch removes the -P option when invoking the preprocessor.
Apart from keeping the empty lines, this has the side-effect of outputting
some preprocessor output. However these lines (starting with a #) are
already being ignored by make_names.pl such that the preprocessed files can
be properly parsed.
Comment 1 Thierry Reding 2011-04-13 06:13:57 PDT
Created attachment 89369 [details]
Fix build with gcc 4.6.
Comment 2 Alexey Proskuryakov 2011-04-13 11:35:17 PDT
Thank you for reporting and fixing the problem!

For this patch to be landed in trunk, it needs to be prepared in accordance with <http://www.webkit.org/coding/contributing.html>. Specifically, it must have a ChangeLog entry, and it must be marked for review.

For the record, 
       -P  Inhibit generation of linemarkers in the output from the preprocessor.  This might be useful when
           running the preprocessor on something that is not C code, and will be sent to a program which
           might be confused by the linemarkers.
Comment 3 Thierry Reding 2011-04-14 00:14:50 PDT
Created attachment 89542 [details]
Fix build with gcc 4.6.
Comment 4 Adam Barth 2011-04-17 21:43:12 PDT
Comment on attachment 89542 [details]
Fix build with gcc 4.6.

Thanks!
Comment 5 WebKit Commit Bot 2011-04-17 23:53:43 PDT
Comment on attachment 89542 [details]
Fix build with gcc 4.6.

Clearing flags on attachment: 89542

Committed r84123: <http://trac.webkit.org/changeset/84123>
Comment 6 WebKit Commit Bot 2011-04-17 23:53:48 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 WebKit Commit Bot 2011-04-18 01:03:33 PDT
The commit-queue encountered the following flaky tests while processing attachment 89542 [details]:

http/tests/xmlhttprequest/cross-origin-preflight-get.html bug 53976
The commit-queue is continuing to process your patch.
Comment 8 WebKit Commit Bot 2011-04-18 01:30:59 PDT
The commit-queue encountered the following flaky tests while processing attachment 89542 [details]:

fast/canvas/webgl/gl-teximage.html bug 58766 (authors: kbr@google.com, mihaip@chromium.org, and zmo@google.com)
fast/loader/recursive-before-unload-crash.html bug 50880 (authors: beidson@apple.com and eric@webkit.org)
The commit-queue is continuing to process your patch.