Package: openjdk-6
Version: 6b30-1.13.1-1
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu trusty ubuntu-patch

Dear Maintainer,

In preparing security updates for older releases of Ubuntu, I found a number of
issues with the current openjdk-6 package:
 * configure and acinclude.m4 were patched directly rather than using a patch
   system resulting in aclocal being run on every build. IcedTead 1.13.1 now
   requires autotools 1.14, but this is not available on Ubuntu 13.10 and
   earlier.
 * debian/patches/java-access-bridge-security.patch was malformed and would
   not apply on Ubuntu 10.04 LTS
 * the previous security update introduced LP: #1283828 (upstream 8017173)

The attached patch was applied to Ubuntu to achieve the following:

  * pull out changes to configure and acinclude.m4 from diff.gz and
    conditionally apply to Debian and Ubuntu releases that have arm64 and/or
    automake-1.14. IcedTea 1.13 requires automake 1.14 now and the change to
    diff.gz caused a FTBFS on backport builds
    - add debian/patches/autotools-aarch64.diff
    - debian/rules:
      + add PRECONFIGURE_DEBIAN_PATCHES which is empty on releases where we
        don't have automake-1.14, otherwise add autotools-aarch64.diff
      + add preconfigure-distribution-patches.stamp target and have
        stamps/icedtea-configure depend on it
      + adjust debian-clean to unapply PRECONFIGURE_DEBIAN_PATCHES
  * debian/patches/8017173.diff: XMLCipher with RSA_OAEP Key Transport
    algorithm can't be instantiated (LP: #1283828)
  * debian/patches/java-access-bridge-security.patch: fix malformed patch

Ubuntu also did the following as part of the security update:
  * debian/rules: disable system lcms2 for releases that don't have lcms2 2.5
    or higher

but after further investigation, it seems this was not actually required, so I
removed this from the patch I am submitting to you now.

debian/patches/8017173.diff adds a test case, but it is not run in the build. I
didn't investigate why, but it can be run manually with:
$ javac -XDignore.symbol.file GetInstance.java
$ java GetInstance

A patched openjdk will exit with '0' while unpatched will throw the exception
in the bug. This regression was introduced due to a partial backport from
openjdk8 to openjdk7 which IcedTea picked up. They then pulled back this
partial backport for the 1.x releases. Incidentally, this issue affects
openjdk-7 7u51-2.4.5-1ubuntu1, so it should be applied to the openjdk-7 package
in sid as well. I filed this bug with upstream for the regression:
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1688

Thanks for considering the patch.


-- System Information:
Debian Release: jessie/sid
  APT prefers trusty-updates
  APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13.0-8-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
reverted:
--- openjdk-6-6b30-1.13.1/acinclude.m4
+++ openjdk-6-6b30-1.13.1.orig/acinclude.m4
@@ -22,12 +22,6 @@
       JRE_ARCH_DIR=alpha
       CROSS_TARGET_ARCH=alpha
       ;;
-    arm64|aarch64)
-      BUILD_ARCH_DIR=aarch64
-      INSTALL_ARCH_DIR=aarch64
-      JRE_ARCH_DIR=aarch64
-      ARCHFLAG="-D_LITTLE_ENDIAN"
-      ;;
     arm*)
       BUILD_ARCH_DIR=arm
       INSTALL_ARCH_DIR=arm
@@ -1559,7 +1553,7 @@
   AC_MSG_RESULT(${ENABLE_SYSTEM_LCMS})
   if test x"${ENABLE_SYSTEM_LCMS}" = "xyes"; then
     dnl Check for LCMS2 headers and libraries.
+    PKG_CHECK_MODULES(LCMS2, lcms2 >= 2.5,[LCMS2_FOUND=yes],[LCMS2_FOUND=no])
-    PKG_CHECK_MODULES(LCMS2, lcms2,[LCMS2_FOUND=yes],[LCMS2_FOUND=no])
     if test "x${LCMS2_FOUND}" = xno
     then
       AC_MSG_ERROR([Could not find LCMS >= 2.5; install it or build with --disable-system-lcms to use the in-tree copy.])
