changeset in /hg/icedtea: 2008-03-04 Gary Benson <gbenson at redh...

Gary Benson gbenson at redhat.com
Thu May 29 14:12:11 PDT 2008


changeset 81cb6e4a9fcf in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=81cb6e4a9fcf
description:
	2008-03-04  Gary Benson  <gbenson at redhat.com>

		* patches/icedtea-hotspot-6b06-7b24.patch: New file.
		* patches/icedtea-hotspot7-build-fixes.patch: Likewise.
		* patches/icedtea-bytecodeInterpreter.patch: Likewise.
		* patches/icedtea-bytecodeInterpreterWithChecks.patch: Likewise.
		* Makefile.am: Apply the above patches when zero is being built.
		* Makefile.in: Regenerated.

		* patches/icedtea-linker-options.patch: Reinstate missing hunks.
		* patches/icedtea-ports.patch: Likewise.
		* patches/icedtea-zero.patch: Likewise.

diffstat:

9 files changed, 201498 insertions(+), 87 deletions(-)
ChangeLog                                           |   13 
Makefile.am                                         |   13 
patches/icedtea-bytecodeInterpreter.patch           |   36 
patches/icedtea-bytecodeInterpreterWithChecks.patch |   18 
patches/icedtea-hotspot-6b06-7b24.patch             |201186 +++++++++++++++++++
patches/icedtea-hotspot7-build-fixes.patch          |   64 
patches/icedtea-linker-options.patch                |   12 
patches/icedtea-ports.patch                         |  206 
patches/icedtea-zero.patch                          |   37 

diffs (truncated from 201671 to 500 lines):

