Blame SOURCES/ecj-rpmdebuginfo.patch

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