-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20fc7c5
commit 871c690
Showing
5 changed files
with
41 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# The out of tree builds of the compiler and the Fortran runtime | ||
# must use the same setting of FLANG_RUNTIME_F128_MATH_LIB | ||
# to be composable. Failure to synchronize this setting may result | ||
# in linking errors or fatal failures in F128 runtime functions. | ||
set(FLANG_RUNTIME_F128_MATH_LIB "" CACHE STRING | ||
"Specifies the target library used for implementing IEEE-754 128-bit float \ | ||
math in F18 runtime, e.g. it might be libquadmath for targets where \ | ||
REAL(16) is mapped to __float128, or libm for targets where REAL(16) \ | ||
is mapped to long double, etc." | ||
) | ||
if (FLANG_RUNTIME_F128_MATH_LIB) | ||
add_compile_definitions(FLANG_RUNTIME_F128_MATH_LIB="${FLANG_RUNTIME_F128_MATH_LIB}") | ||
endif() | ||
|
||
# Check if 128-bit float computations can be done via long double | ||
check_cxx_source_compiles( | ||
"#include <cfloat> | ||
#if LDBL_MANT_DIG != 113 | ||
#error LDBL_MANT_DIG != 113 | ||
#endif | ||
int main() { return 0; } | ||
" | ||
HAVE_LDBL_MANT_DIG_113) | ||
|
||
include(TestBigEndian) | ||
test_big_endian(IS_BIGENDIAN) | ||
if (IS_BIGENDIAN) | ||
add_compile_definitions(FLANG_BIG_ENDIAN=1) | ||
else () | ||
add_compile_definitions(FLANG_LITTLE_ENDIAN=1) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters