# HG changeset patch # User Andrew John Hughes # Date 1366396146 -3600 # Node ID dbf0c9f001795d740ca0d8222a2df9c7092f8b94 # Parent 93abd0de7dcc2681c0c1f0c7c6591bbba9ace04a PR1404: Failure to bootstrap with ecj 4.2 2013-04-18 Andrew John Hughes PR1404: Failure to bootstrap with ecj 4.2 * Makefile.am: (ICEDTEA_BOOTSTRAP_CLASSES): Add SSLContext, SSLEngine and SslRMIServerSocketFactory if methods are missing. (IT_LANGUAGE_SOURCE_VERSION): Set to 7 if supported. (IT_CLASS_TARGET_VERSION): Likewise. * configure.ac: Mention bugs in comments. Add tests for getDefaultSSLParameters/setSSLParameters and new 7 SslRMIServerSocketFactory. * NEWS: Updated. diff -r 93abd0de7dcc -r dbf0c9f00179 ChangeLog --- a/ChangeLog Thu Apr 18 19:44:22 2013 +0100 +++ b/ChangeLog Fri Apr 19 19:29:06 2013 +0100 @@ -1,3 +1,30 @@ +2013-04-18 Andrew John Hughes + + PR1404: Failure to bootstrap with ecj 4.2 + * Makefile.am: + (ICEDTEA_BOOTSTRAP_CLASSES): Add SSLContext, + SSLEngine and SslRMIServerSocketFactory if + methods are missing. + (IT_LANGUAGE_SOURCE_VERSION): Set to 7 if supported. + (IT_CLASS_TARGET_VERSION): Likewise. + * configure.ac: Mention bugs in comments. + Add tests for getDefaultSSLParameters/setSSLParameters + and new 7 SslRMIServerSocketFactory. + * NEWS: Updated. + +2013-01-11 Andrew John Hughes + + * acinclude.m4: + (IT_CHECK_FOR_CLASS): Write class toString() output + to System.err rather than throwing it away. It then + appears in config.log and may be useful in debugging. + (IT_CHECK_FOR_METHOD): Fix documentation and add + System.err output as for IT_CHECK_FOR_CLASS. + (IT_CHECK_FOR_CONSTRUCTOR): New macro to test for + the presence of a specific constructor. Works + with both private & protected constructors by + using a subclass for the compile test. + 2013-04-18 Andrew John Hughes * hotspot.map: Update zero to bring in security diff -r 93abd0de7dcc -r dbf0c9f00179 Makefile.am --- a/Makefile.am Thu Apr 18 19:44:22 2013 +0100 +++ b/Makefile.am Fri Apr 19 19:29:06 2013 +0100 @@ -99,7 +99,7 @@ SOURCEPATH_DIRS = $(abs_top_srcdir)/generated:$(OPENJDK_SOURCEPATH_DIRS) # Sources used from OpenJDK. -ICEDTEA_BOOTSTRAP_CLASSES = +ICEDTEA_BOOTSTRAP_CLASSES = #PR43148 - javac fails due to missing java.util.regex.Matcher.quoteReplacement if LACKS_JAVA_UTIL_REGEX_MATCHER_QUOTEREPLACEMENT @@ -125,10 +125,32 @@ $(SHARE)/javax/swing/plaf/basic/BasicDirectoryModel.java endif +#PR56553 - SSLParameters support missing +if LACKS_JAVAX_NET_SSL_SSLCONTEXT_GETDEFAULTSSLPARAMETERS +ICEDTEA_BOOTSTRAP_CLASSES += \ + $(SHARE)/javax/net/ssl/SSLContext.java +endif +if LACKS_JAVAX_NET_SSL_SSLENGINE_SETSSLPARAMETERS +ICEDTEA_BOOTSTRAP_CLASSES += \ + $(SHARE)/javax/net/ssl/SSLEngine.java +endif + +#PR57008 - Add missing SslRMIServerSocketFactory constructor from 7 +if LACKS_JAVAX_RMI_SSL_SSLRMISERVERSOCKETFACTORY_7 +ICEDTEA_BOOTSTRAP_CLASSES += \ + $(SHARE)/javax/rmi/ssl/SslRMIServerSocketFactory.java +endif + # Settings for javac +if NO_BYTECODE7 IT_LANGUAGE_SOURCE_VERSION=6 IT_CLASS_TARGET_VERSION=6 +else +IT_LANGUAGE_SOURCE_VERSION=7 +IT_CLASS_TARGET_VERSION=7 +endif + IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE) IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) diff -r 93abd0de7dcc -r dbf0c9f00179 NEWS --- a/NEWS Thu Apr 18 19:44:22 2013 +0100 +++ b/NEWS Fri Apr 19 19:29:06 2013 +0100 @@ -54,6 +54,7 @@ - Fix offset problem in ICU LETableReference. - Change -Werror fix to preserve OpenJDK default. - PR1303: Correct #ifdef to #if + - PR1404: Failure to bootstrap with ecj 4.2 New in release 2.3.8 (2013-03-11): diff -r 93abd0de7dcc -r dbf0c9f00179 acinclude.m4 --- a/acinclude.m4 Thu Apr 18 19:44:22 2013 +0100 +++ b/acinclude.m4 Fri Apr 19 19:29:06 2013 +0100 @@ -1508,7 +1508,7 @@ { public static void main(String[] args) { - $2.class.toString(); + System.err.println("Class found: " + $2.class); } } ] @@ -2300,11 +2300,12 @@ ]) dnl Generic macro to check for a Java method -dnl Takes four arguments: the name of the macro, -dnl the name of the class, the method signature -dnl and an example call to the method. The macro name -dnl is usually the name of the class with '.' -dnl replaced by '_' and all letters capitalised. +dnl Takes five arguments: the name of the macro, +dnl the name of the method, the name of the class, +dnl the method signature and an example call to the +dnl method. The macro name is usually the name of +dnl the class with '.' replaced by '_' and all letters +dnl capitalised. dnl e.g. IT_CHECK_FOR_METHOD([JAVA_UTIL_REGEX_MATCHER_QUOTEREPLACEMENT],[java.util.regex.Matcher.quoteReplacement],[java.util.regex.Matcher],["quoteReplacement",String.class],java.util.regex.Matcher.quoteReplacement("Blah")) AC_DEFUN([IT_CHECK_FOR_METHOD],[ AC_REQUIRE([IT_CHECK_JAVA_AND_JAVAC_WORK]) @@ -2325,6 +2326,7 @@ try { Method m = cl.getDeclaredMethod($4); + System.err.println("Method found: " + m); } catch (NoSuchMethodException e) { @@ -2400,3 +2402,66 @@ AC_MSG_RESULT([$enable_jar_compression]) AM_CONDITIONAL([ENABLE_JAR_COMPRESSION], test x"${enable_jar_compression}" = "xyes") ]) + +dnl Generic macro to check for a Java constructor +dnl Takes four arguments: the name of the macro, +dnl the name of the class, the method signature +dnl and an example call to the method. The macro name +dnl is usually the name of the class with '.' +dnl replaced by '_' and all letters capitalised. +dnl e.g. IT_CHECK_FOR_CONSTRUCTOR([JAVAX_MANAGEMENT_STANDARDMBEAN_MXBEAN_TWO_ARG],[javax.management.StandardMBean],[Class.class,Boolean.TYPE],[Object.class, true]) +AC_DEFUN([IT_CHECK_FOR_CONSTRUCTOR],[ +AC_REQUIRE([IT_CHECK_JAVA_AND_JAVAC_WORK]) +AC_CACHE_CHECK([if $2($3) is missing], it_cv_$1, [ +CLASS=Test.java +BYTECODE=$(echo $CLASS|sed 's#\.java##') +mkdir tmp.$$ +cd tmp.$$ +cat << \EOF > $CLASS +[/* [#]line __oline__ "configure" */ +import java.lang.reflect.Constructor; + +public class Test +{ + public static void main(String[] args) + { + Class cl = $2.class; + try + { + Constructor cons = cl.getDeclaredConstructor($3); + System.err.println("Constructor found: " + cons); + } + catch (NoSuchMethodException e) + { + System.exit(-1); + } + } + + private class TestCons extends $2 + { + TestCons() + { + super($4); + } + } + +} + +] +EOF +if $JAVAC -cp . $JAVACFLAGS -source 5 -target 5 -nowarn $CLASS >&AS_MESSAGE_LOG_FD 2>&1; then + if $JAVA -classpath . $BYTECODE >&AS_MESSAGE_LOG_FD 2>&1; then + it_cv_$1=no; + else + it_cv_$1=yes; + fi +else + it_cv_$1=yes; +fi +]) +rm -f $CLASS *.class +cd .. +rmdir tmp.$$ +AM_CONDITIONAL([LACKS_$1], test x"${it_cv_$1}" = "xyes") +AC_PROVIDE([$0])dnl +]) diff -r 93abd0de7dcc -r dbf0c9f00179 configure.ac --- a/configure.ac Thu Apr 18 19:44:22 2013 +0100 +++ b/configure.ac Fri Apr 19 19:29:06 2013 +0100 @@ -117,20 +117,45 @@ IT_PR40630_CHECK IT_CHECK_FOR_CLASS([JAVAX_ANNOTATION_RESOURCE], [javax.annotation.Resource]) IT_GETDTDTYPE_CHECK +dnl PR48033 - Missing javax.management.remote.JMXServiceURL IT_CHECK_FOR_CLASS([JAVAX_MANAGEMENT_REMOTE_JMXSERVICEURL], [javax.management.remote.JMXServiceURL]) +dnl PR48034 - javax.management.modelmbean.ModelMBeanInfo IT_CHECK_FOR_CLASS([JAVAX_MANAGEMENT_MODELMBEAN_MODELMBEANINFO], [javax.management.modelmbean.ModelMBeanInfo]) +dnl PR43148 - javac fails due to missing java.util.regex.Matcher.quoteReplacement IT_CHECK_FOR_METHOD([JAVA_UTIL_REGEX_MATCHER_QUOTEREPLACEMENT], [java.util.regex.Matcher.quoteReplacement], [java.util.regex.Matcher], ["quoteReplacement",String.class], [java.util.regex.Matcher.quoteReplacement("Blah")] ) +dnl PR42003 - Missing javax.swing.plaf.basic.BasicDirectoryModel methods cause OpenJDK build failure IT_CHECK_FOR_METHOD([JAVAX_SWING_PLAF_BASIC_BASICDIRECTORYMODEL_ADDPROPERTYCHANGELISTENER], [javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener], [javax.swing.plaf.basic.BasicDirectoryModel], ["addPropertyChangeListener",java.beans.PropertyChangeListener.class], [javax.swing.plaf.basic.BasicDirectoryModel model = new javax.swing.plaf.basic.BasicDirectoryModel(new javax.swing.JFileChooser()); model.addPropertyChangeListener(model)] ) +dnl PR56553 - SSLParameters support missing +IT_CHECK_FOR_METHOD([JAVAX_NET_SSL_SSLCONTEXT_GETDEFAULTSSLPARAMETERS], + [javax.net.ssl.SSLContext.getDefaultSSLParameters], + [javax.net.ssl.SSLContext], + ["getDefaultSSLParameters"], + [try { javax.net.ssl.SSLContext.getDefault().getDefaultSSLParameters(); } catch (Exception e) {}] +) +IT_CHECK_FOR_METHOD([JAVAX_NET_SSL_SSLENGINE_SETSSLPARAMETERS], + [javax.net.ssl.SSLEngine.setSSLParameters], + [javax.net.ssl.SSLEngine], + ["setSSLParameters", javax.net.ssl.SSLParameters.class], + [try { javax.net.ssl.SSLContext.getDefault().createSSLEngine().setSSLParameters(new javax.net.ssl.SSLParameters()); } + catch (Exception e) {}] +) +dnl PR57008 - Add missing SslRMIServerSocketFactory constructor from 7 +IT_CHECK_FOR_CONSTRUCTOR([JAVAX_RMI_SSL_SSLRMISERVERSOCKETFACTORY_7], + [javax.rmi.ssl.SslRMIServerSocketFactory], + [javax.net.ssl.SSLContext.class,String@<:@@:>@.class,String@<:@@:>@.class,Boolean.TYPE], + [null,null,null,true] +) + IT_CHECK_ENABLE_WARNINGS IT_DIAMOND_CHECK IT_BYTECODE7_CHECK