diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2019-01-20 00:37:48 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2019-01-20 00:37:48 (GMT) |
commit | 399edb7314a1383ace9d5fd01337f4072756a692 (patch) | |
tree | 752fc97556bfa18e65985aea4a4e9a11dcd0de52 /config | |
parent | 89b5b64b5c2db40e89e3304fa138de7c2ad1483f (diff) | |
parent | 7880089c0be7eb6625cc9982775b522aee523b65 (diff) | |
download | hdf5-399edb7314a1383ace9d5fd01337f4072756a692.zip hdf5-399edb7314a1383ace9d5fd01337f4072756a692.tar.gz hdf5-399edb7314a1383ace9d5fd01337f4072756a692.tar.bz2 |
Merge pull request #1486 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to hdf5_1_10
* commit '7880089c0be7eb6625cc9982775b522aee523b65':
Merge pull request #1450 in HDFFV/hdf5 from ~SONGYULU/hdf5_ray:TRILAB-98-dt_arith-and-cpp_testhdf5-tests to develop
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 5 | ||||
-rw-r--r-- | config/cmake/ConversionTests.c | 24 | ||||
-rw-r--r-- | config/cmake/H5pubconf.h.in | 3 |
3 files changed, 32 insertions, 0 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 459346e..c1abeed 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -247,6 +247,11 @@ H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctl # H5ConversionTests (${HDF_PREFIX}_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values") # ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# some long double values +# +H5ConversionTests (${HDF_PREFIX}_DISABLE_SOME_LDOUBLE_CONV "Checking IF the cpu is power9 and cannot correctly converting long double values") +# ---------------------------------------------------------------------- # Check if pointer alignments are enforced # H5ConversionTests (${HDF_PREFIX}_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced") diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c index c2748b2..6d597a0 100644 --- a/config/cmake/ConversionTests.c +++ b/config/cmake/ConversionTests.c @@ -287,3 +287,27 @@ main () #endif +#ifdef H5_DISABLE_SOME_LDOUBLE_CONV_TEST + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +int HDF_NO_UBSAN main(void) +{ + FILE *fp; + char cpu[64]; + + fp = popen("uname -m", "r"); + + fgets(cpu, sizeof(cpu)-1, fp); + + pclose(fp); + + if(strncmp(cpu, "ppc64le", 7) == 0) + return 0; + + return 1; +} + +#endif diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 4edaff0..871a78d 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -460,6 +460,9 @@ with special algorithm. */ #cmakedefine H5_LONG_TO_LDOUBLE_SPECIAL @H5_LONG_TO_LDOUBLE_SPECIAL@ +/* Define if your system is power6 and cannot convert some long double values. */ +#cmakedefine H5_DISABLE_SOME_LDOUBLE_CONV @H5_DISABLE_SOME_LDOUBLE_CONV@ + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #cmakedefine H5_LT_OBJDIR @H5_LT_OBJDIR@ |