common/autoconf/generated-configure.sh

changeset 2438
f4b08401e50d
parent 2408
2e38e8d106de
parent 2424
3a2c8d0a600d
child 2458
daa47f8cf745
equal deleted inserted replaced
2412:0cafacf400c9 2438:f4b08401e50d
684 CXXFLAGS_JDKEXE 684 CXXFLAGS_JDKEXE
685 CXXFLAGS_JDKLIB 685 CXXFLAGS_JDKLIB
686 CFLAGS_JDKEXE 686 CFLAGS_JDKEXE
687 CFLAGS_JDKLIB 687 CFLAGS_JDKLIB
688 MACOSX_VERSION_MIN 688 MACOSX_VERSION_MIN
689 FDLIBM_CFLAGS
689 NO_LIFETIME_DSE_CFLAG 690 NO_LIFETIME_DSE_CFLAG
690 NO_DELETE_NULL_POINTER_CHECKS_CFLAG 691 NO_DELETE_NULL_POINTER_CHECKS_CFLAG
691 LEGACY_EXTRA_LDFLAGS 692 LEGACY_EXTRA_LDFLAGS
692 LEGACY_EXTRA_CXXFLAGS 693 LEGACY_EXTRA_CXXFLAGS
693 LEGACY_EXTRA_CFLAGS 694 LEGACY_EXTRA_CFLAGS
3909 3910
3910 3911
3911 3912
3912 3913
3913 # 3914 #
3914 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. 3915 # Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
3915 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3916 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3916 # 3917 #
3917 # This code is free software; you can redistribute it and/or modify it 3918 # This code is free software; you can redistribute it and/or modify it
3918 # under the terms of the GNU General Public License version 2 only, as 3919 # under the terms of the GNU General Public License version 2 only, as
3919 # published by the Free Software Foundation. Oracle designates this 3920 # published by the Free Software Foundation. Oracle designates this
4382 # definitions. It is replaced with custom functionality when building 4383 # definitions. It is replaced with custom functionality when building
4383 # custom sources. 4384 # custom sources.
4384 #CUSTOM_AUTOCONF_INCLUDE 4385 #CUSTOM_AUTOCONF_INCLUDE
4385 4386
4386 # Do not change or remove the following line, it is needed for consistency checks: 4387 # Do not change or remove the following line, it is needed for consistency checks:
4387 DATE_WHEN_GENERATED=1554371898 4388 DATE_WHEN_GENERATED=1556533111
4388 4389
4389 ############################################################################### 4390 ###############################################################################
4390 # 4391 #
4391 # Initialization / Boot-strapping 4392 # Initialization / Boot-strapping
4392 # 4393 #
41615 # 41616 #
41616 # Now setup the CFLAGS and LDFLAGS for the JDK build. 41617 # Now setup the CFLAGS and LDFLAGS for the JDK build.
41617 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build. 41618 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41618 # 41619 #
41619 41620
41621 FDLIBM_CFLAGS=""
41620 # Setup compiler/platform specific flags to CFLAGS_JDK, 41622 # Setup compiler/platform specific flags to CFLAGS_JDK,
41621 # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?) 41623 # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41622 if test "x$TOOLCHAIN_TYPE" = xgcc; then 41624 if test "x$TOOLCHAIN_TYPE" = xgcc; then
41623 # these options are used for both C and C++ compiles 41625 # these options are used for both C and C++ compiles
41624 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \ 41626 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
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"
41887 if test "x$TOOLCHAIN_VERSION" = "x2010"; then 42031 if test "x$TOOLCHAIN_VERSION" = "x2010"; then
41888 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \ 42032 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41889 -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB" 42033 -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
41890 fi 42034 fi
41891 fi 42035 fi
42036
41892 42037
41893 ############################################################################### 42038 ###############################################################################
41894 42039
41895 # Adjust flags according to debug level. 42040 # Adjust flags according to debug level.
41896 case $DEBUG_LEVEL in 42041 case $DEBUG_LEVEL in

mercurial