Blame SOURCES/ecj-rpmdebuginfo.patch

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