< prev index next >

make/autoconf/flags.m4

Print this page
rev 47445 : 8171853: Remove Shark compiler


1080     if test "x$OPENJDK_$1_OS" != xsolaris && test "x$OPENJDK_$1_OS" != xaix; then
1081       # Solaris does not have _LP64=1 in the old build.
1082       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
1083       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_LP64=1"
1084     fi
1085   fi
1086 
1087   # Set $2JVM_CFLAGS warning handling
1088   if test "x$OPENJDK_$1_OS" = xlinux; then
1089     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
1090         -Wunused-value -Woverloaded-virtual"
1091 
1092     if test "x$TOOLCHAIN_TYPE" = xgcc; then
1093       TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: [4.8], PREFIX: $2,
1094           IF_AT_LEAST: [
1095             # These flags either do not work or give spurious warnings prior to gcc 4.8.
1096             $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
1097           ]
1098       )
1099     fi
1100     if ! HOTSPOT_CHECK_JVM_VARIANT(zero) && ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
1101       # Non-zero builds have stricter warnings
1102       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
1103     else
1104       if test "x$TOOLCHAIN_TYPE" = xclang; then
1105         # Some versions of llvm do not like -Wundef
1106         $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-undef"
1107       fi
1108     fi
1109   elif test "x$OPENJDK_$1_OS" = xmacosx; then
1110     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
1111         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
1112   fi
1113 
1114   # Additional macosx handling
1115   if test "x$OPENJDK_$1_OS" = xmacosx; then
1116     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
1117     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
1118     # JDK can be built and makes the linked binaries compatible even if built on
1119     # a newer version of the OS.
1120     MACOSX_VERSION_MIN=10.7.0




1080     if test "x$OPENJDK_$1_OS" != xsolaris && test "x$OPENJDK_$1_OS" != xaix; then
1081       # Solaris does not have _LP64=1 in the old build.
1082       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
1083       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_LP64=1"
1084     fi
1085   fi
1086 
1087   # Set $2JVM_CFLAGS warning handling
1088   if test "x$OPENJDK_$1_OS" = xlinux; then
1089     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
1090         -Wunused-value -Woverloaded-virtual"
1091 
1092     if test "x$TOOLCHAIN_TYPE" = xgcc; then
1093       TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: [4.8], PREFIX: $2,
1094           IF_AT_LEAST: [
1095             # These flags either do not work or give spurious warnings prior to gcc 4.8.
1096             $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
1097           ]
1098       )
1099     fi
1100     if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
1101       # Non-zero builds have stricter warnings
1102       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
1103     else
1104       if test "x$TOOLCHAIN_TYPE" = xclang; then
1105         # Some versions of llvm do not like -Wundef
1106         $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-undef"
1107       fi
1108     fi
1109   elif test "x$OPENJDK_$1_OS" = xmacosx; then
1110     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
1111         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
1112   fi
1113 
1114   # Additional macosx handling
1115   if test "x$OPENJDK_$1_OS" = xmacosx; then
1116     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
1117     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
1118     # JDK can be built and makes the linked binaries compatible even if built on
1119     # a newer version of the OS.
1120     MACOSX_VERSION_MIN=10.7.0


< prev index next >