Actions
Bug #5632
closedlibm's use of _sse_hw is wrong and unnecessary (in that order)
Start date:
2015-02-16
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
libm looks at the _sse_hw symbol provided by libc to tell whether it is running on an i386 system capable of SSE.
Unfortunately, it's defined thusly
int _sse_hw = 0; #pragma weak _sse_hw
Notice how _sse_hw isn't extern, and that it has a value. This is going to screw up the logic later (which checks whether it's been bound), and generally it makes things really confused.
This is wrong.
It's weak because libm used to get shipped by devpro onto multiple releases (in its guise as libsunmath, or libmopt), and not all those releases wouldn't have that symbol in libc.
This is unnecessary.
It should just be a regular external reference to a private symbol, not weak, not defined, just extern.
Actions