[packages/openjdk8] - gcc6 build fix from https://github.com/gnu-andrew/java-1.8.0-openjdk/blob/master/gcc6.patch
hawk
hawk at pld-linux.org
Fri Apr 7 10:36:51 CEST 2017
commit 5e31557eee09e43c3f2e21b03b33293b704691ac
Author: Marcin Krol <hawk at tld-linux.org>
Date: Fri Apr 7 08:35:59 2017 +0000
- gcc6 build fix from https://github.com/gnu-andrew/java-1.8.0-openjdk/blob/master/gcc6.patch
gcc6.patch | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 118 insertions(+)
---
diff --git a/gcc6.patch b/gcc6.patch
new file mode 100644
index 0000000..ec832a5
--- /dev/null
+++ b/gcc6.patch
@@ -0,0 +1,118 @@
+diff -r 86030362b0c5 common/autoconf/hotspot-spec.gmk.in
+--- openjdk/common/autoconf/hotspot-spec.gmk.in Mon Feb 29 06:45:20 2016 +0000
++++ openjdk/common/autoconf/hotspot-spec.gmk.in Fri Mar 11 18:01:42 2016 +0000
+@@ -109,7 +109,7 @@
+ MT:=@HOTSPOT_MT@
+ RC:=@HOTSPOT_RC@
+
+-EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@
++EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(NO_NULL_POINTER_CHECK_FLAG) $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG)
+ EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
+ EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
+
+diff -r 86030362b0c5 common/autoconf/spec.gmk.in
+--- openjdk/common/autoconf/spec.gmk.in Mon Feb 29 06:45:20 2016 +0000
++++ openjdk/common/autoconf/spec.gmk.in Fri Mar 11 18:01:42 2016 +0000
+@@ -320,6 +320,10 @@
+ C_FLAG_DEPS:=@C_FLAG_DEPS@
+ CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
+
++NO_NULL_POINTER_CHECK_FLAG=@NO_NULL_POINTER_CHECK_CFLAG@
++NO_LIFETIME_DSE_CFLAG=@NO_LIFETIME_DSE_CFLAG@
++CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
++
+ # Tools that potentially need to be cross compilation aware.
+ CC:=@FIXPATH@ @CCACHE@ @CC@
+
+diff -r 86030362b0c5 common/autoconf/toolchain.m4
+--- openjdk/common/autoconf/toolchain.m4 Mon Feb 29 06:45:20 2016 +0000
++++ openjdk/common/autoconf/toolchain.m4 Fri Mar 11 18:01:42 2016 +0000
+@@ -784,6 +784,10 @@
+ CFLAGS_DEBUG_SYMBOLS="-g1"
+ CXXFLAGS_DEBUG_SYMBOLS="-g1"
+ fi
++ CXXSTD_CXXFLAG="-std=gnu++98"
++ TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS([$CXXSTD_CXXFLAG -Werror], [], [CXXSTD_CXXFLAG=""])
++ CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
++ AC_SUBST([CXXSTD_CXXFLAG])
+ ;;
+ ossc )
+ #
+@@ -973,6 +977,16 @@
+ CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+ ;;
+ esac
++ # These flags are required for GCC 6 builds but may not be available on earlier versions
++ NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
++ TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$NO_NULL_POINTER_CHECK_CFLAG -Werror], [],
++ [NO_NULL_POINTER_CHECK_CFLAG=""])
++ AC_SUBST([NO_NULL_POINTER_CHECK_CFLAG])
++ NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
++ TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$NO_LIFETIME_DSE_CFLAG -Werror], [],
++ [NO_LIFETIME_DSE_CFLAG=""])
++ CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
++ AC_SUBST([NO_LIFETIME_DSE_CFLAG])
+ ;;
+ ossc )
+ CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
+@@ -1200,9 +1214,9 @@
+ # [RUN-IF-FALSE])
+ # ------------------------------------------------------------
+ # Check that the c and c++ compilers support an argument
+-AC_DEFUN([TOOLCHAIN_COMPILER_CHECK_ARGUMENTS],
++AC_DEFUN([TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS],
+ [
+- AC_MSG_CHECKING([if compiler supports "$1"])
++ AC_MSG_CHECKING([if the C compiler supports "$1"])
+ supports=yes
+
+ saved_cflags="$CFLAGS"
+@@ -1213,6 +1227,19 @@
+ AC_LANG_POP([C])
+ CFLAGS="$saved_cflags"
+
++ AC_MSG_RESULT([$supports])
++ if test "x$supports" = "xyes" ; then
++ m4_ifval([$2], [$2], [:])
++ else
++ m4_ifval([$3], [$3], [:])
++ fi
++])
++
++AC_DEFUN([TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS],
++[
++ AC_MSG_CHECKING([if the C++ compiler supports "$1"])
++ supports=yes
++
+ saved_cxxflags="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAG $1"
+ AC_LANG_PUSH([C++])
+@@ -1220,7 +1247,28 @@
+ [supports=no])
+ AC_LANG_POP([C++])
+ CXXFLAGS="$saved_cxxflags"
++
++ AC_MSG_RESULT([$supports])
++ if test "x$supports" = "xyes" ; then
++ m4_ifval([$2], [$2], [:])
++ else
++ m4_ifval([$3], [$3], [:])
++ fi
++])
+
++# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
++# IF_FALSE: [RUN-IF-FALSE])
++# ------------------------------------------------------------
++# Check that the c and c++ compilers support an argument
++AC_DEFUN([TOOLCHAIN_COMPILER_CHECK_ARGUMENTS],
++[
++ TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS([$1], [C_COMP_SUPPORTS="yes"], [C_COMP_SUPPORTS="no"])
++ TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS([$1], [CXX_COMP_SUPPORTS="yes"], [CXX_COMP_SUPPORTS="no"])
++
++ AC_MSG_CHECKING([if both compilers support "$1"])
++ supports=no
++ if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
++
+ AC_MSG_RESULT([$supports])
+ if test "x$supports" = "xyes" ; then
+ m4_ifval([$2], [$2], [:])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/openjdk8.git/commitdiff/2e7929e14d15c89383bf585efd5496167db67ca5
More information about the pld-cvs-commit
mailing list