changeset 1083:e0a10e6be00a icedtea-3.0.0pre01

PR1778: Allow an alternate JAR program to be used
author andrew
date Mon, 19 May 2014 19:35:59 +0100
parents 1a8e3abf163d
children 8c859195a868
files common/autoconf/boot-jdk.m4 common/autoconf/generated-configure.sh common/autoconf/spec.gmk.in
diffstat 3 files changed, 55 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/boot-jdk.m4	Wed May 14 22:18:54 2014 +0100
+++ b/common/autoconf/boot-jdk.m4	Mon May 19 19:35:59 2014 +0100
@@ -1,5 +1,6 @@
 #
 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2014 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -283,6 +284,25 @@
   BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic)
   BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii)
 
+  # Allow JAR command to be overridden
+  # Doing so allows a faster native jar program to be used
+  # when building Zero
+  AC_MSG_CHECKING([for an alternate jar command])
+  AC_ARG_WITH([alt-jar],
+              [AS_HELP_STRING(--with-alt-jar=PATH, specify the location of an alternate jar binary to use for building)],
+  [
+    if test "x${withval}" != xyes -a "x${withval}" != xno; then
+      ALT_JAR_CMD=${withval}
+    else
+      ALT_JAR_CMD="false"
+    fi
+  ],
+  [ 
+    ALT_JAR_CMD="false"
+  ])
+  AC_MSG_RESULT(${ALT_JAR_CMD})
+  AC_SUBST(ALT_JAR_CMD)
+
   # Finally, set some other options...
 
   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
--- a/common/autoconf/generated-configure.sh	Wed May 14 22:18:54 2014 +0100
+++ b/common/autoconf/generated-configure.sh	Mon May 19 19:35:59 2014 +0100
@@ -795,6 +795,7 @@
 BOOT_JDK_JVMARGS
 JAVAC_FLAGS
 BOOT_JDK_SOURCETARGET
+ALT_JAR_CMD
 BOOT_JDK
 BOOT_TOOLSJAR
 BOOT_RTJAR
@@ -1031,6 +1032,7 @@
 with_user_release_suffix
 with_build_number
 with_boot_jdk
+with_alt_jar
 with_boot_jdk_jvmargs
 with_add_source_root
 with_override_source_root
@@ -1787,6 +1789,8 @@
                           number isn't set.[username_builddateb00]
   --with-build-number     Set build number value for build [b00]
   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
+  --with-alt-jar=PATH     specify the location of an alternate jar binary to
+                          use for building
   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
                           invocations of the Boot JDK, overriding the default
                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
@@ -3338,6 +3342,7 @@
 # ... then the rest
 #
 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2014 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -3888,7 +3893,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1398275973
+DATE_WHEN_GENERATED=1400524439
 
 ###############################################################################
 #
@@ -16073,6 +16078,31 @@
 $as_echo "ok" >&6; }
 
 
+  # Allow JAR command to be overridden
+  # Doing so allows a faster native jar program to be used
+  # when building Zero
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an alternate jar command" >&5
+$as_echo_n "checking for an alternate jar command... " >&6; }
+
+# Check whether --with-alt-jar was given.
+if test "${with_alt_jar+set}" = set; then :
+  withval=$with_alt_jar;
+    if test "x${withval}" != xyes -a "x${withval}" != xno; then
+      ALT_JAR_CMD=${withval}
+    else
+      ALT_JAR_CMD="false"
+    fi
+
+else
+
+    ALT_JAR_CMD="false"
+
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ALT_JAR_CMD}" >&5
+$as_echo "${ALT_JAR_CMD}" >&6; }
+
+
   # Finally, set some other options...
 
   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
--- a/common/autoconf/spec.gmk.in	Wed May 14 22:18:54 2014 +0100
+++ b/common/autoconf/spec.gmk.in	Mon May 19 19:35:59 2014 +0100
@@ -447,7 +447,11 @@
 
 JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah
 
+ifeq (@ALT_JAR_CMD@,false)
 JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
+else
+JAR=@FIXPATH@ @ALT_JAR_CMD@
+endif
 
 RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic