Skip to content

Commit cfcd167

Browse files
committed
configure: disable short float with Intel compiler
`short float` support of the Intel C++ Compiler (group of C and C++ compilers), at least versions 18.0 and 19.0, is half-baked. It can compile declarations of `short float` variables and expressions of `sizeof(short float)` but cannot compile operations of `short float` variables. In this situation, `AC_CHECK_TYPES(short float)` defines `HAVE_SHORT_FLOAT` as 1 and compilation errors occur in `ompi/mca/op/base/op_base_functions.c`. To avoid this error tentatively, we disable `short float` support when using the Intel C++ Compiler. Signed-off-by: KAWASHIMA Takahiro <[email protected]>
1 parent 0cf6afc commit cfcd167

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

configure.ac

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,19 @@ OPAL_CHECK_IDENT([CC], [CFLAGS], [c], [C])
374374
# Check for some types
375375
#
376376

377+
# 'short float' support of the Intel C++ Compiler (group of C and C++
378+
# compilers), at least versions 18.0 and 19.0, is half-baked. It can
379+
# compile declarations of 'short float' variables and expressions of
380+
# 'sizeof(short float)' but cannot compile operations of 'short float'
381+
# variables. In this situation, 'AC_CHECK_TYPES(short float)' defines
382+
# 'HAVE_SHORT_FLOAT' as 1 and compilation errors occur in
383+
# ompi/mca/op/base/op_base_functions.c. To avoid this error tentatively,
384+
# we disable 'short float' support when using the Intel C++ Compiler.
385+
if test "$opal_cv_c_compiler_vendor" = "intel"; then
386+
ac_cv_type_short_float="no"
387+
ac_cv_type_short_float__Complex="no"
388+
fi
389+
377390
AC_CHECK_TYPES(int8_t)
378391
AC_CHECK_TYPES(uint8_t)
379392
AC_CHECK_TYPES(int16_t)

0 commit comments

Comments
 (0)