Bug 25805 - In debug build, mingw win32 build has problems with powf
Summary: In debug build, mingw win32 build has problems with powf
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-14 14:10 PDT by Fridrich Strba
Modified: 2010-03-04 05:50 PST (History)
1 user (show)

See Also:


Attachments
use a proper C++ overloaded pow instead of C-style powf (1.38 KB, patch)
2009-05-14 14:11 PDT, Fridrich Strba
no flags Details | Formatted Diff | Diff
Clean proper standard-compliant patch with a proper clean ChangeLog entry (2.17 KB, patch)
2009-05-15 00:32 PDT, Fridrich Strba
fridrich.strba: review-
Details | Formatted Diff | Diff
This patch even has the proper e-mail address and spaces instead of tabs (2.18 KB, patch)
2009-05-15 01:42 PDT, Fridrich Strba
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fridrich Strba 2009-05-14 14:10:48 PDT
In mingw32 w32api and runtime, the powf function is _CRT_INLINE, but in debug build -O0, compiler fails to inline it and then there is problem of linking.
The following patch makes the use of the proper overloade C++ pow (which is actually using compiler builtins with mingw). It makes the code even a bit more C++ like and does not break anything.
Comment 1 Fridrich Strba 2009-05-14 14:11:36 PDT
Created attachment 30355 [details]
use a proper C++ overloaded pow instead of C-style powf
Comment 2 Darin Adler 2009-05-14 14:14:33 PDT
Comment on attachment 30355 [details]
use a proper C++ overloaded pow instead of C-style powf

Needs ChangeLog. Needs testing on all the major platforms that WebKit supports. Generally seems strange to do this here when the rest of the project takes the other approach.
Comment 3 Fridrich Strba 2009-05-15 00:32:37 PDT
Created attachment 30368 [details]
Clean proper standard-compliant patch with a proper clean ChangeLog entry
Comment 4 Fridrich Strba 2009-05-15 00:50:56 PDT
I also submitted also a bug report against the mingw toolchain https://sourceforge.net/tracker/?func=detail&aid=2792082&group_id=2435&atid=102435
Comment 5 Fridrich Strba 2009-05-15 01:42:15 PDT
Created attachment 30375 [details]
This patch even has the proper e-mail address and spaces instead of tabs
Comment 6 Maciej Stachowiak 2009-05-21 22:59:58 PDT
Comment on attachment 30375 [details]
This patch even has the proper e-mail address and spaces instead of tabs

Looks good.
Comment 7 Xan Lopez 2009-05-22 00:29:58 PDT
(In reply to comment #6)
> (From update of attachment 30375 [details] [review])
> Looks good.
> 

Committed as r44035.
Comment 8 Xan Lopez 2009-05-22 01:39:00 PDT
After various attempts to make this compile and work in Mac, Windows (MSVC) and Linux we ended up reverting the patch in r44039. Reopening the bug.
Comment 9 Eric Seidel (no email) 2009-05-22 08:26:11 PDT
Comment on attachment 30375 [details]
This patch even has the proper e-mail address and spaces instead of tabs

Marking r- since this was rolled out. (Thus removing it from the commit queue)
Comment 10 Fridrich Strba 2010-03-04 05:50:58 PST
I did not see this problem anymore since I changed the runtime implementation I build against