Bug 126324

Summary: configure check for clang version is incorrect
Product: WebKit Reporter: Jeremy Huddleston Sequoia <jeremyhu>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, berto, cgarcia, commit-queue, mcatanzaro, ossy, philip.chimento, tpopela, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 126492    
Attachments:
Description Flags
trivial patch
none
clang-check.patch
none
Updated patch
none
Patch cgarcia: review+, cgarcia: commit-queue-

Description Jeremy Huddleston Sequoia 2013-12-30 21:13:05 PST
Created attachment 220144 [details]
trivial patch

The logic to verify >= clang-3.2 is incorrect:
 1) It does not correctly check Apple clang versions
 2) It forces minor version >= 2 even when major version > 3 (eg 4.0 will fail)

Trivial patch attached
Comment 1 Csaba Osztrogonác 2014-01-13 06:01:51 PST
Please add changelog and set r? if you would like to ask for review.
Comment 2 Jeremy Huddleston Sequoia 2014-02-05 17:32:48 PST
Created attachment 223284 [details]
clang-check.patch
Comment 3 WebKit Commit Bot 2014-02-05 17:34:53 PST
Attachment 223284 [details] did not pass style-queue:


Total errors found: 0 in 0 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Philip Chimento 2014-10-03 01:09:59 PDT
Created attachment 239190 [details]
Updated patch

The same logic error was made with GCC versions too. Here's an updated patch.
Comment 5 Michael Catanzaro 2014-10-03 07:22:47 PDT
Note that the autotools build was removed for 2.6.

The version check is indeed incorrect and will break when GCC 5 is released next spring, but the proposed fix is wrong too. The right hand side of the || will always be short-circuited:

(__GNUC__ >= 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)

You want:

(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)

The altered Clang version check is correct.
Comment 6 Philip Chimento 2014-10-05 20:17:18 PDT
Created attachment 239312 [details]
Patch
Comment 7 Philip Chimento 2014-10-05 20:19:14 PDT
Thanks for catching that. Here's another one. I know the autotools build is obsolete but it would be nice if this could be committed to the 2.4 branch.
Comment 8 Philip Chimento 2014-11-05 22:06:03 PST
Would it be possible to get this reviewed for 2.4.8?
Comment 9 Philip Chimento 2015-01-18 12:17:11 PST
Would it be possible to review this for 2.4.9?
Comment 10 Michael Catanzaro 2015-02-10 18:47:04 PST
Carlos, if you're planning to do another 2.4 release, can you take this patch please? We're going to use this patch in Fedora now that we've upgraded to the GCC 5.0 prerelease.
Comment 11 Carlos Garcia Campos 2015-02-11 00:19:15 PST
Yes, I will. I already had this in my todo list for the next 2.4, but please, remember that the best way to make sure I don't forget a bug/patch is adding it to the list of proposed merges in http://trac.webkit.org/wiki/WebKitGTK/2.4.x
Comment 12 Philip Chimento 2015-02-11 22:19:25 PST
Sure thing. I somehow thought that that page was only for reviewed patches, but I'll add them there in the future.
Comment 13 Carlos Garcia Campos 2015-02-12 00:07:37 PST
(In reply to comment #12)
> Sure thing. I somehow thought that that page was only for reviewed patches,
> but I'll add them there in the future.

Not necessarily, the rule might be something like this:

  - If it has landed, add it as proposed merge for next release
  - If it's important bug, add it as proposed merge for next release
  - Otherwise, or in doubt, add it as changes on track
  - When adding a landed patch, please use the trac changeset instead of the bug url

Note that I'll check every change before merging, so it's better to add something there even if you are not sure, that not adding it. But, please, make sure the change hasn't been merged yet (not all changes merged are in the wiki)
Comment 14 Alberto Garcia 2015-02-12 08:21:38 PST
I confirm that 2.4.8 builds fine with gcc 5 and these changes.
Comment 15 Carlos Garcia Campos 2015-04-07 02:29:50 PDT
Committed <http://trac.webkit.org/changeset/182457>