public inbox for
 help / color / mirror / Atom feed
From: Bryce McKinlay <>
To: Li junsong <>
Cc: Andrew Pinski <>,
Subject: Re: Why GCJ won't load my plugin when compiling bytecode?
Date: Fri, 09 Sep 2011 22:24:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, Sep 9, 2011 at 10:57 PM, Li junsong <> wrote:

> I chose gcj to write plugin to do optimization. So I need its .class
> files output, but not its binary code.

Modern versions of gcj only compile .class files to object code. gcj
doesn't directly compile Java source code, nor generate bytecode.
(early versions of gcj did do these things, but it was changed years

When you give it .java source files, gcj actually first calls out to
regular java compiler, then compiles the resulting .class files. You
can see the commands its running by adding -v to your command line.

> If I do not get it wrong, it means that If I want to do such
> optimization and measure
> the outcome, I have to look for other compilers, ( since GCC plugins
> won't work ) right?

That's right. A gcc plugin will never have a chance to run when using
"gcj -C" because the gcc compiler itself is not run.


  reply	other threads:[~2011-09-09 22:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09 20:57 Li junsong
2011-09-09 21:03 ` Andrew Pinski
2011-09-09 21:57   ` Li junsong
2011-09-09 22:24     ` Bryce McKinlay [this message]
2011-09-09 23:03       ` Li junsong
2011-09-12  0:49       ` Alan Eliasen
2011-09-12  0:54         ` Mark Mielke
2011-09-12  9:32         ` Bryce McKinlay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).