URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [libjava/] [HACKING] - Rev 14
Compare with Previous | Blame | View Log
Things libgcj hackers should know---------------------------------If you want to hack on the libgcj files you need to be aware of thefollowing things. There are probably lots of other things that should beexplained in this HACKING file. Please add them if you discover them :)--libgcj uses GNU Classpath as an upstream provider. Snapshots ofClasspath are imported into the libgcj source tree. Some classes areoverridden by local versions; these files still appear in the libgcjtree.To import a new release:- Check out a classpath snapshotI use 'cvs export' for this. Make a tag to ensure future hackersknow exactly what revision was checked out; tags are of the form'libgcj-import-DATE'.- Use auto* to create configure, Makefile.in, etcYou have to make sure to use the gcc libtool.m4 and gcc lt* scriptscd .../classpathcp ../../lt* .cp ../../config.sub ../../config.guess .aclocal -I m4 -I ../..autoconfautoheaderautomakerm -rf autom4te.cache- Test everything first. The simplest way to do this is by overlayingthe checked out classpath on your gcc tree and then doing a build.- Use 'cvs import' to import. The vendor tag is 'CLASSPATH'. For therelease tag, if this is a released classpath version, use somethinglike 'classpath-import-VERSION'; otherwise something like'classpath-import-DATE'.Be sure to use -ko and -I\!- Remove any files that were deleted in Classpath- Run 'scripts/makemake.tcl > sources.am' in the source tree- Run automake for libgcjOver time we plan to remove as many of the remaining divergences aspossible.File additions and deletions require running scripts/makemake.tclbefore running automake.--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 apatch provided that the problem is resolved (by fixing a compilerbug or fixing the Classpath bug upstream) somehow and the resolutionis later checked in (erasing the local diff).* On a release branch to fix a bug, where a full-scale import ofClasspath is not advisable.--You can develop in a GCC tree using a CVS checkout of Classpath, mostof the time. (The exceptions are when an incompatible change has beenmade in Classpath and some core part of libgcj has not yet beenupdated.)The way to set this up is very similar to importing a new version ofClasspath into the libgcj tree. In your working tree:* cd gcc/libjava; rm -rf classpath* cvs co classpath* cd classpathNow run the auto tools as specified in the import process; thencd ..* Run 'scripts/makemake.tcl > sources.am' in the source tree* Run automake for libgcjNow you should be ready to go.If you are working in a tree like this, you must remember to runmakemake.tcl and automake whenever you update your embedded classpathtree.--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 (theentire contents of the namespace)* Then insert the output of `perl scripts/classes.pl' into the fileat that point. This must be run from the build tree, in<build>/classpath/lib; it uses the .class file name to determinewhat to print.If you're generating a patch there is a program you can get to do anoffline `cvs add' (it will fake an `add' if you don't have writepermission yet). Then you can use `cvs diff -N' to generate thepatch. See http://www.red-bean.com/cvsutils/
