< prev index next >

common/autoconf/flags.m4

Print this page
rev 2255 : 8166800: [s390] Top-level build changes required for Linux/s390x


 743   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 744     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_GNU_SOURCE"
 745     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_REENTRANT"
 746     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -fcheck-new"
 747     if test "x$OPENJDK_$1_CPU" = xx86; then
 748       # Force compatibility with i586 on 32 bit intel platforms.
 749       $2COMMON_CCXXFLAGS="${$2COMMON_CCXXFLAGS} -march=i586"
 750       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -march=i586"
 751     fi
 752     $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
 753         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
 754     case $OPENJDK_$1_CPU_ARCH in
 755       arm )
 756         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
 757         $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
 758         ;;
 759       ppc )
 760         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
 761         $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
 762         ;;




 763       * )
 764         $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
 765         $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
 766         ;;
 767     esac
 768     TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: 6, PREFIX: $2, IF_AT_LEAST: FLAGS_SETUP_GCC6_COMPILER_FLAGS($2))
 769   elif test "x$TOOLCHAIN_TYPE" = xclang; then
 770     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_GNU_SOURCE"
 771 
 772     # Restrict the debug information created by Clang to avoid
 773     # too big object files and speed the build up a little bit
 774     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
 775     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -flimit-debug-info"
 776     if test "x$OPENJDK_$1_OS" = xlinux; then
 777       if test "x$OPENJDK_$1_CPU" = xx86; then
 778         # Force compatibility with i586 on 32 bit intel platforms.
 779         $2COMMON_CCXXFLAGS="${$2COMMON_CCXXFLAGS} -march=i586"
 780         $2JVM_CFLAGS="[$]$2JVM_CFLAGS -march=i586"
 781       fi
 782       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-sometimes-uninitialized"


 923     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -arch:IA32"
 924   elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
 925     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -xarch=sparc"
 926   elif test "x$OPENJDK_$1_CPU" = xppc64; then
 927     if test "x$OPENJDK_$1_OS" = xlinux; then
 928       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
 929       # fixes `relocation truncated to fit' error for gcc 4.1.
 930       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mminimal-toc"
 931       # Use ppc64 instructions, but schedule for power5
 932       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
 933     elif test "x$OPENJDK_$1_OS" = xaix; then
 934       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qarch=ppc64"
 935     fi
 936   elif test "x$OPENJDK_$1_CPU" = xppc64le; then
 937     if test "x$OPENJDK_$1_OS" = xlinux; then
 938       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
 939       # Little endian machine uses ELFv2 ABI.
 940       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DABI_ELFv2"
 941       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
 942       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mcpu=power7 -mtune=power8"




 943     fi
 944   fi
 945 
 946   if test "x$OPENJDK_$1_CPU_ENDIAN" = xlittle; then
 947     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DVM_LITTLE_ENDIAN"
 948   fi
 949 
 950   if test "x$OPENJDK_$1_CPU_BITS" = x64; then
 951     if test "x$OPENJDK_$1_OS" != xsolaris && test "x$OPENJDK_$1_OS" != xaix; then
 952       # Solaris does not have _LP64=1 in the old build.
 953       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
 954       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_LP64=1"
 955     fi
 956   fi
 957 
 958   # Set $2JVM_CFLAGS warning handling
 959   if test "x$OPENJDK_$1_OS" = xlinux; then
 960     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
 961         -Wunused-value -Woverloaded-virtual"
 962 




 743   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 744     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_GNU_SOURCE"
 745     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_REENTRANT"
 746     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -fcheck-new"
 747     if test "x$OPENJDK_$1_CPU" = xx86; then
 748       # Force compatibility with i586 on 32 bit intel platforms.
 749       $2COMMON_CCXXFLAGS="${$2COMMON_CCXXFLAGS} -march=i586"
 750       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -march=i586"
 751     fi
 752     $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
 753         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
 754     case $OPENJDK_$1_CPU_ARCH in
 755       arm )
 756         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
 757         $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
 758         ;;
 759       ppc )
 760         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
 761         $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
 762         ;;
 763       s390 )
 764         $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
 765         $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
 766         ;;
 767       * )
 768         $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
 769         $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
 770         ;;
 771     esac
 772     TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: 6, PREFIX: $2, IF_AT_LEAST: FLAGS_SETUP_GCC6_COMPILER_FLAGS($2))
 773   elif test "x$TOOLCHAIN_TYPE" = xclang; then
 774     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_GNU_SOURCE"
 775 
 776     # Restrict the debug information created by Clang to avoid
 777     # too big object files and speed the build up a little bit
 778     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
 779     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -flimit-debug-info"
 780     if test "x$OPENJDK_$1_OS" = xlinux; then
 781       if test "x$OPENJDK_$1_CPU" = xx86; then
 782         # Force compatibility with i586 on 32 bit intel platforms.
 783         $2COMMON_CCXXFLAGS="${$2COMMON_CCXXFLAGS} -march=i586"
 784         $2JVM_CFLAGS="[$]$2JVM_CFLAGS -march=i586"
 785       fi
 786       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-sometimes-uninitialized"


 927     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -arch:IA32"
 928   elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
 929     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -xarch=sparc"
 930   elif test "x$OPENJDK_$1_CPU" = xppc64; then
 931     if test "x$OPENJDK_$1_OS" = xlinux; then
 932       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
 933       # fixes `relocation truncated to fit' error for gcc 4.1.
 934       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mminimal-toc"
 935       # Use ppc64 instructions, but schedule for power5
 936       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
 937     elif test "x$OPENJDK_$1_OS" = xaix; then
 938       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qarch=ppc64"
 939     fi
 940   elif test "x$OPENJDK_$1_CPU" = xppc64le; then
 941     if test "x$OPENJDK_$1_OS" = xlinux; then
 942       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
 943       # Little endian machine uses ELFv2 ABI.
 944       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DABI_ELFv2"
 945       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
 946       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mcpu=power7 -mtune=power8"
 947     fi
 948   elif test "x$OPENJDK_$1_CPU" = xs390x; then
 949     if test "x$OPENJDK_$1_OS" = xlinux; then
 950       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mbackchain -march=z10"
 951     fi
 952   fi
 953 
 954   if test "x$OPENJDK_$1_CPU_ENDIAN" = xlittle; then
 955     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DVM_LITTLE_ENDIAN"
 956   fi
 957 
 958   if test "x$OPENJDK_$1_CPU_BITS" = x64; then
 959     if test "x$OPENJDK_$1_OS" != xsolaris && test "x$OPENJDK_$1_OS" != xaix; then
 960       # Solaris does not have _LP64=1 in the old build.
 961       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
 962       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_LP64=1"
 963     fi
 964   fi
 965 
 966   # Set $2JVM_CFLAGS warning handling
 967   if test "x$OPENJDK_$1_OS" = xlinux; then
 968     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
 969         -Wunused-value -Woverloaded-virtual"
 970 


< prev index next >