Blame SOURCES/ecj-rpmdebuginfo.patch

bd3beb
### Eclipse Workspace Patch 1.0
bd3beb
#P org.eclipse.jdt.core
bd3beb
Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java
bd3beb
===================================================================
bd3beb
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v
bd3beb
retrieving revision 1.327
bd3beb
diff -u -r1.327 Main.java
bd3beb
--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java	21 Apr 2008 15:00:59 -0000	1.327
bd3beb
+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java	20 Nov 2008 19:26:57 -0000
bd3beb
@@ -2609,6 +2609,29 @@
bd3beb
 		this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
bd3beb
 	}
bd3beb
 
bd3beb
+	{
bd3beb
+		// If we're building an RPM, force full debugging info to
bd3beb
+		// be generated, no matter what options have been passed
bd3beb
+		// by Ant.  This is something of a kludge, but it is far
bd3beb
+		// better than the alternative, which is having class
bd3beb
+		// files with debug info mysteriously missing.
bd3beb
+
bd3beb
+		String RpmPackageName = System.getenv("RPM_PACKAGE_NAME");
bd3beb
+		String RpmArch = System.getenv("RPM_ARCH");
bd3beb
+		String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT");
bd3beb
+		if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) {
bd3beb
+			this.options.put(
bd3beb
+					CompilerOptions.OPTION_LocalVariableAttribute,
bd3beb
+					CompilerOptions.GENERATE);
bd3beb
+			this.options.put(
bd3beb
+					CompilerOptions.OPTION_LineNumberAttribute,
bd3beb
+					CompilerOptions.GENERATE);
bd3beb
+			this.options.put(
bd3beb
+					CompilerOptions.OPTION_SourceFileAttribute,
bd3beb
+					CompilerOptions.GENERATE);
bd3beb
+		}
bd3beb
+	}
bd3beb
+
bd3beb
 	this.logger.logCommandLineArguments(newCommandLineArgs);
bd3beb
 	this.logger.logOptions(this.options);
bd3beb