4883 VALID_TOOLCHAINS_macosx="gcc clang"
4884 VALID_TOOLCHAINS_aix="xlc"
4885 VALID_TOOLCHAINS_windows="microsoft"
4886
4887 # Toolchain descriptions
4888 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4889 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4890 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4891 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4892 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4893
4894 # Minimum supported versions, empty means unspecified
4895 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4896 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4897 TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4898 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4899 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4900
4901 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4902 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4903
4904
4905 # Check if the configured compiler (C and C++) is of a specific version or
4906 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4907 #
4908 # Arguments:
4909 # VERSION: The version string to check against the found version
4910 # IF_AT_LEAST: block to run if the compiler is at least this version (>=)
4911 # IF_OLDER_THAN: block to run if the compiler is older than this version (<)
4912
4913
4914
4915
4916 # Setup a number of variables describing how native output files are
4917 # named on this platform/toolchain.
4918
4919
4920 # Determine which toolchain type to use, and make sure it is valid for this
4921 # platform. Setup various information about the selected toolchain.
4922
4923
4924 # Before we start detecting the toolchain executables, we might need some
4925 # special setup, e.g. additional paths etc.
4926
4927
4928 # Restore path, etc
4929
4930
4931 # Check if a compiler is of the toolchain type we expect, and save the version
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070 # This line needs to be here, verbatim, after all includes and the dummy hook
5071 # definitions. It is replaced with custom functionality when building
5072 # custom sources.
5073 #CUSTOM_AUTOCONF_INCLUDE
5074
5075 # Do not change or remove the following line, it is needed for consistency checks:
5076 DATE_WHEN_GENERATED=1462806878
5077
5078 ###############################################################################
5079 #
5080 # Initialization / Boot-strapping
5081 #
5082 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5083 # thus it jumps back and forth, each time gaining something needed later on.
5084 #
5085 ###############################################################################
5086
5087 # If we are requested to print additional help, do that and then exit.
5088 # This must be the very first call.
5089
5090 if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5091
5092 # Print available toolchains
5093 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5094 $PRINTF "Which are valid to use depends on the build platform.\n"
5095 for toolchain in $VALID_TOOLCHAINS_all; do
5096 # Use indirect variable referencing
34778 else
34779 if test "$GXX" = yes; then
34780 CXXFLAGS="-O2"
34781 else
34782 CXXFLAGS=
34783 fi
34784 fi
34785 ac_ext=cpp
34786 ac_cpp='$CXXCPP $CPPFLAGS'
34787 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34788 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34789 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34790
34791
34792 # This is the compiler version number on the form X.Y[.Z]
34793
34794
34795
34796
34797 if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34799 $as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34801 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34802 fi
34803
34804 # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34805 if [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34806 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34807 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34808 fi
34809
34810 if [[ "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34812 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34813 fi
34814
34815 COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34816
34817
34818 if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34819
34820
34821
34822
34823
34824
34825
34826
34827
34828
34829
34830
34841
34842
34843
34844
34845
34846
34847
34848
34849
34850
34851
34852
34853
34854
34855
34856
34857
34858
34859
34860
34861 # Execute function body
34862
34863 # Need to assign to a variable since m4 is blocked from modifying parts in [].
34864 REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34865
34866 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34867 as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34868 fi
34869
34870 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34871 as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34872 fi
34873
34874 # Version comparison method inspired by http://stackoverflow.com/a/24067243
34875 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34876
34877 if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34878 :
34879
34880 else
34881 :
34882
34883 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
34884 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34885
34886
34887 fi
34888
34889
34890
34891
34892
34893
34894
34895
34896
34897
34898
34899
34900 fi
34901
34902 #
34903 # Setup the preprocessor (CPP and CXXCPP)
34904 #
34905 ac_ext=c
34906 ac_cpp='$CPP $CPPFLAGS'
34907 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34908 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34909 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34911 $as_echo_n "checking how to run the C preprocessor... " >&6; }
34912 # On Suns, sometimes $CPP names a directory.
34913 if test -n "$CPP" && test -d "$CPP"; then
34914 CPP=
34915 fi
34916 if test -z "$CPP"; then
34917 if ${ac_cv_prog_CPP+:} false; then :
34918 $as_echo_n "(cached) " >&6
34919 else
46458 if test "x$arguments" != xEOL; then
46459 new_complete="$new_path ${arguments% *}"
46460 else
46461 new_complete="$new_path"
46462 fi
46463
46464 if test "x$complete" != "x$new_complete"; then
46465 BUILD_STRIP="$new_complete"
46466 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46467 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46468 fi
46469 fi
46470
46471 # Assume the C compiler is the assembler
46472 BUILD_AS="$BUILD_CC -c"
46473 # Just like for the target compiler, use the compiler as linker
46474 BUILD_LD="$BUILD_CC"
46475 BUILD_LDCXX="$BUILD_CXX"
46476
46477 PATH="$OLDPATH"
46478 else
46479 # If we are not cross compiling, use the normal target compilers for
46480 # building the build platform executables.
46481 BUILD_CC="$CC"
46482 BUILD_CXX="$CXX"
46483 BUILD_LD="$LD"
46484 BUILD_LDCXX="$LDCXX"
46485 BUILD_NM="$NM"
46486 BUILD_AS="$AS"
46487 BUILD_OBJCOPY="$OBJCOPY"
46488 BUILD_STRIP="$STRIP"
46489 BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46490 BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46491 BUILD_AR="$AR"
46492 fi
46493
46494
46495
46496
46497
49118
49119
49120
49121
49122
49123
49124
49125
49126
49127
49128
49129
49130
49131
49132
49133
49134
49135
49136
49137
49138 # Execute function body
49139
49140 # Need to assign to a variable since m4 is blocked from modifying parts in [].
49141 REFERENCE_VERSION=6
49142
49143 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49144 as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49145 fi
49146
49147 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49148 as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49149 fi
49150
49151 # Version comparison method inspired by http://stackoverflow.com/a/24067243
49152 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49153
49154 if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49155 :
49156
49157 # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49694 CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49695
49696
49697
49698 else
49699 :
49700
49701 fi
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714 elif test "x$TOOLCHAIN_TYPE" = xclang; then
49715 JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49716
49717 # Restrict the debug information created by Clang to avoid
49718 # too big object files and speed the build up a little bit
49719 # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49720 JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49721 if test "x$OPENJDK_TARGET_OS" = xlinux; then
49722 if test "x$OPENJDK_TARGET_CPU" = xx86; then
49723 # Force compatibility with i586 on 32 bit intel platforms.
49724 COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49725 JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49726 fi
49727 JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49728 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49729 -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49730 case $OPENJDK_TARGET_CPU_ARCH in
49731 ppc )
49732 # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49733 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951 # Execute function body
49952
49953 # Need to assign to a variable since m4 is blocked from modifying parts in [].
49954 REFERENCE_VERSION=4.8
49955
49956 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49957 as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
49958 fi
49959
49960 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49961 as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
49962 fi
49963
49964 # Version comparison method inspired by http://stackoverflow.com/a/24067243
49965 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49966
49967 if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49968 :
49969
49970 # These flags either do not work or give spurious warnings prior to gcc 4.8.
49971 JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
49972
49973
49974 else
49975 :
49976
49977 fi
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990 fi
49991 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] && ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
49992 # Non-zero builds have stricter warnings
49993 JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
49994 else
49995 if test "x$TOOLCHAIN_TYPE" = xclang; then
49996 # Some versions of llvm do not like -Wundef
49997 JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
49998 fi
49999 fi
50000 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50001 JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50002 -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50003 fi
50004
50005 # Additional macosx handling
50006 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50007 # Setting these parameters makes it an error to link to macosx APIs that are
50008 # newer than the given OS version and makes the linked binaries compatible
50009 # even if built on a newer version of the OS.
50436
50437
50438
50439
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456 # Execute function body
50457
50458 # Need to assign to a variable since m4 is blocked from modifying parts in [].
50459 REFERENCE_VERSION=6
50460
50461 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50462 as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50463 fi
50464
50465 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50466 as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50467 fi
50468
50469 # Version comparison method inspired by http://stackoverflow.com/a/24067243
50470 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50471
50472 if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50473 :
50474
50475 else
50476 :
50477
50478 fi
50479
50480
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491 elif test "x$TOOLCHAIN_TYPE" = xclang; then
50492 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50493
50494 # Restrict the debug information created by Clang to avoid
50495 # too big object files and speed the build up a little bit
50496 # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50497 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50498 if test "x$OPENJDK_BUILD_OS" = xlinux; then
50499 if test "x$OPENJDK_BUILD_CPU" = xx86; then
50500 # Force compatibility with i586 on 32 bit intel platforms.
50501 OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50502 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50503 fi
50504 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50505 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50506 -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50507 case $OPENJDK_BUILD_CPU_ARCH in
50508 ppc )
50509 # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50510 OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728 # Execute function body
50729
50730 # Need to assign to a variable since m4 is blocked from modifying parts in [].
50731 REFERENCE_VERSION=4.8
50732
50733 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50734 as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50735 fi
50736
50737 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50738 as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50739 fi
50740
50741 # Version comparison method inspired by http://stackoverflow.com/a/24067243
50742 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50743
50744 if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50745 :
50746
50747 # These flags either do not work or give spurious warnings prior to gcc 4.8.
50748 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50749
50750
50751 else
50752 :
50753
50754 fi
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767 fi
50768 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] && ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
50769 # Non-zero builds have stricter warnings
50770 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50771 else
50772 if test "x$TOOLCHAIN_TYPE" = xclang; then
50773 # Some versions of llvm do not like -Wundef
50774 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50775 fi
50776 fi
50777 elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50778 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50779 -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50780 fi
50781
50782 # Additional macosx handling
50783 if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50784 # Setting these parameters makes it an error to link to macosx APIs that are
50785 # newer than the given OS version and makes the linked binaries compatible
50786 # even if built on a newer version of the OS.
51901 if test "x$supports" = "xyes" ; then
51902 :
51903 GCC_CAN_DISABLE_WARNINGS=true
51904 else
51905 :
51906 GCC_CAN_DISABLE_WARNINGS=false
51907
51908 fi
51909
51910
51911
51912
51913
51914
51915 if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
51916 DISABLE_WARNING_PREFIX="-Wno-"
51917 else
51918 DISABLE_WARNING_PREFIX=
51919 fi
51920 CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
51921 # Repeate the check for the BUILD_CC
51922 CC_OLD="$CC"
51923 CC="$BUILD_CC"
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
52181 if test "x$supports" = "xyes" ; then
52182 :
52183 BUILD_CC_CAN_DISABLE_WARNINGS=true
52184 else
52185 :
52186 BUILD_CC_CAN_DISABLE_WARNINGS=false
52187
52188 fi
52189
52190
52191
52192
52193
52194
52195 if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52196 BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52197 else
52198 BUILD_CC_DISABLE_WARNING_PREFIX=
52199 fi
52200 CC="$CC_OLD"
52201 ;;
52202 clang)
52203 DISABLE_WARNING_PREFIX="-Wno-"
52204 CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52205 ;;
52206 xlc)
52207 DISABLE_WARNING_PREFIX="-qsuppress="
52208 CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52209 ;;
52210 esac
52211
52212
52213
52214
52215
52216 # Setup debug symbols (need objcopy from the toolchain for that)
52217
52218 #
52219 # NATIVE_DEBUG_SYMBOLS
52220 # This must be done after the toolchain is setup, since we're looking at objcopy.
|
4883 VALID_TOOLCHAINS_macosx="gcc clang"
4884 VALID_TOOLCHAINS_aix="xlc"
4885 VALID_TOOLCHAINS_windows="microsoft"
4886
4887 # Toolchain descriptions
4888 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4889 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4890 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4891 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4892 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4893
4894 # Minimum supported versions, empty means unspecified
4895 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4896 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4897 TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4898 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4899 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4900
4901 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4902 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4903 # $1 - optional variable prefix for compiler and version varibales (BUILD_)
4904 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4905
4906
4907 # Check if the configured compiler (C and C++) is of a specific version or
4908 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4909 #
4910 # Arguments:
4911 # VERSION: The version string to check against the found version
4912 # IF_AT_LEAST: block to run if the compiler is at least this version (>=)
4913 # IF_OLDER_THAN: block to run if the compiler is older than this version (<)
4914 # PREFIX: Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4915
4916
4917
4918
4919 # Setup a number of variables describing how native output files are
4920 # named on this platform/toolchain.
4921
4922
4923 # Determine which toolchain type to use, and make sure it is valid for this
4924 # platform. Setup various information about the selected toolchain.
4925
4926
4927 # Before we start detecting the toolchain executables, we might need some
4928 # special setup, e.g. additional paths etc.
4929
4930
4931 # Restore path, etc
4932
4933
4934 # Check if a compiler is of the toolchain type we expect, and save the version
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073 # This line needs to be here, verbatim, after all includes and the dummy hook
5074 # definitions. It is replaced with custom functionality when building
5075 # custom sources.
5076 #CUSTOM_AUTOCONF_INCLUDE
5077
5078 # Do not change or remove the following line, it is needed for consistency checks:
5079 DATE_WHEN_GENERATED=1462897272
5080
5081 ###############################################################################
5082 #
5083 # Initialization / Boot-strapping
5084 #
5085 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5086 # thus it jumps back and forth, each time gaining something needed later on.
5087 #
5088 ###############################################################################
5089
5090 # If we are requested to print additional help, do that and then exit.
5091 # This must be the very first call.
5092
5093 if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5094
5095 # Print available toolchains
5096 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5097 $PRINTF "Which are valid to use depends on the build platform.\n"
5098 for toolchain in $VALID_TOOLCHAINS_all; do
5099 # Use indirect variable referencing
34781 else
34782 if test "$GXX" = yes; then
34783 CXXFLAGS="-O2"
34784 else
34785 CXXFLAGS=
34786 fi
34787 fi
34788 ac_ext=cpp
34789 ac_cpp='$CXXCPP $CPPFLAGS'
34790 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34791 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34792 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34793
34794
34795 # This is the compiler version number on the form X.Y[.Z]
34796
34797
34798
34799
34800 if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34802 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34804 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34805 fi
34806
34807 # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34808 if [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34810 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34811 fi
34812
34813 if [[ "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34815 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34816 fi
34817
34818 COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34819
34820
34821 if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831
34832
34833
34844
34845
34846
34847
34848
34849
34850
34851
34852
34853
34854
34855
34856
34857
34858
34859
34860
34861
34862
34863
34864
34865
34866
34867
34868
34869
34870
34871 # Execute function body
34872
34873 # Need to assign to a variable since m4 is blocked from modifying parts in [].
34874 REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34875
34876 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34877 as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34878 fi
34879
34880 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34881 as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34882 fi
34883
34884 # Version comparison method inspired by http://stackoverflow.com/a/24067243
34885 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34886
34887 if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34888 :
34889
34890 else
34891 :
34892
34893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
34894 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34895
34896
34897 fi
34898
34899
34900
34901
34902
34903
34904
34905
34906
34907
34908
34909
34910
34911
34912 fi
34913
34914 #
34915 # Setup the preprocessor (CPP and CXXCPP)
34916 #
34917 ac_ext=c
34918 ac_cpp='$CPP $CPPFLAGS'
34919 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34920 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34921 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34923 $as_echo_n "checking how to run the C preprocessor... " >&6; }
34924 # On Suns, sometimes $CPP names a directory.
34925 if test -n "$CPP" && test -d "$CPP"; then
34926 CPP=
34927 fi
34928 if test -z "$CPP"; then
34929 if ${ac_cv_prog_CPP+:} false; then :
34930 $as_echo_n "(cached) " >&6
34931 else
46470 if test "x$arguments" != xEOL; then
46471 new_complete="$new_path ${arguments% *}"
46472 else
46473 new_complete="$new_path"
46474 fi
46475
46476 if test "x$complete" != "x$new_complete"; then
46477 BUILD_STRIP="$new_complete"
46478 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46479 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46480 fi
46481 fi
46482
46483 # Assume the C compiler is the assembler
46484 BUILD_AS="$BUILD_CC -c"
46485 # Just like for the target compiler, use the compiler as linker
46486 BUILD_LD="$BUILD_CC"
46487 BUILD_LDCXX="$BUILD_CXX"
46488
46489 PATH="$OLDPATH"
46490
46491
46492 COMPILER=$BUILD_CC
46493 COMPILER_NAME=BuildC
46494
46495 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46496 # cc -V output typically looks like
46497 # cc: Sun C 5.12 Linux_i386 2011/11/16
46498 COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46499 # Check that this is likely to be the Solaris Studio cc.
46500 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46501 if test $? -ne 0; then
46502 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46503 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46504 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46505 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46506 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46507 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46508 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46509 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46510 fi
46511 # Remove usage instructions (if present), and
46512 # collapse compiler output into a single line
46513 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46514 $SED -e 's/ *[Uu]sage:.*//'`
46515 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46516 $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46517 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46518 # xlc -qversion output typically looks like
46519 # IBM XL C/C++ for AIX, V11.1 (5724-X13)
46520 # Version: 11.01.0000.0015
46521 COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46522 # Check that this is likely to be the IBM XL C compiler.
46523 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46524 if test $? -ne 0; then
46525 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46526 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46527 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46528 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46529 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46530 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46531 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46532 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46533 fi
46534 # Collapse compiler output into a single line
46535 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46536 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46537 $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46538 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46539 # There is no specific version flag, but all output starts with a version string.
46540 # First line typically looks something like:
46541 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
46542 COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46543 # Check that this is likely to be Microsoft CL.EXE.
46544 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
46545 if test $? -ne 0; then
46546 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46547 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46548 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46549 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46550 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46551 fi
46552 # Collapse compiler output into a single line
46553 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46554 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46555 $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
46556 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46557 # gcc --version output typically looks like
46558 # gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
46559 # Copyright (C) 2013 Free Software Foundation, Inc.
46560 # This is free software; see the source for copying conditions. There is NO
46561 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
46562 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46563 # Check that this is likely to be GCC.
46564 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
46565 if test $? -ne 0; then
46566 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46567 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46568 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
46569 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
46570 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46571 fi
46572 # Remove Copyright and legalese from version string, and
46573 # collapse into a single line
46574 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46575 $SED -e 's/ *Copyright .*//'`
46576 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46577 $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
46578 elif test "x$TOOLCHAIN_TYPE" = xclang; then
46579 # clang --version output typically looks like
46580 # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
46581 # clang version 3.3 (tags/RELEASE_33/final)
46582 # or
46583 # Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
46584 # Target: x86_64-pc-linux-gnu
46585 # Thread model: posix
46586 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46587 # Check that this is likely to be clang
46588 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
46589 if test $? -ne 0; then
46590 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46591 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46592 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46593 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46594 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46595 fi
46596 # Collapse compiler output into a single line
46597 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46598 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46599 $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
46600 else
46601 as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
46602 fi
46603 # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
46604 BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
46605 # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
46606 BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
46607
46608 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
46609 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
46610
46611
46612 COMPILER=$BUILD_CXX
46613 COMPILER_NAME=BuildC++
46614
46615 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46616 # cc -V output typically looks like
46617 # cc: Sun C 5.12 Linux_i386 2011/11/16
46618 COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46619 # Check that this is likely to be the Solaris Studio cc.
46620 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46621 if test $? -ne 0; then
46622 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46623 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46624 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46625 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46626 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46627 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46628 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46629 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46630 fi
46631 # Remove usage instructions (if present), and
46632 # collapse compiler output into a single line
46633 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46634 $SED -e 's/ *[Uu]sage:.*//'`
46635 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46636 $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46637 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46638 # xlc -qversion output typically looks like
46639 # IBM XL C/C++ for AIX, V11.1 (5724-X13)
46640 # Version: 11.01.0000.0015
46641 COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46642 # Check that this is likely to be the IBM XL C compiler.
46643 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46644 if test $? -ne 0; then
46645 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46646 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46647 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46648 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46649 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46650 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46651 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46652 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46653 fi
46654 # Collapse compiler output into a single line
46655 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46656 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46657 $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46658 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46659 # There is no specific version flag, but all output starts with a version string.
46660 # First line typically looks something like:
46661 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
46662 COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46663 # Check that this is likely to be Microsoft CL.EXE.
46664 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
46665 if test $? -ne 0; then
46666 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46667 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46668 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46669 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46670 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46671 fi
46672 # Collapse compiler output into a single line
46673 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46674 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46675 $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
46676 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46677 # gcc --version output typically looks like
46678 # gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
46679 # Copyright (C) 2013 Free Software Foundation, Inc.
46680 # This is free software; see the source for copying conditions. There is NO
46681 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
46682 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46683 # Check that this is likely to be GCC.
46684 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
46685 if test $? -ne 0; then
46686 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46687 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46688 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
46689 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
46690 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46691 fi
46692 # Remove Copyright and legalese from version string, and
46693 # collapse into a single line
46694 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46695 $SED -e 's/ *Copyright .*//'`
46696 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46697 $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
46698 elif test "x$TOOLCHAIN_TYPE" = xclang; then
46699 # clang --version output typically looks like
46700 # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
46701 # clang version 3.3 (tags/RELEASE_33/final)
46702 # or
46703 # Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
46704 # Target: x86_64-pc-linux-gnu
46705 # Thread model: posix
46706 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46707 # Check that this is likely to be clang
46708 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
46709 if test $? -ne 0; then
46710 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46711 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46712 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46713 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46714 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46715 fi
46716 # Collapse compiler output into a single line
46717 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46718 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46719 $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
46720 else
46721 as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
46722 fi
46723 # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
46724 BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
46725 # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
46726 BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
46727
46728 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
46729 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
46730
46731
46732 if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
46733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
46734 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
46735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
46736 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
46737 fi
46738
46739 # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
46740 if [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
46741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
46742 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
46743 fi
46744
46745 if [[ "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
46746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
46747 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
46748 fi
46749
46750 OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
46751
46752 else
46753 # If we are not cross compiling, use the normal target compilers for
46754 # building the build platform executables.
46755 BUILD_CC="$CC"
46756 BUILD_CXX="$CXX"
46757 BUILD_LD="$LD"
46758 BUILD_LDCXX="$LDCXX"
46759 BUILD_NM="$NM"
46760 BUILD_AS="$AS"
46761 BUILD_OBJCOPY="$OBJCOPY"
46762 BUILD_STRIP="$STRIP"
46763 BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46764 BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46765 BUILD_AR="$AR"
46766 fi
46767
46768
46769
46770
46771
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424 # Execute function body
49425
49426 # Need to assign to a variable since m4 is blocked from modifying parts in [].
49427 REFERENCE_VERSION=6
49428
49429 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49430 as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49431 fi
49432
49433 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49434 as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49435 fi
49436
49437 # Version comparison method inspired by http://stackoverflow.com/a/24067243
49438 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49439
49440 if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49441 :
49442
49443 # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49980 CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49981
49982
49983
49984 else
49985 :
49986
49987 fi
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002 elif test "x$TOOLCHAIN_TYPE" = xclang; then
50003 JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50004
50005 # Restrict the debug information created by Clang to avoid
50006 # too big object files and speed the build up a little bit
50007 # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50008 JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50009 if test "x$OPENJDK_TARGET_OS" = xlinux; then
50010 if test "x$OPENJDK_TARGET_CPU" = xx86; then
50011 # Force compatibility with i586 on 32 bit intel platforms.
50012 COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50013 JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50014 fi
50015 JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50016 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50017 -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50018 case $OPENJDK_TARGET_CPU_ARCH in
50019 ppc )
50020 # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50021 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251 # Execute function body
50252
50253 # Need to assign to a variable since m4 is blocked from modifying parts in [].
50254 REFERENCE_VERSION=4.8
50255
50256 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50257 as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50258 fi
50259
50260 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50261 as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50262 fi
50263
50264 # Version comparison method inspired by http://stackoverflow.com/a/24067243
50265 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50266
50267 if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50268 :
50269
50270 # These flags either do not work or give spurious warnings prior to gcc 4.8.
50271 JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50272
50273
50274 else
50275 :
50276
50277 fi
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292 fi
50293 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] && ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
50294 # Non-zero builds have stricter warnings
50295 JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50296 else
50297 if test "x$TOOLCHAIN_TYPE" = xclang; then
50298 # Some versions of llvm do not like -Wundef
50299 JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50300 fi
50301 fi
50302 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50303 JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50304 -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50305 fi
50306
50307 # Additional macosx handling
50308 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50309 # Setting these parameters makes it an error to link to macosx APIs that are
50310 # newer than the given OS version and makes the linked binaries compatible
50311 # even if built on a newer version of the OS.
50738
50739
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770 # Execute function body
50771
50772 # Need to assign to a variable since m4 is blocked from modifying parts in [].
50773 REFERENCE_VERSION=6
50774
50775 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50776 as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50777 fi
50778
50779 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50780 as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50781 fi
50782
50783 # Version comparison method inspired by http://stackoverflow.com/a/24067243
50784 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50785
50786 if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50787 :
50788
50789 else
50790 :
50791
50792 fi
50793
50794
50795
50796
50797
50798
50799
50800
50801
50802
50803
50804
50805
50806
50807 elif test "x$TOOLCHAIN_TYPE" = xclang; then
50808 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50809
50810 # Restrict the debug information created by Clang to avoid
50811 # too big object files and speed the build up a little bit
50812 # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50813 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50814 if test "x$OPENJDK_BUILD_OS" = xlinux; then
50815 if test "x$OPENJDK_BUILD_CPU" = xx86; then
50816 # Force compatibility with i586 on 32 bit intel platforms.
50817 OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50818 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50819 fi
50820 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50821 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50822 -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50823 case $OPENJDK_BUILD_CPU_ARCH in
50824 ppc )
50825 # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50826 OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056 # Execute function body
51057
51058 # Need to assign to a variable since m4 is blocked from modifying parts in [].
51059 REFERENCE_VERSION=4.8
51060
51061 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51062 as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51063 fi
51064
51065 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51066 as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51067 fi
51068
51069 # Version comparison method inspired by http://stackoverflow.com/a/24067243
51070 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51071
51072 if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51073 :
51074
51075 # These flags either do not work or give spurious warnings prior to gcc 4.8.
51076 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51077
51078
51079 else
51080 :
51081
51082 fi
51083
51084
51085
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097 fi
51098 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] && ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
51099 # Non-zero builds have stricter warnings
51100 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51101 else
51102 if test "x$TOOLCHAIN_TYPE" = xclang; then
51103 # Some versions of llvm do not like -Wundef
51104 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51105 fi
51106 fi
51107 elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51108 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51109 -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51110 fi
51111
51112 # Additional macosx handling
51113 if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51114 # Setting these parameters makes it an error to link to macosx APIs that are
51115 # newer than the given OS version and makes the linked binaries compatible
51116 # even if built on a newer version of the OS.
52231 if test "x$supports" = "xyes" ; then
52232 :
52233 GCC_CAN_DISABLE_WARNINGS=true
52234 else
52235 :
52236 GCC_CAN_DISABLE_WARNINGS=false
52237
52238 fi
52239
52240
52241
52242
52243
52244
52245 if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52246 DISABLE_WARNING_PREFIX="-Wno-"
52247 else
52248 DISABLE_WARNING_PREFIX=
52249 fi
52250 CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52251 # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52252 # CFLAGS since any target specific flags will likely not work with the
52253 # build compiler
52254 CC_OLD="$CC"
52255 CXX_OLD="$CXX"
52256 CC="$BUILD_CC"
52257 CXX="$BUILD_CXX"
52258 CFLAGS_OLD="$CFLAGS"
52259 CFLAGS=""
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52517 if test "x$supports" = "xyes" ; then
52518 :
52519 BUILD_CC_CAN_DISABLE_WARNINGS=true
52520 else
52521 :
52522 BUILD_CC_CAN_DISABLE_WARNINGS=false
52523
52524 fi
52525
52526
52527
52528
52529
52530
52531 if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52532 BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52533 else
52534 BUILD_CC_DISABLE_WARNING_PREFIX=
52535 fi
52536 CC="$CC_OLD"
52537 CXX="$CXX_OLD"
52538 CFLAGS="$CFLAGS_OLD"
52539 ;;
52540 clang)
52541 DISABLE_WARNING_PREFIX="-Wno-"
52542 CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52543 ;;
52544 xlc)
52545 DISABLE_WARNING_PREFIX="-qsuppress="
52546 CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52547 ;;
52548 esac
52549
52550
52551
52552
52553
52554 # Setup debug symbols (need objcopy from the toolchain for that)
52555
52556 #
52557 # NATIVE_DEBUG_SYMBOLS
52558 # This must be done after the toolchain is setup, since we're looking at objcopy.
|