Index: gcc/doc/install.texi =================================================================== --- gcc/doc/install.texi (revision 137153) +++ gcc/doc/install.texi (working copy) @@ -1607,6 +1607,45 @@ @item --with-win32-nlsapi=ansi, unicows or unicode Indicates how MinGW @samp{libgcj} translates between UNICODE characters and the Win32 API@. + +@item --enable-java-home +If enabled, this creates a JPackage compatible SDK environment during install. +Note that if --enable-java-home is used, --with-arch-directory=ARCH must also +be specified. + +@item --with-arch-directory=ARCH +Specifies the name to use for the @file{jre/lib/ARCH} directory in the SDK +environment created when --enable-java-home is passed. Typical names for this +directory include i386, amd64, ia64, etc. + +@item --with-os-directory=DIR +Specifies the OS directory for the SDK include directory. This is set to auto +detect, and is typically 'linux'. + +@item --with-origin-name=NAME +Specifies the JPackage origin name. This defaults to the 'gcj' in +java-1.5.0-gcj. + +@item --with-arch-suffix=SUFFIX +Specifies the suffix for the sdk directory. Defaults to the empty string. +Examples include '.x86_64' in 'java-1.5.0-gcj-1.5.0.0.x86_64'. + +@item --with-jvm-root-dir=DIR +Specifies where to install the SDK. Default is $(prefix)/lib/jvm. + +@item --with-jvm-jar-dir=DIR +Specifies where to install jars. Default is $(prefix)/lib/jvm-exports. + +@item --with-python-dir=DIR +Specifies where to install the Python modules used for aot-compile. DIR should +not include the prefix used in installation. For example, if the Python modules +are to be installed in /usr/lib/python2.5/site-packages, then +--with-python-dir=/lib/python2.5/site-packages should be passed. If this is +not specified, then the Python modules are installed in $(prefix)/share/python. + +@item --enable-aot-compile-rpm +Adds aot-compile-rpm to the list of installed scripts. + @table @code @item ansi Use the single-byte @code{char} and the Win32 A functions natively, Index: gcc/java/gcj.texi =================================================================== --- gcc/java/gcj.texi (revision 137153) +++ gcc/java/gcj.texi (working copy) @@ -72,6 +72,11 @@ Generate stubs for Remote Method Invocation. * gc-analyze: (gcj)Invoking gc-analyze. Analyze Garbage Collector (GC) memory dumps. +* aot-compile: (gcj)Invoking aot-compile. + Compile bytecode to native and generate databases. +* rebuild-gcj-db: (gcj)Invoking rebuild-gcj-db. + Merge the per-solib databases made by aot-compile + into one system-wide database. @end direntry @end format @@ -115,6 +120,9 @@ * Invoking jv-convert:: Converting from one encoding to another * Invoking grmic:: Generate stubs for Remote Method Invocation. * Invoking gc-analyze:: Analyze Garbage Collector (GC) memory dumps. +* Invoking aot-compile:: Compile bytecode to native and generate databases. +* Invoking rebuild-gcj-db:: Merge the per-solib databases made by aot-compile + into one system-wide database. * About CNI:: Description of the Compiled Native Interface * System properties:: Modifying runtime behavior of the libgcj library * Resources:: Where to look for more information @@ -921,7 +929,7 @@ [@option{-v}] [@option{-m}] [@option{--version}] [@option{--help}] @c man end -@c man begin SEEALSO gij +@c man begin SEEALSO gcj-dbtool gcc(1), gcj(1), gcjh(1), jcf-dump(1), gfdl(7), and the Info entries for @file{gcj} and @file{gcc}. @c man end @@ -1219,6 +1227,87 @@ @c man end +@node Invoking aot-compile +@chapter Invoking aot-compile + +@c man title aot-compile Compile bytecode to native and generate databases + +@ignore + +@c man begin SYNOPSIS aot-compile +aot-compile [@option{OPTION}] @dots{} @var{SRCDIR} @var{DSTDIR} + +aot-compile [@option{-M, --make}=@var{PATH}] [@option{-C, --gcj}=@var{PATH}] + [@option{-D, --dbtool}=@var{PATH}] [@option{-m, --makeflags}=@var{FLAGS}] + [@option{-c, --gcjflags}=@var{FLAGS}] [@option{-l, --ldflags}=@var{FLAGS}] + [@option{-e, --exclude}=@var{PATH}] +@c man end + +@c man begin SEEALSO aot-compile +gcc(1), gcj(1), gcjh(1), jcf-dump(1), gfdl(7), +and the Info entries for @file{gcj} and @file{gcc}. +@c man end + +@end ignore + +@c man begin DESCRIPTION aot-compile +@code{aot-compile} is a script that searches a directory for Java bytecode +(as class files, or in jars) and uses @code{gcj} to compile it to native +code and generate the databases from it. +@c man end + +@c man begin OPTIONS aot-compile +@table @gcctabopt +@item -M, --make=@var{PATH} +Specify the path to the @code{make} executable to use. + +@item -C, --gcj=@var{PATH} +Specify the path to the @code{gcj} executable to use. + +@item -D, --dbtool=@var{PATH} +Specify the path to the @code{gcj-dbtool} executable to use. + +@item -m, --makeflags=@var{FLAGS} +Specify flags to pass to @code{make} during the build. + +@item -c, --gcjflags=@var{FLAGS} +Specify flags to pass to @code{gcj} during compilation, in addition to +'-fPIC -findirect-dispatch -fjni'. + +@item -l, --ldflags=@var{FLAGS} +Specify flags to pass to @code{gcj} during linking, in addition to +'-Wl,-Bsymbolic'. + +@item -e, --exclude=@var{PATH} +Do not compile @var{PATH}. + +@end table + +@c man end + +@node Invoking rebuild-gcj-db +@chapter Invoking rebuild-gcj-db + +@c man title rebuild-gcj-db Merge the per-solib databases made by aot-compile into one system-wide database. +@ignore + +@c man begin SYNOPSIS rebuild-gcj-db +rebuild-gcj-db +@c man end + +@c man begin SEEALSO rebuild-gcj-db +gcc(1), gcj(1), gcjh(1), jcf-dump(1), gfdl(7), +and the Info entries for @file{gcj} and @file{gcc}. +@c man end + +@end ignore + +@c man begin DESCRIPTION rebuild-gcj-db +@code{rebuild-gcj-db} is a script that merges the per-solib databases made by +@code{aot-compile} into one system-wide database so @code{gij} can find the +solibs. +@c man end + @node About CNI @chapter About CNI Index: gcc/java/Make-lang.in =================================================================== --- gcc/java/Make-lang.in (revision 137153) +++ gcc/java/Make-lang.in (working copy) @@ -143,8 +143,9 @@ java.html: $(build_htmldir)/java/index.html JAVA_MANFILES = doc/gcj.1 doc/jcf-dump.1 doc/gij.1 \ - doc/jv-convert.1 doc/grmic.1\ - doc/gcj-dbtool.1 doc/gc-analyze.1 + doc/jv-convert.1 doc/grmic.1 \ + doc/gcj-dbtool.1 doc/gc-analyze.1 doc/aot-compile.1 \ + doc/rebuild-gcj-db.1 java.man: $(JAVA_MANFILES) @@ -189,6 +190,8 @@ -rm -rf $(DESTDIR)$(man1dir)/gij$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/jv-convert$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/gcj-dbtool$(man1ext) + -rm -rf $(DESTDIR)$(man1dir)/aot-compile$(man1ext) + -rm -rf $(DESTDIR)$(man1dir)/rebuild-gcj-db$(man1ext) java.install-info: $(DESTDIR)$(infodir)/gcj.info @@ -223,6 +226,8 @@ -rm -f $(docobjdir)/grmic.1 -rm -f $(docobjdir)/gcj-dbtool.1 -rm -f $(docobjdir)/gc-analyze.1 + -rm -f $(docobjdir)/aot-compile.1 + -rm -f $(docobjdir)/rebuild-gcj-db.1 # # Stage hooks: # The main makefile has already created stage?/java. @@ -353,15 +358,21 @@ -$(TEXI2POD) -D gcj-dbtool < $< > $@ gc-analyze.pod: java/gcj.texi -$(TEXI2POD) -D gc-analyze < $< > $@ +aot-compile.pod: java/gcj.texi + -$(TEXI2POD) -D aot-compile < $< > $@ +rebuild-gcj-db.pod: java/gcj.texi + -$(TEXI2POD) -D rebuild-gcj-db < $< > $@ # Install the man pages. java.install-man: installdirs \ $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext) \ $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS:%=doc/%.1) \ doc/gij.1 doc/jv-convert.1 doc/grmic.1 \ - doc/gcj-dbtool.1 doc/gc-analyze.1 + doc/gcj-dbtool.1 doc/gc-analyze.1 \ + doc/aot-compile.1 doc/rebuild-gcj-db.1 for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS) \ - gij jv-convert grmic gcj-dbtool gc-analyze ; do \ + gij jv-convert grmic gcj-dbtool gc-analyze aot-compile \ + rebuild-gcj-db; do \ tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \ man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \ rm -f $$man_name ; \