Bug 23580 - Add support for GNU mode RVCT compilation
: Add support for GNU mode RVCT compilation
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: New Bugs
: 528+ (Nightly build)
: PC Other
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks: 27065
  Show dependency treegraph
 
Reported: 2009-01-27 18:52 PST by Laszlo Gombos
Modified: 2009-07-07 20:57 PDT (History)
3 users (show)

See Also:


Attachments
Patch to support GNU mode RVCT compilation (3.09 KB, patch)
2009-01-27 19:00 PST, Laszlo Gombos
no flags Details | Formatted Diff | Diff
Revised patch based on feedback (3.05 KB, patch)
2009-01-28 06:03 PST, Laszlo Gombos
no flags Details | Formatted Diff | Diff
Revised patch to make it more future proof and readable (3.44 KB, patch)
2009-01-30 05:23 PST, Laszlo Gombos
hausmann: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laszlo Gombos 2009-01-27 18:52:46 PST
WebKit today does not compile with RVCT. Various patches has been landed in the past to make steps toward a successful RVCT (ARM C) compilation. This is proposal for another step to the right direction.

RVCT has a compiler option (called --gnu) which turns on "GNU compatibility". The --gnu option makes RVCT behave more like (but not exactly as) GCC, and it compiles most (but not all) of the WebKit code without changes. 

However the RVCT --gnu option also defines __GNUC__, which makes COMPILER(GCC) defined as well (in addition to COMPILER(RVCT). This makes two compiler defined at the same time, which is confusing and also makes it harder to flag those few code blocks in WebKit that does not compile with GNU mode RVCT.

The proposal is not to define COMPILER(GCC) if WebKit is compiled with RVCT --gnu option. In addition, we should use COMPILER(GCC) consistently across WebKit to mark GCC specific code (instead of using defined __GNUC__).

Patch will follow.. Laszlo.
Comment 1 Laszlo Gombos 2009-01-27 19:00:12 PST
Created attachment 27093 [details]
Patch to support GNU mode RVCT compilation

Patch to support GNU mode RVCT compilation
Comment 2 Mark Rowe (bdash) 2009-01-27 21:18:17 PST
Checking both COMPILER(GCC) and defined(__GNUC__) seem redundant.
Comment 3 Laszlo Gombos 2009-01-28 06:03:21 PST
Created attachment 27103 [details]
Revised patch based on feedback
Comment 4 Laszlo Gombos 2009-01-30 05:23:52 PST
Created attachment 27179 [details]
Revised patch to make it more future proof and readable

Moved the COMPILER(RVCT) rules in from of the COMPILER(GCC) definition, so that when COMPILER(GCC) is defined, we can just check for !COMPILER(RVCT).

Extra comment added to make the code more readable !
Comment 5 Simon Hausmann 2009-01-30 07:16:52 PST
Comment on attachment 27179 [details]
Revised patch to make it more future proof and readable

Looks good to me. When landing I'll add a note to the ChangeLog, but otherwise it's ready to go.
Comment 6 Simon Hausmann 2009-01-30 07:17:58 PST
Landed in r40404