diff --git a/WHATSNEW b/WHATSNEW
index ef1917752..2644bdd46 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -84,6 +84,11 @@ Fixed bugs:
* Length task did not process nonexistent Resources even though these might
conceivably still carry file length information. Bugzilla report 45271.
+ * 's includeJavaRuntime="false" should work for gcj now. Note
+ that you may need to set includeAntRuntime to false in order to
+ have full control.
+ Bugzilla Report 34638.
+
Other changes:
--------------
diff --git a/docs/manual/CoreTasks/javac.html b/docs/manual/CoreTasks/javac.html
index 0d5f9c63a..c3593af2e 100644
--- a/docs/manual/CoreTasks/javac.html
+++ b/docs/manual/CoreTasks/javac.html
@@ -295,7 +295,11 @@ invoking the compiler.
includeJavaRuntime |
Whether to include the default run-time
libraries from the executing VM in the classpath;
- defaults to no . |
+ defaults to no
.
+ Note: In some setups the run-time libraries may be part
+ of the "Ant run-time libraries" so you may need to explicitly
+ set includeAntRuntime to false to ensure that the Java
+ run-time libraries are not included.
No |
diff --git a/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java b/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
index 160d3fcdc..cae497fbd 100644
--- a/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
+++ b/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
@@ -66,7 +66,9 @@ public class Gcj extends DefaultCompilerAdapter {
// gcj doesn't support an extension dir (-extdir)
// so we'll emulate it for compatibility and convenience.
- classpath.addExtdirs(extdirs);
+ if (extdirs != null || includeJavaRuntime) {
+ classpath.addExtdirs(extdirs);
+ }
classpath.append(getCompileClasspath());