reverted:
--- openjdk-6-6b30-1.13.1/configure
+++ openjdk-6-6b30-1.13.1.orig/configure
@@ -7216,12 +7216,6 @@
       JRE_ARCH_DIR=alpha
       CROSS_TARGET_ARCH=alpha
       ;;
-    arm64|aarch64)
-      BUILD_ARCH_DIR=aarch64
-      INSTALL_ARCH_DIR=aarch64
-      JRE_ARCH_DIR=aarch64
-      ARCHFLAG="-D_LITTLE_ENDIAN"
-      ;;
     arm*)
       BUILD_ARCH_DIR=arm
       INSTALL_ARCH_DIR=arm
@@ -9484,7 +9478,7 @@
   mkdir tmp.$$
   cd tmp.$$
   cat << \EOF > $CLASS
+/* [#]line 9481 "configure" */
-/* [#]line 9487 "configure" */
 
 public class Test
 {
@@ -9526,7 +9520,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 9523 "configure" */
-/* [#]line 9529 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -9593,7 +9587,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 9590 "configure" */
-/* [#]line 9596 "configure" */
 public class Test
 {
   public static void main(String[] args)
@@ -9641,7 +9635,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 9638 "configure" */
-/* [#]line 9644 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -9708,7 +9702,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 9705 "configure" */
-/* [#]line 9711 "configure" */
 import java.lang.reflect.Constructor;
 
 public class Test
@@ -9777,7 +9771,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 9774 "configure" */
-/* [#]line 9780 "configure" */
 import java.lang.reflect.Constructor;
 
 public class Test
@@ -9847,7 +9841,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 9844 "configure" */
-/* [#]line 9850 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -9913,7 +9907,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 9910 "configure" */
-/* [#]line 9916 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -9979,7 +9973,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 9976 "configure" */
-/* [#]line 9982 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -10045,7 +10039,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10042 "configure" */
-/* [#]line 10048 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -10111,7 +10105,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10108 "configure" */
-/* [#]line 10114 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -10177,7 +10171,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10174 "configure" */
-/* [#]line 10180 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -10244,7 +10238,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10241 "configure" */
-/* [#]line 10247 "configure" */
 import java.lang.reflect.Field;
 
 public class Test
@@ -10306,7 +10300,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10303 "configure" */
-/* [#]line 10309 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -10372,7 +10366,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10369 "configure" */
-/* [#]line 10375 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -10440,7 +10434,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10437 "configure" */
-/* [#]line 10443 "configure" */
 import java.lang.reflect.Constructor;
 
 public class Test
@@ -10510,7 +10504,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10507 "configure" */
-/* [#]line 10513 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -10577,7 +10571,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10574 "configure" */
-/* [#]line 10580 "configure" */
 import java.lang.reflect.Method;
 
 public class Test
@@ -10644,7 +10638,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10641 "configure" */
-/* [#]line 10647 "configure" */
 import java.lang.reflect.Constructor;
 
 public class Test
@@ -10713,7 +10707,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10710 "configure" */
-/* [#]line 10716 "configure" */
 import java.lang.reflect.Constructor;
 
 public class Test
@@ -10782,7 +10776,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10779 "configure" */
-/* [#]line 10785 "configure" */
 import java.lang.reflect.Constructor;
 
 public class Test
@@ -10851,7 +10845,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $CLASS
+/* [#]line 10848 "configure" */
-/* [#]line 10854 "configure" */
 import java.lang.reflect.Constructor;
 
 public class Test
@@ -11170,12 +11164,6 @@
       JRE_ARCH_DIR=alpha
       CROSS_TARGET_ARCH=alpha
       ;;
-    arm64|aarch64)
-      BUILD_ARCH_DIR=aarch64
-      INSTALL_ARCH_DIR=aarch64
-      JRE_ARCH_DIR=aarch64
-      ARCHFLAG="-D_LITTLE_ENDIAN"
-      ;;
     arm*)
       BUILD_ARCH_DIR=arm
       INSTALL_ARCH_DIR=arm
@@ -12074,7 +12062,7 @@
   mkdir tmp.$$
   cd tmp.$$
   cat << \EOF > $CLASS