diff -r 4210155c180e -r 81cb6e4a9fcf ChangeLog
--- a/ChangeLog	Tue Mar 04 00:06:10 2008 -0500
+++ b/ChangeLog	Tue Mar 04 07:02:39 2008 -0500
@@ -1,3 +1,16 @@ 2008-03-04  Lillian Angel  <langel at redha
+2008-03-04  Gary Benson  <gbenson at redhat.com>
+
+	* patches/icedtea-hotspot-6b06-7b24.patch: New file.
+	* patches/icedtea-hotspot7-build-fixes.patch: Likewise.
+	* patches/icedtea-bytecodeInterpreter.patch: Likewise.
+	* patches/icedtea-bytecodeInterpreterWithChecks.patch: Likewise.
+	* Makefile.am: Apply the above patches when zero is being built.
+	* Makefile.in: Regenerated.
+
+	* patches/icedtea-linker-options.patch: Reinstate missing hunks.
+	* patches/icedtea-ports.patch: Likewise.
+	* patches/icedtea-zero.patch: Likewise.
+
 2008-03-04  Lillian Angel  <langel at redhat.com>
 
 	* generated/*: Updated generated files.
diff -r 4210155c180e -r 81cb6e4a9fcf Makefile.am
--- a/Makefile.am	Tue Mar 04 00:06:10 2008 -0500
+++ b/Makefile.am	Tue Mar 04 07:02:39 2008 -0500
@@ -204,7 +204,20 @@ else
   GCC_PATCH = patches/icedtea-gcc-4.3.patch
 endif
 
+# If CORE_BUILD is set then we are building zero and need
+# to patch up to OpenJDK 7 HotSpot for the C++ interpreter.
+if CORE_BUILD
+  HOTSPOT_7_PATCHES = \
+	patches/icedtea-hotspot-6b06-7b24.patch \
+	patches/icedtea-hotspot7-build-fixes.patch \
+	patches/icedtea-bytecodeInterpreter.patch \
+	patches/icedtea-bytecodeInterpreterWithChecks.patch
+else
+  HOTSPOT_7_PATCHES = 
+endif
+
 ICEDTEA_PATCHES = \
+	$(HOTSPOT_7_PATCHES) \
 	patches/icedtea-copy-plugs.patch \
 	patches/icedtea-version.patch \
 	patches/icedtea-text-relocations.patch \
diff -r 4210155c180e -r 81cb6e4a9fcf patches/icedtea-bytecodeInterpreter.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-bytecodeInterpreter.patch	Tue Mar 04 07:02:39 2008 -0500
@@ -0,0 +1,36 @@
+diff -r b3238230c1ef openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp
+--- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	Fri Nov 02 10:14:32 2007 +0000
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	Fri Nov 02 10:15:45 2007 +0000
+@@ -60,7 +60,6 @@
+ };
+ 
+ class BytecodeInterpreter : StackObj {
+-friend class SharedRuntime;
+ friend class AbstractInterpreterGenerator;
+ friend class CppInterpreterGenerator;
+ friend class InterpreterGenerator;
+diff -r bae119bcbcd0 openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
+--- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	Fri Nov 02 15:08:47 2007 +0000
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	Fri Nov 02 15:21:08 2007 +0000
+@@ -518,16 +518,16 @@
+ 
+ /* 0xC0 */ &&opc_checkcast,   &&opc_instanceof,     &&opc_monitorenter, &&opc_monitorexit,
+ /* 0xC4 */ &&opc_wide,        &&opc_multianewarray, &&opc_ifnull,       &&opc_ifnonnull,
+-/* 0xC8 */ &&opc_goto_w,      &&opc_jsr_w,          &&opc_breakpoint,   &&opc_fast_igetfield,
+-/* 0xCC */ &&opc_fastagetfield,&&opc_fast_aload_0,  &&opc_fast_iaccess_0, &&opc__fast_aaccess_0,
+-
+-/* 0xD0 */ &&opc_fast_linearswitch, &&opc_fast_binaryswitch, &&opc_return_register_finalizer,      &&opc_default,
++/* 0xC8 */ &&opc_goto_w,      &&opc_jsr_w,          &&opc_breakpoint,   &&opc_default,
++/* 0xCC */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
++
++/* 0xD0 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
+ /* 0xD4 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
+ /* 0xD8 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
+ /* 0xDC */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
+ 
+ /* 0xE0 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
+-/* 0xE4 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
++/* 0xE4 */ &&opc_default,     &&opc_return_register_finalizer, &&opc_default, &&opc_default,
+ /* 0xE8 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
+ /* 0xEC */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
+ 
diff -r 4210155c180e -r 81cb6e4a9fcf patches/icedtea-bytecodeInterpreterWithChecks.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-bytecodeInterpreterWithChecks.patch	Tue Mar 04 07:02:39 2008 -0500
@@ -0,0 +1,18 @@
+--- openjdk.old/hotspot/src/share/vm/interpreter/bytecodeInterpreterWithChecks.xsl      2007-10-12 03:46:08.000000000 -0400
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreterWithChecks.xsl      2007-10-29 11:57:33.000000000 -0400
+@@ -6,6 +6,7 @@
+
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
++<xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
+ <xsl:template match="processcode">
+ <xsl:text>
+ #define VM_JVMTI
+@@ -15,7 +16,6 @@
+
+ </xsl:text>
+
+-<xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
+ </xsl:template>
+
+ </xsl:stylesheet>
diff -r 4210155c180e -r 81cb6e4a9fcf patches/icedtea-hotspot-6b06-7b24.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-hotspot-6b06-7b24.patch	Tue Mar 04 07:02:39 2008 -0500
@@ -0,0 +1,201186 @@
+diff -ruN openjdk{6,}/hotspot/src/share
+diff -ruN openjdk{6,}/hotspot/src/os/linux 
+
+diff -ruN openjdk6/hotspot/src/share/tools/MakeDeps/ArgsParser.java openjdk/hotspot/src/share/tools/MakeDeps/ArgsParser.java
+--- openjdk6/hotspot/src/share/tools/MakeDeps/ArgsParser.java	2008-02-28 05:02:31.000000000 -0500
++++ openjdk/hotspot/src/share/tools/MakeDeps/ArgsParser.java	2008-01-31 09:19:00.000000000 -0500
+@@ -19,67 +19,67 @@
+  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+  * CA 95054 USA or visit www.sun.com if you need additional information or
+  * have any questions.
+- *  
++ *
+  */
+ 
+ class ArgIterator {
+     String[] args;
+     int i;
+     ArgIterator(String[] args) {
+-	this.args = args;
+-	this.i = 0;
++        this.args = args;
++        this.i = 0;
+     }
+-    String get() { return args[i]; }	
++    String get() { return args[i]; }
+     boolean hasMore() { return args != null && i  < args.length; }
+-    boolean next() { return ++i < args.length; }   
++    boolean next() { return ++i < args.length; }
+ }
+ 
+-abstract class ArgHandler {	
++abstract class ArgHandler {
+     public abstract void handle(ArgIterator it);
+-    
++
+ }
+ 
+ class ArgRule {
+     String arg;
+     ArgHandler handler;
+     ArgRule(String arg, ArgHandler handler) {
+-	this.arg = arg;
+-	this.handler = handler;
++        this.arg = arg;
++        this.handler = handler;
+     }
+ 
+     boolean process(ArgIterator it) {
+-	if (match(it.get(), arg)) {
+-	    handler.handle(it);
+-	    return true;
+-	}
+-	return false;
++        if (match(it.get(), arg)) {
++            handler.handle(it);
++            return true;
++        }
++        return false;
+     }
+     boolean match(String rule_pattern, String arg) {
+-	return arg.equals(rule_pattern);
++        return arg.equals(rule_pattern);
+     }
+ }
+ 
+ class ArgsParser {
+-    ArgsParser(String[] args, 
+-	       ArgRule[] rules, 
+-	       ArgHandler defaulter) {
+-	ArgIterator ai = new ArgIterator(args);
+-	while (ai.hasMore()) {
+-	    boolean processed = false;
+-	    for (int i=0; i<rules.length; i++) {
+-		processed |= rules[i].process(ai);
+-		if (processed) {
+-		    break;
+-		}
+-	    }
+-	    if (!processed) {
+-		if (defaulter != null) {
+-		    defaulter.handle(ai);
+-		} else {
+-		    System.err.println("ERROR: unparsed \""+ai.get()+"\"");
+-		    ai.next();
+-		}
+-	    }
+-	}
++    ArgsParser(String[] args,
++               ArgRule[] rules,
++               ArgHandler defaulter) {
++        ArgIterator ai = new ArgIterator(args);
++        while (ai.hasMore()) {
++            boolean processed = false;
++            for (int i=0; i<rules.length; i++) {
++                processed |= rules[i].process(ai);
++                if (processed) {
++                    break;
++                }
++            }
++            if (!processed) {
++                if (defaulter != null) {
++                    defaulter.handle(ai);
++                } else {
++                    System.err.println("ERROR: unparsed \""+ai.get()+"\"");
++                    ai.next();
++                }
++            }
++        }
+     }
+ }
+diff -ruN openjdk6/hotspot/src/share/tools/MakeDeps/BuildConfig.java openjdk/hotspot/src/share/tools/MakeDeps/BuildConfig.java
+--- openjdk6/hotspot/src/share/tools/MakeDeps/BuildConfig.java	2008-02-28 05:02:31.000000000 -0500
++++ openjdk/hotspot/src/share/tools/MakeDeps/BuildConfig.java	2008-01-31 09:19:00.000000000 -0500
+@@ -19,7 +19,7 @@
+  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+  * CA 95054 USA or visit www.sun.com if you need additional information or
+  * have any questions.
+- *  
++ *
+  */
+ 
+ import java.util.*;
+@@ -32,343 +32,343 @@
+ 
+     static CompilerInterface ci;
+     static CompilerInterface getCI() {
+-	if (ci == null) {
+-	    String comp = (String)getField(null, "CompilerVersion");
+-	    try {
+-		ci = (CompilerInterface)Class.forName("CompilerInterface" + comp).newInstance();
+-	    } catch (Exception cnfe) {
+-		System.err.println("Cannot find support for compiler " + comp);
+-		throw new RuntimeException(cnfe.toString());
+-	    }
+-	}
+-	return ci;
++        if (ci == null) {
++            String comp = (String)getField(null, "CompilerVersion");
++            try {
++                ci = (CompilerInterface)Class.forName("CompilerInterface" + comp).newInstance();
++            } catch (Exception cnfe) {
++                System.err.println("Cannot find support for compiler " + comp);
++                throw new RuntimeException(cnfe.toString());
++            }
++        }
++        return ci;
+     }
+ 
+     protected void initNames(String flavour, String build, String outDll) {
+-	if (vars == null) vars = new Hashtable();
+-	
+-	String flavourBuild =  flavour + "_" + build;
+-	put("Name", getCI().makeCfgName(flavourBuild));
+-	put("Flavour", flavour);
+-	put("Build", build);
+-
+-	// ones mentioned above were needed to expand format
+-	String buildBase = expandFormat(getFieldString(null, "BuildBase"));
+-	String jdkDir =  getFieldString(null, "JdkTargetRoot");
+-	String sourceBase = getFieldString(null, "SourceBase");	
+-	String outDir = buildBase;
+-	
+-	put("Id", flavourBuild);
+-	put("OutputDir", outDir);
+-	put("SourceBase", sourceBase);
+-	put("BuildBase", buildBase);
+-	put("OutputDll", jdkDir + Util.sep + outDll);
++        if (vars == null) vars = new Hashtable();
++
++        String flavourBuild =  flavour + "_" + build;
++        put("Name", getCI().makeCfgName(flavourBuild));
++        put("Flavour", flavour);
++        put("Build", build);
++
++        // ones mentioned above were needed to expand format
++        String buildBase = expandFormat(getFieldString(null, "BuildBase"));
++        String jdkDir =  getFieldString(null, "JdkTargetRoot");
++        String sourceBase = getFieldString(null, "SourceBase");
++        String outDir = buildBase;
++
++        put("Id", flavourBuild);
++        put("OutputDir", outDir);
++        put("SourceBase", sourceBase);
++        put("BuildBase", buildBase);
++        put("OutputDll", jdkDir + Util.sep + outDll);
+ 
+-	context = new String [] {flavourBuild, flavour, build, null};
++        context = new String [] {flavourBuild, flavour, build, null};
+     }
+-    
++
+     protected void init(Vector includes, Vector defines) {
+-	initDefaultDefines(defines);
+-	initDefaultCompilerFlags(includes);
+-	initDefaultLinkerFlags();
+-	handleDB((String)getFieldInContext("IncludeDB"));
++        initDefaultDefines(defines);
++        initDefaultCompilerFlags(includes);
++        initDefaultLinkerFlags();
++        handleDB((String)getFieldInContext("IncludeDB"));
+     }
+ 
+ 
+-    protected void initDefaultCompilerFlags(Vector includes) {	
+-	Vector compilerFlags = new Vector();
++    protected void initDefaultCompilerFlags(Vector includes) {
++        Vector compilerFlags = new Vector();
++
++        compilerFlags.addAll(getCI().getBaseCompilerFlags(getV("Define"),
++                                                          includes,
++                                                          get("OutputDir")));
+ 
+-	compilerFlags.addAll(getCI().getBaseCompilerFlags(getV("Define"), 
+-							  includes, 
+-							  get("OutputDir")));
+-	
+-	put("CompilerFlags", compilerFlags);
++        put("CompilerFlags", compilerFlags);
+     }
+ 
+     protected void initDefaultLinkerFlags() {
+-	Vector linkerFlags = new Vector();
++        Vector linkerFlags = new Vector();
+ 
+-	linkerFlags.addAll(getCI().getBaseLinkerFlags( get("OutputDir"), get("OutputDll")));
++        linkerFlags.addAll(getCI().getBaseLinkerFlags( get("OutputDir"), get("OutputDll")));
+ 
+-	put("LinkerFlags", linkerFlags);
++        put("LinkerFlags", linkerFlags);
+     }
+-    
++
+     DirectoryTree getSourceTree(String sourceBase, String startAt) {
+-	DirectoryTree tree = new DirectoryTree();
++        DirectoryTree tree = new DirectoryTree();
+ 
+-	tree.addSubdirToIgnore("Codemgr_wsdata");
+-	tree.addSubdirToIgnore("deleted_files");
+-	tree.addSubdirToIgnore("SCCS");
+-	tree.setVerbose(true);
+-	if (startAt != null) {
+-	    tree.readDirectory(sourceBase + File.separator + startAt);
+-	} else {
+-	    tree.readDirectory(sourceBase);
+-	}
++        tree.addSubdirToIgnore("Codemgr_wsdata");
++        tree.addSubdirToIgnore("deleted_files");
++        tree.addSubdirToIgnore("SCCS");
++        tree.setVerbose(true);
++        if (startAt != null) {
++            tree.readDirectory(sourceBase + File.separator + startAt);
++        } else {
++            tree.readDirectory(sourceBase);
++        }
+ 
+-	return tree;
++        return tree;
+     }
+ 
+ 
+     Vector getPreferredPaths(Database currentDB) {
+-	Vector preferredPaths = new Vector();
+-    	// In the case of multiple files with the same name in
+-	// different subdirectories, prefer the versions specified in
+-	// the platform file as the "os_family" and "arch" macros.
+-	for (Iterator iter = currentDB.getMacros(); iter.hasNext(); ) {
+-	    Macro macro = (Macro) iter.next();
+-	    if (macro.name.equals("os_family") ||
+-		macro.name.equals("arch")) {
+-		preferredPaths.add(macro.contents);
+-	    }
+-	}
+-	// Also prefer "opto" over "adlc" for adlcVMDeps.hpp
+-	preferredPaths.add("opto");
+-	
+-	return preferredPaths;
+-    }
+-
+-
+-    void handleDB(String dbFile) {	
+-	WinGammaPlatform platform = (WinGammaPlatform)getField(null, "PlatformObject");
+-	Database db = new Database(platform, platform.defaultGrandIncludeThreshold());
+-
+-	try {
+-	    File incls = new File(get("OutputDir")+Util.sep+"incls");
+-	    FileName oldInclTempl = platform.getInclFileTemplate();
+-	    FileName oldGITempl = platform.getGIFileTemplate();
+-	    FileName oldGDTempl = platform.getGDFileTemplate();
+-	    
+-	    platform.setInclFileTemplate(new FileName(platform, incls.getPath()+Util.sep, 
+-						      "_", "", ".incl", "", ""));
+-	    platform.setGIFileTemplate(new FileName(platform, incls.getPath()+Util.sep, 
+-						    "",  "_precompiled", ".incl", "", ""));
+-	    
+-	    incls.mkdirs();
+-	    
+-	    db.get(getFieldString(null, "Platform"), dbFile);
+-	    db.compute();
+-	    
+-	    db.put();
+-
+-	    //platform.setInclFileTemplate(oldInclTempl);
+-	    //platform.setGIFileTemplate(oldInclTempl);
+-	} catch (Exception e) {
+-	    e.printStackTrace();
+-	    throw new RuntimeException("cannot do db: "+e);
+-	}
+-	
+-	putSpecificField("AllFilesHash", computeAllFiles(platform, db));
+-    }
+-
+-
+-    void addAll(Iterator i, Hashtable hash, 
+-		WinGammaPlatform platform, DirectoryTree tree, 
+-		Vector preferredPaths, Vector filesNotFound, Vector filesDuplicate) {
+-	for (; i.hasNext(); ) {
+-	    String fileName = (String) i.next();
+-	    if (lookupHashFieldInContext("IgnoreFile", fileName) == null) {		
+-		String prefixedName = platform.envVarPrefixedFileName(fileName,
+-								      0, /* ignored */
+-								      tree,
+-								      preferredPaths,
+-								      filesNotFound,
+-								      filesDuplicate);
+-		if (prefixedName != null) {
+-		    addTo(hash, Util.normalize(prefixedName), fileName);
+-		}
+-	    }
+-	}
++        Vector preferredPaths = new Vector();
++        // In the case of multiple files with the same name in
++        // different subdirectories, prefer the versions specified in
++        // the platform file as the "os_family" and "arch" macros.
++        for (Iterator iter = currentDB.getMacros(); iter.hasNext(); ) {
++            Macro macro = (Macro) iter.next();
++            if (macro.name.equals("os_family") ||
++                macro.name.equals("arch")) {
++                preferredPaths.add(macro.contents);
++            }
++        }
++        // Also prefer "opto" over "adlc" for adlcVMDeps.hpp
++        preferredPaths.add("opto");
++
++        return preferredPaths;
++    }
++
++
++    void handleDB(String dbFile) {
++        WinGammaPlatform platform = (WinGammaPlatform)getField(null, "PlatformObject");
++        Database db = new Database(platform, platform.defaultGrandIncludeThreshold());
++
++        try {
++            File incls = new File(get("OutputDir")+Util.sep+"incls");
++            FileName oldInclTempl = platform.getInclFileTemplate();
++            FileName oldGITempl = platform.getGIFileTemplate();
++            FileName oldGDTempl = platform.getGDFileTemplate();
++
++            platform.setInclFileTemplate(new FileName(platform, incls.getPath()+Util.sep,
++                                                      "_", "", ".incl", "", ""));
++            platform.setGIFileTemplate(new FileName(platform, incls.getPath()+Util.sep,
++                                                    "",  "_precompiled", ".incl", "", ""));
++
++            incls.mkdirs();
++
++            db.get(getFieldString(null, "Platform"), dbFile);
++            db.compute();
++
++            db.put();
++
++            //platform.setInclFileTemplate(oldInclTempl);
++            //platform.setGIFileTemplate(oldInclTempl);
++        } catch (Exception e) {
++            e.printStackTrace();
++            throw new RuntimeException("cannot do db: "+e);
++        }
++
++        putSpecificField("AllFilesHash", computeAllFiles(platform, db));
++    }
++
++
++    void addAll(Iterator i, Hashtable hash,
++                WinGammaPlatform platform, DirectoryTree tree,
++                Vector preferredPaths, Vector filesNotFound, Vector filesDuplicate) {
++        for (; i.hasNext(); ) {
++            String fileName = (String) i.next();
++            if (lookupHashFieldInContext("IgnoreFile", fileName) == null) {
++                String prefixedName = platform.envVarPrefixedFileName(fileName,
++                                                                      0, /* ignored */
++                                                                      tree,
++                                                                      preferredPaths,



More information about the distro-pkg-dev mailing list