Benjamin Kosnik writes:
 > 
 > > Attached is a rough cut of a detailed portability document
 > 
 > I also put this up here temporarily:
 > 
 > http://people.redhat.com/~bkoz/porting_to_gcc43.html

The "Java issues" part isn't quite right.  It turns out that the java
1.2 problem with the new gcj is really a bug in Ant, and there's
already a patch in Ant trunk to fix it.

So, to build with gcc-4.3 and Ant you'll need this patch:

svn diff -r529854:529855 
http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java

------------------------------------------------------------------------
r529855 | bodewig | 2007-04-18 05:17:52 +0100 (Wed, 18 Apr 2007) | 1 line

Java 6's javac doesn't understand -source 1.1 either (found by Gump and the 
log4j build 
<http://gump.zones.apache.org/gump/test/logging-log4j-12/logging-log4j-12/gump_work/build_logging-log4j-12_logging-log4j-12.html>)
------------------------------------------------------------------------
Index: 
src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
===================================================================
--- 
src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java    
    (revision 529854)
+++ 
src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java    
    (revision 529855)
@@ -321,10 +321,10 @@
         if (attributes.getSource() != null && !assumeJava13()) {
             cmd.createArgument().setValue("-source");
             String source = attributes.getSource();
-            if ((assumeJava14() || assumeJava15())
-                && (source.equals("1.1") || source.equals("1.2"))) {
+            if (source.equals("1.1") || source.equals("1.2")) {
                 // support for -source 1.1 and -source 1.2 has been
-                // added with JDK 1.4.2 - and isn't present in 1.5.0 either
+                // added with JDK 1.4.2 - and isn't present in 1.5.0
+                // or 1.6.0 either
                 cmd.createArgument().setValue("1.3");
             } else {
                 cmd.createArgument().setValue(source);

Andrew.

-- 
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 
1TE, UK
Registered in England and Wales No. 3798903

Reply via email to