From bac3b9acee5110390d15d38dacdb1622e31b2238 Mon Sep 17 00:00:00 2001 From: Jens Rehsack Date: Tue, 8 Dec 2015 14:52:51 +0100 Subject: openjdk-8: add recipes for openjdk-8 and openjre-8 This adds openjdk-8 for native and target builds and allows a stripped openjre-8 being built as well instead of trying to cherry-pick jre components from jdk-image. The recipes allow building openjdk-8 with or without: * x11 * cups * alsa/pulseaudio and let packager enable unlimited-crypto, if desired. To support certificate based java libraries, cacerts is created based on ca-certificates from OE-core. Since there can be only one PROVIDES for virtual/java-native and virtual/javac-native, move the provides to openjdk-8-native (I think everyone agrees it's a better choice than ecj-bootstrap-native). Plus: Applying a fix from openjdk-9 repository which fixes build issues using gcc5 Signed-off-by: Jens Rehsack Signed-off-by: Maxin B. John --- .../openjdk8-find-compiler-fix-env-respect.patch | 140 +++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 recipes-core/openjdk/patches-openjdk-8/openjdk8-find-compiler-fix-env-respect.patch (limited to 'recipes-core/openjdk/patches-openjdk-8/openjdk8-find-compiler-fix-env-respect.patch') diff --git a/recipes-core/openjdk/patches-openjdk-8/openjdk8-find-compiler-fix-env-respect.patch b/recipes-core/openjdk/patches-openjdk-8/openjdk8-find-compiler-fix-env-respect.patch new file mode 100644 index 0000000..0750dac --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/openjdk8-find-compiler-fix-env-respect.patch @@ -0,0 +1,140 @@ +--- common/autoconf/toolchain.m4.orig 2015-08-07 20:52:38.000000000 +0200 ++++ common/autoconf/toolchain.m4 2015-10-27 13:57:19.708566525 +0100 +@@ -27,7 +27,7 @@ + # $2 = human readable name of compiler (C or C++) + AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION], + [ +- COMPILER=[$]$1 ++ COMPILER="[$]$1" + COMPILER_NAME=$2 + + if test "x$OPENJDK_TARGET_OS" = xsolaris; then +@@ -123,64 +123,37 @@ + [ + COMPILER_NAME=$2 + +- $1= ++ FOUND_$1= ++ ++ if test "x[$]$1" != "x"; then ++ FOUND_$1="[$]$1" ++ fi ++ + # If TOOLS_DIR is set, check for all compiler names in there first + # before checking the rest of the PATH. +- if test -n "$TOOLS_DIR"; then ++ if test "x[$]FOUND_$1" = x -a -n "$TOOLS_DIR"; then + PATH_save="$PATH" + PATH="$TOOLS_DIR" + AC_PATH_PROGS(TOOLS_DIR_$1, $3) +- $1=$TOOLS_DIR_$1 ++ FOUND_$1=$TOOLS_DIR_$1 + PATH="$PATH_save" + fi + + # AC_PATH_PROGS can't be run multiple times with the same variable, + # so create a new name for this run. +- if test "x[$]$1" = x; then ++ if test "x[$]FOUND_$1" = x; then + AC_PATH_PROGS(POTENTIAL_$1, $3) +- $1=$POTENTIAL_$1 ++ FOUND_$1=$POTENTIAL_$1 + fi + +- if test "x[$]$1" = x; then ++ if test "x[$]FOUND_$1" = x; then + HELP_MSG_MISSING_DEPENDENCY([devkit]) + AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG]) + fi +- BASIC_FIXUP_EXECUTABLE($1) +- TEST_COMPILER="[$]$1" +- # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links +- # to 'xlc' but it is crucial that we invoke the compiler with the right name! +- if test "x$OPENJDK_BUILD_OS" != xaix; then +- AC_MSG_CHECKING([resolved symbolic links for $1]) +- BASIC_REMOVE_SYMBOLIC_LINKS(TEST_COMPILER) +- AC_MSG_RESULT([$TEST_COMPILER]) +- fi +- AC_MSG_CHECKING([if $1 is disguised ccache]) +- +- COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` +- if test "x$COMPILER_BASENAME" = "xccache"; then +- AC_MSG_RESULT([yes, trying to find proper $COMPILER_NAME compiler]) +- # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. +- # We want to control ccache invocation ourselves, so ignore this cc and try +- # searching again. +- +- # Remove the path to the fake ccache cc from the PATH +- RETRY_COMPILER_SAVED_PATH="$PATH" +- COMPILER_DIRNAME=`$DIRNAME [$]$1` +- PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" +- +- # Try again looking for our compiler +- AC_CHECK_TOOLS(PROPER_COMPILER_$1, $3) +- BASIC_FIXUP_EXECUTABLE(PROPER_COMPILER_$1) +- PATH="$RETRY_COMPILER_SAVED_PATH" +- +- AC_MSG_CHECKING([for resolved symbolic links for $1]) +- BASIC_REMOVE_SYMBOLIC_LINKS(PROPER_COMPILER_$1) +- AC_MSG_RESULT([$PROPER_COMPILER_$1]) +- $1="$PROPER_COMPILER_$1" +- else +- AC_MSG_RESULT([no, keeping $1]) +- $1="$TEST_COMPILER" +- fi ++ BASIC_FIXUP_EXECUTABLE(FOUND_$1) ++ TEST_COMPILER="[$]FOUND_$1" ++ ++ $1="$TEST_COMPILER" + TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME]) + ]) + +@@ -214,12 +187,12 @@ + # otherwise we might pick up cross-compilers which don't use standard naming. + # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have + # to wait until they are properly discovered. +- AC_PATH_PROGS(BUILD_CC, [cl cc gcc]) +- BASIC_FIXUP_EXECUTABLE(BUILD_CC) +- AC_PATH_PROGS(BUILD_CXX, [cl CC g++]) +- BASIC_FIXUP_EXECUTABLE(BUILD_CXX) +- AC_PATH_PROG(BUILD_LD, ld) +- BASIC_FIXUP_EXECUTABLE(BUILD_LD) ++ AS_IF([test "x${BUILD_CC}" = "x"], [AC_PATH_PROGS(BUILD_CC, [cl cc gcc]) ++ BASIC_FIXUP_EXECUTABLE(BUILD_CC)]) ++ AS_IF([test "x${BUILD_CXX}" = "x"], [AC_PATH_PROGS(BUILD_CXX, [cl CC g++]) ++ BASIC_FIXUP_EXECUTABLE(BUILD_CXX)]) ++ AS_IF([test "x${BUILD_LD}" = "x"], [AC_PATH_PROG(BUILD_LD, ld) ++ BASIC_FIXUP_EXECUTABLE(BUILD_LD)]) + fi + AC_SUBST(BUILD_CC) + AC_SUBST(BUILD_CXX) +--- common/autoconf/basics.m4.orig 2015-08-31 15:03:54.942975387 +0200 ++++ common/autoconf/basics.m4 2015-08-31 15:02:25.090975049 +0200 +@@ -171,8 +171,15 @@ + fi + fi + ++ # First separate the path from the arguments. This will split at the first ++ # space. ++ complete="[$]$1" ++ path="${complete%% *}" ++ tmp="$complete EOL" ++ arguments="${tmp#* }" ++ + if test "x$READLINK" != x; then +- $1=`$READLINK -f [$]$1` ++ new_path=`$READLINK -f $path` + else + # Save the current directory for restoring afterwards + STARTDIR=$PWD +@@ -198,8 +205,9 @@ + let COUNTER=COUNTER+1 + done + cd $STARTDIR +- $1=$sym_link_dir/$sym_link_file ++ new_path=$sym_link_dir/$sym_link_file + fi ++ $1="$new_path ${arguments% *}" + fi + ]) + -- cgit v1.2.3-54-g00ecf