diff --git a/pkgs/development/tools/build-managers/apache-ant/use-gcj.patch b/pkgs/development/tools/build-managers/apache-ant/use-gcj.patch
new file mode 100644
index 000000000000..db82d3ba689e
--- /dev/null
+++ b/pkgs/development/tools/build-managers/apache-ant/use-gcj.patch
@@ -0,0 +1,18 @@
+Setting `java.compiler' or `build.compiler' in `build.properties' isn't enough.
+
+--- apache-ant-1.7.1/build.xml 2008-06-27 07:05:23.000000000 +0200
++++ apache-ant-1.7.1/build.xml 2009-09-24 15:10:53.000000000 +0200
+@@ -578,12 +578,7 @@
+ classname="com.jcraft.jsch.Session"
+ classpathref="classpath"/>
+
+-
+-
+-
+-
+-
+-
++
+
+
+