From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20309 invoked by alias); 23 Jun 2006 18:19:26 -0000 Received: (qmail 20289 invoked by uid 22791); 23 Jun 2006 18:19:25 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 23 Jun 2006 18:19:23 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5NIJL6e025775; Fri, 23 Jun 2006 14:19:21 -0400 Received: from opsy.redhat.com (vpn50-162.rdu.redhat.com [172.16.50.162]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5NIJKsn005301; Fri, 23 Jun 2006 14:19:20 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id E0079714539; Fri, 23 Jun 2006 12:15:55 -0600 (MDT) To: Java Patch List Cc: Gcc Patch List Subject: [ecj] Patch: FYI: document -fsource and -ftarget + change defaults From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Fri, 23 Jun 2006 18:19:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2006-q2/txt/msg00476.txt.bz2 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 * 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