Jacek Caban jacek@codeweavers.com writes:
On 11/13/19 9:40 AM, Alexandre Julliard wrote:
Jacek Caban jacek@codeweavers.com writes:
Signed-off-by: Jacek Caban jacek@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.
Ah, right.
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.
Maybe not, but having to add -fno-builtin in all the msvcrt makefiles doesn't seem that much better.