* [ecj] Patch: FYI: document -fsource and -ftarget + change defaults
@ 2006-06-23 18:19 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2006-06-23 18:19 UTC (permalink / raw)
To: Java Patch List; +Cc: Gcc Patch List
I'm checking this in on the gcj-eclipse branch.
This sets the default source version to 1.5. It also changes the
specs so that we always emit 1.5 bytecode when we are going to compile
the bytecode to object code. This results in better code for the
'foo.class' construct.
This also documents the new -fsource and -ftarget options.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* lang-specs.h: Default -fsource and -ftarget to 1.5. If
emitting class files, always use 1.5.
* gcj.texi (Input Options): Document -fsource.
(Code Generation): Document -ftarget.
Index: lang-specs.h
===================================================================
--- lang-specs.h (revision 114870)
+++ lang-specs.h (working copy)
@@ -42,8 +42,8 @@
%{fdisable-assertions*} \
%{fencoding*} %{ffilelist-file} \
%{foutput-class-dir*} %{g*} \
- %{fsource*} %{!fsource*:-fsource=1.4} \
- %{ftarget*} %{!ftarget*:-ftarget=1.4} \
+ %{fsource*} %{!fsource*:-fsource=1.5} \
+ %{ftarget*} %{!femit-class-files|!ftarget*:-ftarget=1.5} \
%{!findirect-dispatch:-fzip-dependency=%U.zip} \
%{!fsyntax-only:-fzip-target=%U.jar}}\n \
%{.class|.zip|.jar|!fsyntax-only:jc1 \
Index: gcj.texi
===================================================================
--- gcj.texi (revision 114870)
+++ gcj.texi (working copy)
@@ -305,6 +305,10 @@
This forces the compiler to always check for the special zero length
attribute @code{gnu.gcj.gcj-compiled} in @code{java.lang.Object} and
issue an error if it isn't found.
+
+@item -fsource=@var{VERSION}
+This option is used to choose the source version accepted by
+@command{gcj}. The default is @samp{1.5}.
@end table
@node Encodings
@@ -457,6 +461,11 @@
The actual file name to be compiled this way must be specified
separately.
+@item -ftarget=@var{VERSION}
+This can be used with @option{-C} to choose the version of bytecode
+emitted by @command{gcj}. The default is @samp{1.5}. When not
+generating bytecode, this option has no effect.
+
@item -d @var{directory}
When used with @code{-C}, this causes all generated @file{.class} files
to be put in the appropriate subdirectory of @var{directory}. By
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-23 18:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-23 18:19 [ecj] Patch: FYI: document -fsource and -ftarget + change defaults Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).