public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dave Korn <dave.korn.cygwin@googlemail.com>
To: java-patches@gcc.gnu.org
Subject: [RFC] Fix PR38892: "--enable-libgcj-debug" breaks bootstrap.
Date: Wed, 22 Apr 2009 19:14:00 -0000	[thread overview]
Message-ID: <49EF6F29.2000601@gmail.com> (raw)

[ Not subbed, please CC me on replies. ]

    Hello Java team,

  This is the second point at which bootstrap fails for me with libgcj
debug-enabled:

In file included from /gnu/gcc/gcc/libjava/gnu/classpath/natConfiguration.cc:17:
/gnu/gcc/gcc/libjava/gnu/classpath/Configuration.h:32: error: expected
unqualified-id before numeric constant
make[3]: *** [gnu/classpath/natConfiguration.lo] Error 1

  If you look at the relevant source:

    21  class gnu::classpath::Configuration : public ::java::lang::Object
    22  {
    23
    24    Configuration();
    25    static ::java::lang::String * classpath_home();
    26    static jboolean debug();
    27    static ::java::lang::String * toolkit();
    28    static ::java::lang::String * ecj();
    29  public:
    30    static ::java::lang::String * CLASSPATH_HOME;
    31    static ::java::lang::String * CLASSPATH_VERSION;
    32    static jboolean DEBUG;

... you can probably guess immediately what went wrong:

  8592    static jboolean 1;

owing to a "#define DEBUG 1" in include/config.h, autogenerated by configure.

  So there's a preprocessor macro DEBUG that is tested by #ifdefs in
classpath/native and the toplevel intepret*.cc files, and there are a number
of these DEBUG member vars scattered through the java sources.

  One solution that occurred to me was to rename the preprocesser macro to
(e.g.) "__GCJ_DEBUG" throughout.

  Another solution that occurred to me was to rename the java class members to
(e.g.) "JDEBUG" throughout.

  What would the maintainers prefer?  Either, both, or perhaps some other option?

    cheers,
      DaveK

             reply	other threads:[~2009-04-22 19:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22 19:14 Dave Korn [this message]
2009-04-22 22:51 ` Tom Tromey
2009-04-22 22:53   ` Dave Korn
2009-04-22 23:02   ` Dave Korn
2009-04-23  1:05     ` Tom Tromey
2009-04-23  2:33       ` Dave Korn
2009-04-26  0:18         ` Tom Tromey
2009-04-26  1:00           ` Dave Korn
2009-04-27 12:22             ` Dave Korn
2009-04-27 22:12               ` Tom Tromey
2009-04-28  4:04                 ` Dave Korn

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=49EF6F29.2000601@gmail.com \
    --to=dave.korn.cygwin@googlemail.com \
    --cc=java-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).