WWW patch: Miscellaneous gcj FAQ updates

Anthony Green green@cygnus.com
Thu Jun 20 03:14:00 GMT 2002


This patch contains a number of minor FAQ clean ups.  Ok?

Thanks,

AG


2002-06-20  Anthony Green  <green@redhat.com>

 	* faq.html: Mention gccbug.
 	Update supported platforms list.
 	Update gdb version reference.
 	Remove note about interpreter only working on x86 Linux.
 	Fix "newwer" typo.
 	Fix libgcj.jar references.
 	Mention the extensions directory.
 	Use <tt></tt> around command line options.

Index: htdocs/java/faq.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/java/faq.html,v
retrieving revision 1.53
diff -c -r1.53 faq.html
*** htdocs/java/faq.html	25 Mar 2002 20:50:21 -0000	1.53
--- htdocs/java/faq.html	20 Jun 2002 07:52:59 -0000
***************
*** 53,59 ****
              <li><a href="#4_1">Why do I get <tt>undefined reference to `main'</tt> 
                errors?</a></li>
              <li><a href="#4_2">Can GCJ only handle source code? </a></li>
!             <li><a href="#4_3">"gcj -C" Doesnt seem to work like javac/jikes. 
                Whats going on? </a></li>
              <li><a href="#4_4">Where does GCJ look for files? </a></li>
              <li><a href="#4_5">How does gcj resolve wether to compile .class or 
--- 53,59 ----
              <li><a href="#4_1">Why do I get <tt>undefined reference to `main'</tt> 
                errors?</a></li>
              <li><a href="#4_2">Can GCJ only handle source code? </a></li>
!             <li><a href="#4_3">"gcj -C" Doesnt seem to work like javac/jikes. 
                Whats going on? </a></li>
              <li><a href="#4_4">Where does GCJ look for files? </a></li>
              <li><a href="#4_5">How does gcj resolve wether to compile .class or 
***************
*** 108,116 ****
        <dl>
          <dd>
            libgcj has a corresponding <a
!       href="http://gcc.gnu.org/cgi-bin/gnatsweb.pl?user=guest&password=guest&database=gcc&cmd=login">Gnats 
!           bug database</a> which you can browse. You can also submit new bug reports 
!           from the Gnats page.
          </dd>
        </dl>
        
--- 108,117 ----
        <dl>
          <dd>
            libgcj has a corresponding <a
