shibatch / sleef

SIMD Library for Evaluating Elementary Functions, vectorized libm and DFT
https://sleef.org
Boost Software License 1.0
635 stars 129 forks source link

Fix build error with IntelLLVM compiler #492

Closed iskunk closed 8 months ago

iskunk commented 9 months ago

I am building sleef using the IntelLLVM (oneAPI) 2024.0.0 compiler. This error comes up immediately:

$ make
[  0%] Building C object src/libm/CMakeFiles/mkrename_gnuabi.dir/mkrename_gnuabi.c.o
error: unknown argument '--extended_float_type'; did you mean '--extended_float_types'?
make[2]: *** [src/libm/CMakeFiles/mkrename_gnuabi.dir/build.make:76: src/libm/CMakeFiles/mkrename_gnuabi.dir/mkrename_gnuabi.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:838: src/libm/CMakeFiles/mkrename_gnuabi.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

If I add the "s" to the offending flag, I see this later in the build:

icx: warning: overriding '-ffp-model=fast=2' option with '-ffp-model=fast' [-Woverriding-t-option]

This page in Intel's documentation does not indicate any numeric suboption to -fp-model=fast.

This PR adds a conditional to Configure.cmake that uses the modified values for the IntelLLVM variant. With this change, I get a clean build.

Note: Intel online community posts imply that the Intel Classic compiler may accept the --extended_float_types (plural) option in addition to the singular form, but I do not have a way of verifying this.

xuhancn commented 8 months ago

Please close my PR(https://github.com/shibatch/sleef/pull/497) after merge this PR.

xuhancn commented 8 months ago

Could you please priority to merge this PR? Our project depends on it. @blapie