This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcj -c -d ?


Three questions about gcj usability:

1) Why does gcj allow "-d <directory>" when compiling to bytecode,
   but not when compiling to object files?  For quick and dirty
   development without hand-tuned makefiles, I really like the Java
   (javac/jikes) way of compiling:
   
   gcj -C -d . org/foo/bar/Baz.java
   gcj -c -d . org/foo/bar/Baz.class
   
   and:
   
   gcj -c -d . */*/*/*.class
   gcj -o baz.exe --main=org.foo.bar.Baz */*/*/*.o

   instead of:

   gcj -c -o org/foo/bar/Baz.o org/foo/bar/Baz.class 
   
   and dozens of separate Makefiles, one per package directory.
   
   
2) When trying to compile with -O2 -static, as suggested by Jeff, 
   gcj was flooding me with "unreachable bytecode" warnings, 
   which effectively hid the more important messages.
   
   I would prefer if the "unreachable bytecode" warnings were turned
   off, unless expicitly enabled (like -Wall).
   
   
3) Why does gcj -c Foo.java prints a warning message, when Foo.java
   is newer than Foo.class?   OK, I know that compiling from source
   is still not as robust as compiling from classes...
   
   Still, if I explicitly tell gcj to compile from sources, I think
   the warning would be more appropriate, if it were using the
   .class file as input instead :-)
   
- Norman   


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]