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]

Re: No console output: gcj Windows cross-compiler


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel M Coffman wrote:
> I have recently built a Windows cross-compiler for gcj 4.1.0 on Fedora Core
[...]
> however, does not.  The Windows machine loads the executable, or at least
> seems to, but it produces no output.  The program merely exits.

After seeing your message, I built a cross-compiler on Linux for
MinGW (i686-pc-mingw32) using FSF binutils 2.16.1, mingw-runtime
3.9, w32api 3.6 and mainline GCC (to be released as 4.2).

The "hello world" Java program created by this GCJ crashes
unceremoniously because the "fallback_backtrace" function
uses %ebp and libgcj is built using -fomit-frame-pointer
as pointed by "dpr" in:

  http://gcc.gnu.org//ml/java/2006-02/msg00047.html

So I applied this change:
- ---------------------------- 8< ----------------------------
Index: configure.host
===================================================================
- --- configure.host      (revision 112695)
+++ configure.host      (working copy)
@@ -260,6 +260,7 @@ EOF
        slow_pthread_self=
        ;;
   *-mingw*)
+       libgcj_flags="${libgcj_flags} -fno-omit-frame-pointer"
        # FIXME: win32_exception_handler( ) in win32.cc does not do the
        # right stuff yet w.r.t. SEH. Live with the following for now.
        can_unwind_signal=no
- ---------------------------- 8< ----------------------------

and rebuilt libgcj. This time the "hello world" Java program
actually printed "Hello World!". I didn't do any more testing
of this GCJ.

HTH,
Ranjit.

- --
Ranjit Mathew      Email: rmathew AT gmail DOT com

Bangalore, INDIA.    Web: http://rmathew.com/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEM54qYb1hx2wRS48RArXxAJsEE5GRM2L4Id15N2kAYn8xDcMUIgCfcv80
Ug1uY+xIgqFLfP3CAMct2n8=
=EyG3
-----END PGP SIGNATURE-----


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