Hi Matthew,

This code has in fact already been changed:

changeset:   895:067355edfbf8
user:        vinnie
date:        Wed Oct 30 17:31:01 2013 +0000
summary: 8027567: JDK 8 build failure: the correct version of GNU make is being rejected

diff -r d832f6171acd -r 067355edfbf8 common/autoconf/basics.m4
--- a/common/autoconf/basics.m4
+++ b/common/autoconf/basics.m4
@@ -514,7 +514,7 @@
     if test "x$IS_GNU_MAKE" = x; then
AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.])
     else
- IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[[12]]\)\|\(4\.\)'` + IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[[12]]' -e '4\.'`
       if test "x$IS_MODERN_MAKE" = x; then
AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_
STRING). Ignoring.])
       else

The change was pushed via the tl forest.

Thanks,
David

On 1/11/2013 1:03 PM, Matthew Dempsky wrote:
[I tried sending this yesterday, but it got stuck in the moderation queue;
I've cancelled that attempt and subscribed to build-dev, so I'm posting it
again.]

According to POSIX Issue
7<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html>,
only Extended Regular Expressions (EREs) support pattern alternation; Basic
Regular Expressions (BREs) do not.  GNU grep (and apparently grep on
Solaris and OS X) support \| for alternation in BREs, but grep on OpenBSD
does not.  This causes the GNU make version check in configure to
incorrectly fail on OpenBSD.

The easy fix is to use the standardized -E
option<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html>
to
have grep use EREs instead of BREs.  This works with GNU and OpenBSD grep,
and according to online manuals should work with Solaris and OS X grep too.

I've never submitted a patch to OpenJDK before, so I've included it inline
for simplicity (sorry that gmail mangled it).  If you'd prefer I post it
another way, I'm happy to do so.

Patch is against JDK8 (
http://hg.openjdk.java.net/jdk8/jdk8/file/a36df87b3901/common/autoconf/basics.m4
).

diff -r a36df87b3901 common/autoconf/basics.m4
--- a/common/autoconf/basics.m4 Thu Oct 24 09:10:01 2013 -0700
+++ b/common/autoconf/basics.m4 Mon Oct 28 15:53:55 2013 -0700
@@ -514,7 +514,7 @@
      if test "x$IS_GNU_MAKE" = x; then
        AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however,
this is not GNU Make. Ignoring.])
      else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP
'\(3\.8[[12]]\)\|\(4\.\)'`
+      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -E
'(3\.8[[12]])|(4\.)'`
        if test "x$IS_MODERN_MAKE" = x; then
          AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is
not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
        else

Reply via email to