!           href="http://gcc.gnu.org/cgi-bin/gnatsweb.pl?user=guest&password=guest&database=gcc&cmd=login">Gnats
!           bug database</a> which you can browse. You can also submit
!           new bug reports from the Gnats page, and with the `gccbug'
!           program installed along with gcj.
          </dd>
        </dl>
        
***************
*** 138,147 ****
        <h3><a name="1_5">1.5 Will gcj and libgcj work on my machine?</a></h3>
        <dl> 
          <dd>
!           Gcj and libgcj are known to work more or less with IA-32 and 
!           Sparc Solaris, Tru64 Unix, as well as IA-32, IA-64, Alpha, and PowerPC 
!           Linux. They might work on other systems. Generally speaking, porting to a new 
!           system should not be hard. This would be a good way to volunteer.
          </dd>
        </dl>
   
--- 139,151 ----
        <h3><a name="1_5">1.5 Will gcj and libgcj work on my machine?</a></h3>
        <dl> 
          <dd>
!           Gcj and libgcj are known to work more or less with IA-32 and
!           Sparc Solaris, Tru64 Unix, IA-32 FreeBSD, as well as IA-32,
!           IA-64, Alpha, and PowerPC Linux.  It's also possible to
!           build cross compilers to Win32 (using mingw32), and
!           xscale-elf.  They might work on other systems. Generally
!           speaking, porting to a new system should not be hard. This
!           would be a good way to volunteer.
          </dd>
        </dl>
   
***************
*** 149,155 ****
        <h3><a name="1_6">1.6 How can I debug my Java program?</a></h3>
        <dl> 
          <dd>
!           <a href="ftp://ftp.gnu.org/pub/gnu/gdb/">gdb 5.0</a> 
            includes support for debugging gcj-compiled Java programs. For more 
            information please read <a href="gdb.html">Java Debugging with gdb</a>.
          </dd>
--- 153,159 ----
        <h3><a name="1_6">1.6 How can I debug my Java program?</a></h3>
        <dl> 
          <dd>
!           <a href="ftp://ftp.gnu.org/pub/gnu/gdb/">gdb 5.2</a> 
            includes support for debugging gcj-compiled Java programs. For more 
            information please read <a href="gdb.html">Java Debugging with gdb</a>.
          </dd>
***************
*** 163,170 ****
            compiled code. It works pretty transparently: if a compiled version of a class is
            not found in the application binary or linked shared libraries, the class loader
            will search for a bytecode version in your classpath, much like a VM would. Be
!           sure to build libgcj with the --enable-interpreter option to enable this
!           functionality. Currently this only works on x86 linux.</p>
          
            <p>The program "gij" provides a front end to the interpreter that behaves
            much like a traditional virtual machine. You can even use "gij" to run a shared library 
--- 167,174 ----
            compiled code. It works pretty transparently: if a compiled version of a class is
            not found in the application binary or linked shared libraries, the class loader
            will search for a bytecode version in your classpath, much like a VM would. Be
!           sure to build libgcj with the <tt>--enable-interpreter</tt> option to enable this
!           functionality.</p>
          
            <p>The program "gij" provides a front end to the interpreter that behaves
            much like a traditional virtual machine. You can even use "gij" to run a shared library 
***************
*** 381,387 ****
        <dl> 
          <dd>
            <p>If you're using Linux, this probibly means you need to upgrade to
!           a newwer, glibc (libc6) based Linux distribution. libgcj does not 
            support the older linux libc5.</p>
            <p>It might be possible to get a working libgcj by changing occurances
            of "sigcontext_struct" to "sigcontext", however this has not been tested.
--- 385,391 ----
        <dl> 
          <dd>
            <p>If you're using Linux, this probibly means you need to upgrade to
!           a newer, glibc (libc6) based Linux distribution. libgcj does not 
            support the older linux libc5.</p>
            <p>It might be possible to get a working libgcj by changing occurances
            of "sigcontext_struct" to "sigcontext", however this has not been tested.
***************
*** 453,463 ****
        <h3><a name="4_4">4.4 Where does GCJ look for files?</a></h3>
        <dl>
          <dd> 
!           <p>GCJ looks for classes to compile based on the CLASSPATH environment 
!           variable. <code>libgcj.jar</code> and other files are found relative to the 
!           path of the compiler itself, so it is safe to move the entire compiler tree
!           to a different path, and there is no need to include <code>libgcj.jar</code>
!           in your CLASSPATH. </p>
          </dd>
        </dl>
  
--- 457,469 ----
        <h3><a name="4_4">4.4 Where does GCJ look for files?</a></h3>
        <dl>
          <dd> 
!           <p>GCJ looks for classes to compile based on the CLASSPATH
!           environment variable. The libgcj jar file is found relative
!           to the path of the compiler itself, so it is safe to move
!           the entire compiler tree to a different path, and there is
!           no need to include the libgcj jar file in your
!           CLASSPATH. GCJ also supports extension directories.  See the
!           <tt>--extdirs=</tt> entry in the GCJ manual for details.</p>
          </dd>
        </dl>
  
***************
*** 555,567 ****
              <li>RE - array accesses. We have sub-optimal runtime checking code, 
                and the compiler is still not so smart about automatically removing 
                array checks. If your code is ready, and it doesn't rely on them, 
!               try compiling with --no-bounds-check. </li>
              <li>Try static linking.  On many platforms, dynamic (PIC) function 
                calls are more expensive than static ones. In particular, the 
                interaction with boehm-gc seems to incur extra overhead when shared 
                libraries are used. </li>
              <li>If your Java application doesn't need threads, try building libgcj 
!               using --enable-threads=none. Portions of the libgcj runtime are 
                still more efficient when single-threaded.</li>
            </ul>
          </dd>
--- 561,573 ----
              <li>RE - array accesses. We have sub-optimal runtime checking code, 
                and the compiler is still not so smart about automatically removing 
                array checks. If your code is ready, and it doesn't rely on them, 
!               try compiling with <tt>--no-bounds-check</tt>. </li>
              <li>Try static linking.  On many platforms, dynamic (PIC) function 
                calls are more expensive than static ones. In particular, the 
                interaction with boehm-gc seems to incur extra overhead when shared 
                libraries are used. </li>
              <li>If your Java application doesn't need threads, try building libgcj 
!               using <tt>--enable-threads=none</tt>. Portions of the libgcj runtime are 
                still more efficient when single-threaded.</li>
            </ul>
          </dd>

-- 
Anthony Green                                                        Red Hat
                                                       Sunnyvale, California



More information about the Java-patches mailing list