[PATCH] msvcrt: Provide pow2 implementation in static library for msvcrt versions that don't provide it.

Jacek Caban jacek at codeweavers.com
Wed Nov 13 07:06:51 CST 2019


On 11/13/19 9:40 AM, Alexandre Julliard wrote:
> Jacek Caban <jacek at codeweavers.com> writes:
>
>> Signed-off-by: Jacek Caban <jacek at codeweavers.com>
>> ---
>>
>> This is needed because compiler may optimize pow(2,x) to exp2(x) and
>> clang does that in out msvcp code. This also needs -fno-builtin
>> because otherwise clang will optimize our forwarding implementation
>> back to exp2.
> If -fno-builtin works to prevent this, then why doesn't it already
> prevent it from happening in msvcp?


It would, but we don't use -fno-builtin to build msvcp using cross 
compiler. We use it only when mingw is not available.


BTW, before I wrote this patch, I used CROSSCFLAGS=-fno-builtin-exp2 as 
a workaround (-fno-builtin-pow should do the trick as well), but I don't 
think we should go in that direction.


Jacek




More information about the wine-devel mailing list