Skip to content

Commit

Permalink
hints/linux.sh: handle the Intel oneAPI compiler
Browse files Browse the repository at this point in the history
This failed some floating point tests, so the hints add fp-model=precise

Also capture the compiler version.

Fixes Perl#22209
  • Loading branch information
tonycoz committed May 21, 2024
1 parent 1a2e8e7 commit c9250a9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions hints/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,21 @@ case "`${cc:-cc} -V 2>&1`" in
'') optimize='-O3' ;;
esac
;;

# the new Intel C/C++ compiler, LLVM based, replaces ICC which
# is no longer maintained from around October 2023
*"Intel(R) oneAPI DPC++/C++ Compiler"*)
# version from end of first line, like:
# Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)
ccversion=`${cc:-cc} --version | sed -n -e 's/^Intel.*(\(.*\))/\1/p'`
# If we're using ICX, we usually want the best performance
case "$optimize" in
'') optimize='-O3' ;;
esac
# fp-model defaults to "fast" which mis-handles NaNs
ccflags="-fp-model=precise $ccflags"
;;

*" Sun "*"C"*)
# Sun's C compiler, which might have a 'tag' name between
# 'Sun' and the 'C': Examples:
Expand Down

0 comments on commit c9250a9

Please sign in to comment.