41856 |
41858 |
41857 else |
41859 else |
41858 : |
41860 : |
41859 fi |
41861 fi |
41860 |
41862 |
|
41863 |
|
41864 # Check that the compiler supports -ffp-contract=off flag |
|
41865 # Set FDLIBM_CFLAGS to -ffp-contract=off if it does. |
|
41866 # For GCC < 4.6, on x86, x86_64 and ppc check for |
|
41867 # -mno-fused-madd and -fno-strict-aliasing. If they exist, |
|
41868 # use them as a substitute for -ffp-contract=off. |
|
41869 # |
|
41870 # These flags are required for GCC-based builds of |
|
41871 # fdlibm with optimization without losing precision. |
|
41872 # Notably, -ffp-contract=off needs to be added for GCC >= 4.6, |
|
41873 # -mno-fused-madd -fno-strict-aliasing for GCC < 4.6 |
|
41874 COMPILER_FP_CONTRACT_OFF_FLAG="-ffp-contract=off" |
|
41875 |
|
41876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$COMPILER_FP_CONTRACT_OFF_FLAG -Werror\"" >&5 |
|
41877 $as_echo_n "checking if the C++ compiler supports \"$COMPILER_FP_CONTRACT_OFF_FLAG -Werror\"... " >&6; } |
|
41878 supports=yes |
|
41879 |
|
41880 saved_cxxflags="$CXXFLAGS" |
|
41881 CXXFLAGS="$CXXFLAG $COMPILER_FP_CONTRACT_OFF_FLAG -Werror" |
|
41882 ac_ext=cpp |
|
41883 ac_cpp='$CXXCPP $CPPFLAGS' |
|
41884 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
|
41885 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
|
41886 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
|
41887 |
|
41888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
41889 /* end confdefs.h. */ |
|
41890 int i; |
|
41891 _ACEOF |
|
41892 if ac_fn_cxx_try_compile "$LINENO"; then : |
|
41893 |
|
41894 else |
|
41895 supports=no |
|
41896 fi |
|
41897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
41898 ac_ext=cpp |
|
41899 ac_cpp='$CXXCPP $CPPFLAGS' |
|
41900 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
|
41901 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
|
41902 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
|
41903 |
|
41904 CXXFLAGS="$saved_cxxflags" |
|
41905 |
|
41906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5 |
|
41907 $as_echo "$supports" >&6; } |
|
41908 if test "x$supports" = "xyes" ; then |
|
41909 : |
|
41910 else |
|
41911 COMPILER_FP_CONTRACT_OFF_FLAG="" |
|
41912 fi |
|
41913 |
|
41914 if test "x$COMPILER_FP_CONTRACT_OFF_FLAG" = x; then |
|
41915 if test "$OPENJDK_TARGET_CPU_ARCH" = "x86" || |
|
41916 test "$OPENJDK_TARGET_CPU_ARCH" = "x86_64" || |
|
41917 test "$OPENJDK_TARGET_CPU_ARCH" = "ppc"; then |
|
41918 M_NO_FUSED_ADD_FLAG="-mno-fused-madd" |
|
41919 |
|
41920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$M_NO_FUSED_ADD_FLAG -Werror\"" >&5 |
|
41921 $as_echo_n "checking if the C++ compiler supports \"$M_NO_FUSED_ADD_FLAG -Werror\"... " >&6; } |
|
41922 supports=yes |
|
41923 |
|
41924 saved_cxxflags="$CXXFLAGS" |
|
41925 CXXFLAGS="$CXXFLAG $M_NO_FUSED_ADD_FLAG -Werror" |
|
41926 ac_ext=cpp |
|
41927 ac_cpp='$CXXCPP $CPPFLAGS' |
|
41928 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
|
41929 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
|
41930 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
|
41931 |
|
41932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
41933 /* end confdefs.h. */ |
|
41934 int i; |
|
41935 _ACEOF |
|
41936 if ac_fn_cxx_try_compile "$LINENO"; then : |
|
41937 |
|
41938 else |
|
41939 supports=no |
|
41940 fi |
|
41941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
41942 ac_ext=cpp |
|
41943 ac_cpp='$CXXCPP $CPPFLAGS' |
|
41944 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
|
41945 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
|
41946 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
|
41947 |
|
41948 CXXFLAGS="$saved_cxxflags" |
|
41949 |
|
41950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5 |
|
41951 $as_echo "$supports" >&6; } |
|
41952 if test "x$supports" = "xyes" ; then |
|
41953 : |
|
41954 else |
|
41955 M_NO_FUSED_ADD_FLAG="" |
|
41956 fi |
|
41957 |
|
41958 NO_STRICT_ALIASING_FLAG="-fno-strict-aliasing" |
|
41959 |
|
41960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_STRICT_ALIASING_FLAG -Werror\"" >&5 |
|
41961 $as_echo_n "checking if the C++ compiler supports \"$NO_STRICT_ALIASING_FLAG -Werror\"... " >&6; } |
|
41962 supports=yes |
|
41963 |
|
41964 saved_cxxflags="$CXXFLAGS" |
|
41965 CXXFLAGS="$CXXFLAG $NO_STRICT_ALIASING_FLAG -Werror" |
|
41966 ac_ext=cpp |
|
41967 ac_cpp='$CXXCPP $CPPFLAGS' |
|
41968 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
|
41969 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
|
41970 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
|
41971 |
|
41972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
41973 /* end confdefs.h. */ |
|
41974 int i; |
|
41975 _ACEOF |
|
41976 if ac_fn_cxx_try_compile "$LINENO"; then : |
|
41977 |
|
41978 else |
|
41979 supports=no |
|
41980 fi |
|
41981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
41982 ac_ext=cpp |
|
41983 ac_cpp='$CXXCPP $CPPFLAGS' |
|
41984 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
|
41985 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
|
41986 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
|
41987 |
|
41988 CXXFLAGS="$saved_cxxflags" |
|
41989 |
|
41990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5 |
|
41991 $as_echo "$supports" >&6; } |
|
41992 if test "x$supports" = "xyes" ; then |
|
41993 : |
|
41994 else |
|
41995 NO_STRICT_ALIASING_FLAG="" |
|
41996 fi |
|
41997 |
|
41998 if test "x$M_NO_FUSED_ADD_FLAG" != "x" && test "x$NO_STRICT_ALIASING_FLAG" != "x"; then |
|
41999 FDLIBM_CFLAGS="$M_NO_FUSED_ADD_FLAG $NO_STRICT_ALIASING_FLAG" |
|
42000 fi |
|
42001 fi |
|
42002 else |
|
42003 FDLIBM_CFLAGS="$COMPILER_FP_CONTRACT_OFF_FLAG" |
|
42004 fi |
41861 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then |
42005 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then |
41862 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" |
42006 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" |
41863 if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then |
42007 if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then |
41864 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB" |
42008 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB" |
41865 CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE" |
42009 CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE" |