[fedora-java] Using the natively-built Eclipse compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ant and javac aren't currently using the natively-built Eclipse
compiler.

We need to add something like the following to /usr/bin/ant in order to
pick up the .so files:

# diff -c /usr/bin/ant~ /usr/bin/ant
*** /usr/bin/ant~       2005-03-05 13:13:05.000000000 -0800
--- /usr/bin/ant        2005-03-06 02:19:55.000000000 -0800
***************
*** 230,235 ****
--- 230,236 ----
  if $JAVACMD -version 2>&1 | grep -q "gcj"; then
    if [ -f /usr/share/java/jdtcore.jar ]; then
      LOCALCLASSPATH="$LOCALCLASSPATH:/usr/share/java/jdtcore.jar"
+     ANT_OPTS="$ANT_OPTS -Dgnu.gcj.precompiled.db.path=/usr/lib/eclipse/eclipse.db"
    fi
  fi

(and something similar to java-gcj-compat's javac.in, see attached patch)

This will shave minutes off of the build times for some packages.

I forget what the plan is wrt the db.  Maybe we'll have a global one. 
In any case, this will do in the meanwhile.

(gbenson: could you please stick the above in apache-ant-javac-ecj.patch?  This is 
 where we really need it - thanks!)

AG

2005-03-06  Anthony Green  <green@xxxxxxxxxx>

	* javac.in: Set gnu.gcj.precompiled.db.path in order to pick
	up AOT-compiled Eclipse compiler.

+
Index: javac.in
===================================================================
RCS file: /cvs/rhug/java-gcj-compat/javac.in,v
retrieving revision 1.3
diff -u -r1.3 javac.in
--- javac.in	12 Jan 2005 21:37:44 -0000	1.3
+++ javac.in	6 Mar 2005 10:36:19 -0000
@@ -5,4 +5,6 @@
 *) export CLASSPATH=$CLASSPATH${CLASSPATH:+:}@SDK_LIB_DIR@/tools.jar
 esac
 
-exec @GCJ_BIN_DIR@/gij@gcc_suffix@ com.sun.tools.javac.Main ${1+"$@"}
+exec @GCJ_BIN_DIR@/gij@gcc_suffix@ \
+    -Dgnu.gcj.precompiled.db.path=/usr/lib/eclipse/eclipse.db \
+    com.sun.tools.javac.Main ${1+"$@"}

[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux