2001-02-17 15:24:41 +01:00
|
|
|
Things libgcj hackers should know
|
|
|
|
---------------------------------
|
|
|
|
|
|
|
|
If you want to hack on the libgcj files you need to be aware of the
|
|
|
|
following things. There are probably lots of other things that should be
|
|
|
|
explained in this HACKING file. Please add them if you discover them :)
|
|
|
|
|
|
|
|
--
|
|
|
|
|
2005-07-16 03:27:14 +02:00
|
|
|
libgcj uses GNU Classpath as an upstream provider. Snapshots of
|
|
|
|
Classpath are imported into the libgcj source tree. Some classes are
|
|
|
|
overridden by local versions; these files still appear in the libgcj
|
|
|
|
tree.
|
|
|
|
|
|
|
|
To import a new release:
|
|
|
|
|
2006-05-22 21:21:41 +02:00
|
|
|
- Check out a classpath snapshot or take a release tar.gz file.
|
2005-07-20 23:24:56 +02:00
|
|
|
I use 'cvs export' for this. Make a tag to ensure future hackers
|
|
|
|
know exactly what revision was checked out; tags are of the form
|
Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
From-SVN: r116139
2006-08-15 01:12:35 +02:00
|
|
|
'libgcj-import-DATE' (when using a tagged checkout do:
|
|
|
|
- ./autogen.sh && ./configure && make dist
|
|
|
|
to get a proper .tar.gz for importing below).
|
2006-05-22 21:21:41 +02:00
|
|
|
- Get a svn checkout of
|
|
|
|
svn+ssh://gcc.gnu.org/svn/gcc/branches/CLASSPATH/libjava/classpath
|
|
|
|
this contains "pure" GNU Classpath inside the GCC tree.
|
|
|
|
- Clean it up and get the files from a new version:
|
Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
From-SVN: r116139
2006-08-15 01:12:35 +02:00
|
|
|
- find classpath -type f | grep -v /\.svn | grep -v /\.cvs | xargs rm
|
2006-05-22 21:21:41 +02:00
|
|
|
- tar zxf classpath-x.tar.gz
|
|
|
|
- cp -r classpath-x/* classpath
|
|
|
|
- Add/Remove files:
|
|
|
|
- svn status classpath | grep ^\! | cut -c8- | xargs svn remove
|
|
|
|
- svn status classpath | grep ^\? | cut -c8- | xargs svn add
|
Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
From-SVN: r116139
2006-08-15 01:12:35 +02:00
|
|
|
- If there are any empty directories now they can be removed. You can find
|
|
|
|
candidates (dirs with files removed) with:
|
|
|
|
- for i in `svn status classpath | grep ^D | cut -c8-`; \
|
|
|
|
do ls -d `dirname $i`; done | uniq
|
2006-05-22 21:21:41 +02:00
|
|
|
- Update vendor branch
|
|
|
|
- svn commit classpath
|
|
|
|
- Note the new revision number (Xrev)
|
|
|
|
- Get a fresh svn trunk checkout and cd gcc/libjava
|
|
|
|
- Merge the changes between classpath versions into the trunk.
|
|
|
|
svn merge -rXrev-1:Xrev \
|
|
|
|
svn+ssh://gcc.gnu.org/svn/gcc/branches/CLASSPATH/libjava/classpath \
|
|
|
|
classpath
|
|
|
|
- Resolve any conflicts pointed out by svn status classpath | grep ^C
|
|
|
|
- Makefile.in files will be regenerated in the next step.
|
|
|
|
- Other files should have a "GCJ LOCAL" comment, and/or are mentioned
|
|
|
|
in the classpath/ChangeLog.gcj file.
|
|
|
|
(Don't forget to svn resolved files.)
|
2005-07-16 03:27:14 +02:00
|
|
|
- Use auto* to create configure, Makefile.in, etc
|
Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
From-SVN: r116139
2006-08-15 01:12:35 +02:00
|
|
|
Make sure you have Automake 1.9.6 installed. Exactly that version!
|
2005-07-16 03:27:14 +02:00
|
|
|
You have to make sure to use the gcc libtool.m4 and gcc lt* scripts
|
|
|
|
cd .../classpath
|
|
|
|
cp ../../lt* .
|
2005-09-28 23:43:23 +02:00
|
|
|
cp ../../config.sub ../../config.guess .
|
re PR libgcj/27890 (lib/logging.properties pollutes common namespace)
2006-08-22 Thomas Fitzsimmons <fitzsim@redhat.com>
PR libgcj/27890
* gnu/classpath/natSystemProperties.cc (insertSystemProperties):
Set gnu.classpath.home.url to TOOLEXECLIBDIR.
* configure.ac: Do not add --with-native-libdir to
ac_configure_args.
* java/security/libgcj.security: Remove file.
* java/util/logging/logging.properties: Likewise.
* classpath/m4/acinclude.m4 (CLASSPATH_TOOLEXECLIBDIR): New macro.
* classpath/resource/Makefile.am (loggingdir): Define to
toolexeclibdir.
(securitydir): Likewise.
* classpath/configure.ac: Call CLASSPATH_TOOLEXECLIBDIR.
Set default nativeexeclibdir using toolexeclibdir.
* HACKING: Fix classpath aclocal arguments.
* Makefile.am (secdir): Remove variable.
(propdir): Likewise.
(AM_CXXFLAGS): Replace LIBDIR definition with TOOLEXECLIBDIR
definition.
(all_property_files): Remove variable.
(install-data-local): Do not install libgcj.security or
logging.properties.
* configure, Makefile.in, classpath/configure,
classpath/Makefile.in, classpath/native/jni/java-lang/Makefile.in,
classpath/native/jni/midi-alsa/Makefile.in,
classpath/native/jni/classpath/Makefile.in,
classpath/native/jni/midi-dssi/Makefile.in,
classpath/native/jni/Makefile.in,
classpath/native/jni/java-nio/Makefile.in,
classpath/native/jni/java-net/Makefile.in,
classpath/native/jni/gconf-peer/Makefile.in,
classpath/native/jni/java-io/Makefile.in,
classpath/native/jni/xmlj/Makefile.in,
classpath/native/jni/java-util/Makefile.in,
classpath/native/jni/qt-peer/Makefile.in,
classpath/native/jni/gtk-peer/Makefile.in,
classpath/native/Makefile.in, classpath/native/jawt/Makefile.in,
classpath/native/target/Linux/Makefile.in,
classpath/native/target/Makefile.in,
classpath/native/target/generic/Makefile.in,
classpath/native/fdlibm/Makefile.in,
classpath/native/plugin/Makefile.in,
classpath/resource/Makefile.in, classpath/scripts/Makefile.in,
classpath/tools/Makefile.in, classpath/doc/Makefile.in,
classpath/doc/api/Makefile.in, classpath/lib/Makefile.in,
classpath/external/Makefile.in,
classpath/external/sax/Makefile.in,
classpath/external/w3c_dom/Makefile.in,
classpath/external/relaxngDatatype/Makefile.in,
classpath/include/Makefile.in, classpath/aclocal.m4,
classpath/examples/Makefile.in, aclocal.m4: Regenerate.
From-SVN: r116332
2006-08-22 22:37:36 +02:00
|
|
|
aclocal -I m4 -I ../.. -I ../../config
|
2005-07-16 03:27:14 +02:00
|
|
|
autoconf
|
|
|
|
autoheader
|
|
|
|
automake
|
|
|
|
rm -rf autom4te.cache
|
2006-05-22 21:21:41 +02:00
|
|
|
cd ..
|
|
|
|
scripts/makemake.tcl > sources.am
|
|
|
|
automake
|
|
|
|
- Build, fix, till everything works.
|
|
|
|
Possibly update the gcj/javaprims.h file with scripts/classes.pl
|
|
|
|
(See below, it can only be done after the first source->bytecode
|
|
|
|
pass has finished.)
|
2005-07-16 03:27:14 +02:00
|
|
|
|
|
|
|
Over time we plan to remove as many of the remaining divergences as
|
|
|
|
possible.
|
|
|
|
|
|
|
|
File additions and deletions require running scripts/makemake.tcl
|
|
|
|
before running automake.
|
|
|
|
|
2001-02-17 15:24:41 +01:00
|
|
|
--
|
|
|
|
|
2005-07-20 23:24:56 +02:00
|
|
|
In general you should not make any changes in the classpath/
|
|
|
|
directory. Changes here should come via imports from upstream.
|
|
|
|
However, there are two (known) exceptions to this rule:
|
|
|
|
|
|
|
|
* In an emergency, such as a bootstrap breakage, it is ok to commit a
|
|
|
|
patch provided that the problem is resolved (by fixing a compiler
|
|
|
|
bug or fixing the Classpath bug upstream) somehow and the resolution
|
|
|
|
is later checked in (erasing the local diff).
|
|
|
|
|
|
|
|
* On a release branch to fix a bug, where a full-scale import of
|
|
|
|
Classpath is not advisable.
|
|
|
|
|
|
|
|
--
|
2001-02-17 15:24:41 +01:00
|
|
|
|
2005-08-22 01:24:58 +02:00
|
|
|
You can develop in a GCC tree using a CVS checkout of Classpath, most
|
|
|
|
of the time. (The exceptions are when an incompatible change has been
|
|
|
|
made in Classpath and some core part of libgcj has not yet been
|
|
|
|
updated.)
|
|
|
|
|
|
|
|
The way to set this up is very similar to importing a new version of
|
|
|
|
Classpath into the libgcj tree. In your working tree:
|
|
|
|
|
|
|
|
* cd gcc/libjava; rm -rf classpath
|
|
|
|
* cvs co classpath
|
|
|
|
* cd classpath
|
|
|
|
Now run the auto tools as specified in the import process; then
|
|
|
|
cd ..
|
|
|
|
* Run 'scripts/makemake.tcl > sources.am' in the source tree
|
|
|
|
* Run automake for libgcj
|
|
|
|
|
|
|
|
Now you should be ready to go.
|
|
|
|
|
|
|
|
If you are working in a tree like this, you must remember to run
|
|
|
|
makemake.tcl and automake whenever you update your embedded classpath
|
|
|
|
tree.
|
|
|
|
|
|
|
|
--
|
|
|
|
|
2001-07-29 12:05:08 +02:00
|
|
|
If you add a class to java.lang, java.io, or java.util
|
|
|
|
(including sub-packages, like java.lang.ref).
|
|
|
|
|
|
|
|
* Edit gcj/javaprims.h
|
|
|
|
|
|
|
|
* Go to the `namespace java' line, and delete that entire block (the
|
|
|
|
entire contents of the namespace)
|
|
|
|
|
2005-07-16 03:27:14 +02:00
|
|
|
* Then insert the output of `perl scripts/classes.pl' into the file
|
|
|
|
at that point. This must be run from the build tree, in
|
|
|
|
<build>/classpath/lib; it uses the .class file name to determine
|
|
|
|
what to print.
|
2001-07-29 12:05:08 +02:00
|
|
|
|
|
|
|
If you're generating a patch there is a program you can get to do an
|
|
|
|
offline `cvs add' (it will fake an `add' if you don't have write
|
|
|
|
permission yet). Then you can use `cvs diff -N' to generate the
|
|
|
|
patch. See http://www.red-bean.com/cvsutils/
|