eclipse-ecj/java-ecj-3.4.2-rpmdebuginfo.patch

33 lines
1.3 KiB
Diff

--- java-ecj-3.4.2/org/eclipse/jdt/internal/compiler/batch/Main.java 2008-04-21 11:01:00.000000000 +0200
+++ java-ecj-3.4.2/org/eclipse/jdt/internal/compiler/batch/Main.java-gil 2009-03-13 05:20:09.000000000 +0100
@@ -2609,6 +2609,29 @@
this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
}
+ {
+ // If we're building an RPM, force full debugging info to
+ // be generated, no matter what options have been passed
+ // by Ant. This is something of a kludge, but it is far
+ // better than the alternative, which is having class
+ // files with debug info mysteriously missing.
+
+ String RpmPackageName = System.getenv("RPM_PACKAGE_NAME");
+ String RpmArch = System.getenv("RPM_ARCH");
+ String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT");
+ if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) {
+ this.options.put(
+ CompilerOptions.OPTION_LocalVariableAttribute,
+ CompilerOptions.GENERATE);
+ this.options.put(
+ CompilerOptions.OPTION_LineNumberAttribute,
+ CompilerOptions.GENERATE);
+ this.options.put(
+ CompilerOptions.OPTION_SourceFileAttribute,
+ CompilerOptions.GENERATE);
+ }
+ }
+
this.logger.logCommandLineArguments(newCommandLineArgs);
this.logger.logOptions(this.options);