< prev index next >

common/autoconf/flags.m4

Print this page
rev 1453 : 8078245: AARCH64: JDK fails to build due to undefined symbol in libpng
Summary: Add -DPNG_ARM_NEON_OPT=0 to JDK flags to fix build
Reviewed-by: dholmes


 468   AC_SUBST(CXX_O_FLAG_NORM)
 469   AC_SUBST(CXX_O_FLAG_DEBUG)
 470   AC_SUBST(CXX_O_FLAG_NONE)
 471 ])
 472 
 473 AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
 474 [
 475   # Special extras...
 476   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
 477     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
 478       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
 479       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
 480     fi
 481     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
 482     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
 483   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
 484     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
 485     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
 486   fi
 487 







 488   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
 489     AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
 490   fi
 491 
 492   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
 493     AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
 494   fi
 495 
 496   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
 497     AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
 498   fi
 499 
 500   AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
 501       [extra flags to be used when compiling jdk c-files])])
 502 
 503   AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
 504       [extra flags to be used when compiling jdk c++-files])])
 505 
 506   AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
 507       [extra flags to be used when linking jdk])])




 468   AC_SUBST(CXX_O_FLAG_NORM)
 469   AC_SUBST(CXX_O_FLAG_DEBUG)
 470   AC_SUBST(CXX_O_FLAG_NONE)
 471 ])
 472 
 473 AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
 474 [
 475   # Special extras...
 476   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
 477     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
 478       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
 479       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
 480     fi
 481     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
 482     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
 483   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
 484     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
 485     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
 486   fi
 487 
 488   # gcc on aarch64 automatically defines the symbol __ARM_NEON
 489   # this causes build failures (undefined symbols in linpng)
 490   # work around this by manually turning off ARM Neon optimization
 491   if test "x$OPENJDK_TARGET_CPU_ARCH" = "xaarch64"; then
 492     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -DPNG_ARM_NEON_OPT=0"
 493   fi
 494 
 495   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
 496     AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
 497   fi
 498 
 499   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
 500     AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
 501   fi
 502 
 503   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
 504     AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
 505   fi
 506 
 507   AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
 508       [extra flags to be used when compiling jdk c-files])])
 509 
 510   AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
 511       [extra flags to be used when compiling jdk c++-files])])
 512 
 513   AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
 514       [extra flags to be used when linking jdk])])


< prev index next >