diff options
author | Elliott Hughes <enh@google.com> | 2014-07-10 16:58:07 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-07-10 16:58:07 -0700 |
commit | aadc4b2ff03b12142f2c6163266ebdb1df2a6e76 (patch) | |
tree | bb370c0c4f65da0f2c615bdd4f33dbfc129971c5 /libm/sincos.c | |
parent | 9b491470ac65a11775e52631ef5e655af9eb2a85 (diff) | |
download | bionic-aadc4b2ff03b12142f2c6163266ebdb1df2a6e76.zip bionic-aadc4b2ff03b12142f2c6163266ebdb1df2a6e76.tar.gz bionic-aadc4b2ff03b12142f2c6163266ebdb1df2a6e76.tar.bz2 |
Switch libm to building with clang.
Bug: 16211965
Change-Id: I81ec9706a4f2b5e8a840508a0f711cd25a5826ca
Diffstat (limited to 'libm/sincos.c')
-rw-r--r-- | libm/sincos.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libm/sincos.c b/libm/sincos.c index ad75549..6bd483a 100644 --- a/libm/sincos.c +++ b/libm/sincos.c @@ -22,18 +22,21 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * */ + #define _GNU_SOURCE 1 #include <math.h> +#if !defined(__clang__) // Disable sincos optimization for all functions in this file, // otherwise gcc would generate infinite calls. // Refer to gcc PR46926. // -fno-builtin-sin or -fno-builtin-cos can disable sincos optimization, // but these two options do not work inside optimize pragma in-file. // Thus we just enforce -O0 when compiling this file. +// clang doesn't implement this optimization anyway, so it doesn't need this. #pragma GCC optimize ("O0") +#endif void sincos(double x, double* p_sin, double* p_cos) { *p_sin = sin(x); |