+/* [#]line 12065 "configure" */
-/* [#]line 12077 "configure" */
 
 public class Test
 {
@@ -12697,7 +12685,7 @@
   mkdir tmp.$$
   cd tmp.$$
   cat << \EOF > $CLASS
+/* [#]line 12688 "configure" */
-/* [#]line 12700 "configure" */
 import javax.xml.namespace.QName;
 import javax.xml.stream.Location;
 import javax.xml.stream.events.Attribute;
@@ -12787,7 +12775,7 @@
 mkdir tmp.$$
 cd tmp.$$
 cat << \EOF > $SUPERCLASS
+/* #line 12778 "configure" */
-/* #line 12790 "configure" */
 public class Test
 {
   public static final int POTATO = 0;
@@ -12795,7 +12783,7 @@
 }
 EOF
 cat << \EOF > $SUBCLASS
+/* #line 12786 "configure" */
-/* #line 12798 "configure" */
 public class TestImpl
   extends Test
 {
@@ -13518,12 +13506,12 @@
     pkg_cv_LCMS2_CFLAGS="$LCMS2_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2 >= 2.5\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "lcms2 >= 2.5") 2>&5
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
+  pkg_cv_LCMS2_CFLAGS=`$PKG_CONFIG --cflags "lcms2 >= 2.5" 2>/dev/null`
-  pkg_cv_LCMS2_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -13535,12 +13523,12 @@
     pkg_cv_LCMS2_LIBS="$LCMS2_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2 >= 2.5\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "lcms2 >= 2.5") 2>&5
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
+  pkg_cv_LCMS2_LIBS=`$PKG_CONFIG --libs "lcms2 >= 2.5" 2>/dev/null`
-  pkg_cv_LCMS2_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -13561,9 +13549,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
+	        LCMS2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms2 >= 2.5" 2>&1`
-	        LCMS2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms2" 2>&1`
         else
+	        LCMS2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms2 >= 2.5" 2>&1`
-	        LCMS2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms2" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LCMS2_PKG_ERRORS" >&5
diff -u openjdk-6-6b30-1.13.1/debian/changelog openjdk-6-6b30-1.13.1/debian/changelog
diff -u openjdk-6-6b30-1.13.1/debian/patches/java-access-bridge-security.patch openjdk-6-6b30-1.13.1/debian/patches/java-access-bridge-security.patch
--- openjdk-6-6b30-1.13.1/debian/patches/java-access-bridge-security.patch
+++ openjdk-6-6b30-1.13.1/debian/patches/java-access-bridge-security.patch
@@ -1,6 +1,6 @@
 --- openjdk/jdk/src/share/lib/security/java.security-linux
 +++ openjdk/jdk/src/share/lib/security/java.security-linux
-@@ -128,6 +128,7 @@
+@@ -128,6 +128,8 @@
  # corresponding RuntimePermission ("accessClassInPackage."+package) has
  # been granted.
  package.access=sun.,\
diff -u openjdk-6-6b30-1.13.1/debian/rules openjdk-6-6b30-1.13.1/debian/rules
--- openjdk-6-6b30-1.13.1/debian/rules
+++ openjdk-6-6b30-1.13.1/debian/rules
@@ -437,6 +437,9 @@
 	debian/patches/alpha-float-const.diff
 endif
 
+DISTRIBUTION_PATCHES += \
+	debian/patches/8017173.diff
+
 export DISTRIBUTION_PATCHES DISTRIBUTION_ECJ_PATCHES
 
 ifeq ($(STAGE1_JAVA),gcj)
@@ -955,6 +961,21 @@
           exit 1; \
 	fi
 
+# add any distro-specific patches here that should be applied before
+# icedtea-configure
+PRECONFIGURE_DEBIAN_PATCHES :=
+
+ifeq (,$(filter $(distrel),lenny squeeze wheezy saucy raring quantal precise oneiric natty maverick lucid karmic jaunty intrepid hardy))
+    PRECONFIGURE_DEBIAN_PATCHES += debian/patches/autotools-aarch64.diff
+endif
+
+preconfigure-distribution-patches: preconfigure-distribution-patches.stamp
+preconfigure-distribution-patches.stamp:
+	for p in $(PRECONFIGURE_DEBIAN_PATCHES) ; do \
+		cat "$$p" | patch -p1 ; \
+	done
+	touch $@
+
 packaging-files:
 	for f in debian/*.in debian/patches/*.in; do \
 	  case "$$f" in debian/control.in) continue; esac; \
@@ -994,7 +1015,7 @@
 endif
 
 icedtea-configure: stamps/icedtea-configure
-stamps/icedtea-configure:
+stamps/icedtea-configure: preconfigure-distribution-patches
 	-cat /etc/hosts
 
 	mkdir -p bin
@@ -1399,6 +1420,12 @@
 	  rm -f $$f2; \
 	done
 	rm -f debian/*.install debian/*.links debian/*.debhelper.log
+	if [ -e preconfigure-distribution-patches.stamp ]; then \
+	  for p in $(PRECONFIGURE_DEBIAN_PATCHES) ; do \
+	    cat "$$p" | patch -p1 -R ; \
+	  done ; \
+	  rm -f preconfigure-distribution-patches.stamp ; \
+	fi
 
 lib_ext_dirs = common $(sort $(foreach arch,$(arch_map),$(firstword $(subst =,$(SPACE),$(arch)))))
 ifeq ($(distribution),Ubuntu)
only in patch2:
unchanged:
--- openjdk-6-6b30-1.13.1.orig/debian/patches/8017173.diff
+++ openjdk-6-6b30-1.13.1/debian/patches/8017173.diff
@@ -0,0 +1,68 @@
+
+# HG changeset patch
+# User mullan
+# Date 1373562821 14400
+# Node ID c5d869453212ac971258f818de8b158dc22b6e8c
+# Parent 3119569301137347116bc045e4010f477bbc7a72
+8017173: XMLCipher with RSA_OAEP Key Transport algorithm can't be instantiated
+Reviewed-by: xuelei, vinnie
+
+--- openjdk/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java	Thu Jul 11 12:41:19 2013 +0400
++++ openjdk/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java	Thu Jul 11 13:13:41 2013 -0400
+@@ -160,7 +160,7 @@ public class JCEMapper {
+         );
+         algorithmsMap.put(
+             XMLCipher.RSA_OAEP,
+-            new Algorithm("RSA", "RSA/ECB/OAEPPadding", "KeyTransport")
++            new Algorithm("RSA", "RSA/ECB/OAEPWithSHA1AndMGF1Padding", "KeyTransport")
+         );
+         algorithmsMap.put(
+             XMLCipher.DIFFIE_HELLMAN,
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ openjdk/jdk/test/com/sun/org/apache/xml/internal/security/encryption/XMLCipher/GetInstance.java	Thu Jul 11 13:13:41 2013 -0400
+@@ -0,0 +1,44 @@
++/*
++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++/*
++ * @test
++ * @bug 8017173
++ * @summary Check that an XMLCipher with RSA_OAEP Key Transport algorithm can
++ *    be instantiated
++ * @compile -XDignore.symbol.file GetInstance.java
++ * @run main GetInstance
++ */
++import com.sun.org.apache.xml.internal.security.Init;
++import com.sun.org.apache.xml.internal.security.encryption.XMLCipher;
++
++public class GetInstance {
++
++    private static final String RSA_OAEP =
++        "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p";;
++
++    public static void main(String[] args) throws Exception {
++        Init.init();
++        XMLCipher.getInstance(RSA_OAEP);
++    }
++}
+
only in patch2:
unchanged:
--- openjdk-6-6b30-1.13.1.orig/debian/patches/autotools-aarch64.diff
+++ openjdk-6-6b30-1.13.1/debian/patches/autotools-aarch64.diff
@@ -0,0 +1,330 @@
+--- openjdk-6-6b30-1.13.1.orig/acinclude.m4
++++ openjdk-6-6b30-1.13.1/acinclude.m4
+@@ -22,6 +22,12 @@
+       JRE_ARCH_DIR=alpha
+       CROSS_TARGET_ARCH=alpha
+       ;;
++    arm64|aarch64)
++      BUILD_ARCH_DIR=aarch64
++      INSTALL_ARCH_DIR=aarch64
++      JRE_ARCH_DIR=aarch64
++      ARCHFLAG="-D_LITTLE_ENDIAN"
++      ;;
+     arm*)
+       BUILD_ARCH_DIR=arm
+       INSTALL_ARCH_DIR=arm
+@@ -1553,7 +1559,7 @@
+   AC_MSG_RESULT(${ENABLE_SYSTEM_LCMS})
+   if test x"${ENABLE_SYSTEM_LCMS}" = "xyes"; then
+     dnl Check for LCMS2 headers and libraries.
+-    PKG_CHECK_MODULES(LCMS2, lcms2 >= 2.5,[LCMS2_FOUND=yes],[LCMS2_FOUND=no])
++    PKG_CHECK_MODULES(LCMS2, lcms2,[LCMS2_FOUND=yes],[LCMS2_FOUND=no])
+     if test "x${LCMS2_FOUND}" = xno
+     then
+       AC_MSG_ERROR([Could not find LCMS >= 2.5; install it or build with --disable-system-lcms to use the in-tree copy.])
+--- openjdk-6-6b30-1.13.1.orig/configure
++++ openjdk-6-6b30-1.13.1/configure
+@@ -7216,6 +7216,12 @@
+       JRE_ARCH_DIR=alpha
+       CROSS_TARGET_ARCH=alpha
+       ;;
++    arm64|aarch64)
++      BUILD_ARCH_DIR=aarch64
++      INSTALL_ARCH_DIR=aarch64
++      JRE_ARCH_DIR=aarch64
++      ARCHFLAG="-D_LITTLE_ENDIAN"
++      ;;
+     arm*)
+       BUILD_ARCH_DIR=arm
+       INSTALL_ARCH_DIR=arm
+@@ -9478,7 +9484,7 @@
+   mkdir tmp.$$
+   cd tmp.$$
+   cat << \EOF > $CLASS
+-/* [#]line 9481 "configure" */
++/* [#]line 9487 "configure" */
+ 
+ public class Test
+ {
+@@ -9520,7 +9526,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 9523 "configure" */
++/* [#]line 9529 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -9587,7 +9593,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 9590 "configure" */
++/* [#]line 9596 "configure" */
+ public class Test
+ {
+   public static void main(String[] args)
+@@ -9635,7 +9641,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 9638 "configure" */
++/* [#]line 9644 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -9702,7 +9708,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 9705 "configure" */
++/* [#]line 9711 "configure" */
+ import java.lang.reflect.Constructor;
+ 
+ public class Test
+@@ -9771,7 +9777,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 9774 "configure" */
++/* [#]line 9780 "configure" */
+ import java.lang.reflect.Constructor;
+ 
+ public class Test
+@@ -9841,7 +9847,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 9844 "configure" */
++/* [#]line 9850 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -9907,7 +9913,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 9910 "configure" */
++/* [#]line 9916 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -9973,7 +9979,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 9976 "configure" */
++/* [#]line 9982 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -10039,7 +10045,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10042 "configure" */
++/* [#]line 10048 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -10105,7 +10111,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10108 "configure" */
++/* [#]line 10114 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -10171,7 +10177,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10174 "configure" */
++/* [#]line 10180 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -10238,7 +10244,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10241 "configure" */
++/* [#]line 10247 "configure" */
+ import java.lang.reflect.Field;
+ 
+ public class Test
+@@ -10300,7 +10306,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10303 "configure" */
++/* [#]line 10309 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -10366,7 +10372,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10369 "configure" */
++/* [#]line 10375 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -10434,7 +10440,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10437 "configure" */
++/* [#]line 10443 "configure" */
+ import java.lang.reflect.Constructor;
+ 
+ public class Test
+@@ -10504,7 +10510,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10507 "configure" */
++/* [#]line 10513 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -10571,7 +10577,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10574 "configure" */
++/* [#]line 10580 "configure" */
+ import java.lang.reflect.Method;
+ 
+ public class Test
+@@ -10638,7 +10644,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10641 "configure" */
++/* [#]line 10647 "configure" */
+ import java.lang.reflect.Constructor;
+ 
+ public class Test
+@@ -10707,7 +10713,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10710 "configure" */
++/* [#]line 10716 "configure" */
+ import java.lang.reflect.Constructor;
+ 
+ public class Test
+@@ -10776,7 +10782,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10779 "configure" */
++/* [#]line 10785 "configure" */
+ import java.lang.reflect.Constructor;
+ 
+ public class Test
+@@ -10845,7 +10851,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $CLASS
+-/* [#]line 10848 "configure" */
++/* [#]line 10854 "configure" */
+ import java.lang.reflect.Constructor;
+ 
+ public class Test
+@@ -11164,6 +11170,12 @@
+       JRE_ARCH_DIR=alpha
+       CROSS_TARGET_ARCH=alpha
+       ;;
++    arm64|aarch64)
++      BUILD_ARCH_DIR=aarch64
++      INSTALL_ARCH_DIR=aarch64
++      JRE_ARCH_DIR=aarch64
++      ARCHFLAG="-D_LITTLE_ENDIAN"
++      ;;
+     arm*)
+       BUILD_ARCH_DIR=arm
+       INSTALL_ARCH_DIR=arm
+@@ -12062,7 +12074,7 @@
+   mkdir tmp.$$
+   cd tmp.$$
+   cat << \EOF > $CLASS
+-/* [#]line 12065 "configure" */
++/* [#]line 12077 "configure" */
+ 
+ public class Test
+ {
+@@ -12685,7 +12697,7 @@
+   mkdir tmp.$$
+   cd tmp.$$
+   cat << \EOF > $CLASS
+-/* [#]line 12688 "configure" */
++/* [#]line 12700 "configure" */
+ import javax.xml.namespace.QName;
+ import javax.xml.stream.Location;
+ import javax.xml.stream.events.Attribute;
+@@ -12775,7 +12787,7 @@
+ mkdir tmp.$$
+ cd tmp.$$
+ cat << \EOF > $SUPERCLASS
+-/* #line 12778 "configure" */
++/* #line 12790 "configure" */
+ public class Test
+ {
+   public static final int POTATO = 0;
+@@ -12783,7 +12795,7 @@
+ }
+ EOF
+ cat << \EOF > $SUBCLASS
+-/* #line 12786 "configure" */
++/* #line 12798 "configure" */
+ public class TestImpl
+   extends Test
+ {
+@@ -13506,12 +13518,12 @@
+     pkg_cv_LCMS2_CFLAGS="$LCMS2_CFLAGS"
+  elif test -n "$PKG_CONFIG"; then
+     if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2 >= 2.5\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "lcms2 >= 2.5") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_LCMS2_CFLAGS=`$PKG_CONFIG --cflags "lcms2 >= 2.5" 2>/dev/null`
++  pkg_cv_LCMS2_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
+ 		      test "x$?" != "x0" && pkg_failed=yes
+ else
+   pkg_failed=yes
+@@ -13523,12 +13535,12 @@
+     pkg_cv_LCMS2_LIBS="$LCMS2_LIBS"
+  elif test -n "$PKG_CONFIG"; then
+     if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2 >= 2.5\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "lcms2 >= 2.5") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_LCMS2_LIBS=`$PKG_CONFIG --libs "lcms2 >= 2.5" 2>/dev/null`
++  pkg_cv_LCMS2_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
+ 		      test "x$?" != "x0" && pkg_failed=yes
+ else
+   pkg_failed=yes
+@@ -13549,9 +13561,9 @@
+         _pkg_short_errors_supported=no
+ fi
+         if test $_pkg_short_errors_supported = yes; then
+-	        LCMS2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms2 >= 2.5" 2>&1`
++	        LCMS2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms2" 2>&1`
+         else
+-	        LCMS2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms2 >= 2.5" 2>&1`
++	        LCMS2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms2" 2>&1`
+         fi
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$LCMS2_PKG_ERRORS" >&5

Reply via email to