public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Fwd: [PATCH] Fix boehm-gc build on Cygwin]
@ 2009-05-17  5:31 Dave Korn
  0 siblings, 0 replies; only message in thread
From: Dave Korn @ 2009-05-17  5:31 UTC (permalink / raw)
  To: java-patches

[-- Attachment #1: Type: text/plain, Size: 1555 bytes --]


  Originally sent this to gcc-patches@, but it occurs to me I should maybe
send it to the java list.  Ping?

-------- Original Message --------
Subject: [PATCH] Fix boehm-gc build on Cygwin
Date: Sat, 09 May 2009 18:06:59 +0100
From: Dave Korn <dave.korn.cygwin@googlemail.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>


    Hi all,

  Boehm-gc doesn't currently build correctly on Cygwin; it's ok for objc, but
libjava wants to use an interface that isn't currently fully implemented:

../boehm-gc/.libs/libgcjgc_convenience.a(misc.o): In function `GC_init_inner':
/gnu/gcc/gcc/boehm-gc/misc.c:680: undefined reference to
`_GC_get_thread_stack_base'
collect2: ld returned 1 exit status

make[3]: *** [libgcj.la] Error 1

  With the attached patch (which I've had in my local tree for some time now),
it not only builds (and allows libjava to build) but passes its tests:

Completed 3 tests
Allocated 5694334 collectable objects
Allocated 306 uncollectable objects
Allocated 3557803 atomic objects
Allocated 34418 stubborn objects
Finalized 6603/6603 objects - finalization is probably ok
Total number of bytes allocated is 192747548
Final heap size is 16338944 bytes
Collector appears to work
Completed 137 collections
PASS: gctest
==================
All 1 tests passed
==================

  Tested by building (non-bootstrap, since this is a target lib) with
--enable-languages=c,c++,java, and running check-target-boehm-gc.

boehm-gc/ChangeLog:

	* win32_threads.c (GC_get_thread_stack_base):  Implement for Cygwin.

  Ok?

    cheers,
      DaveK



[-- Attachment #2: gc-cygwin-fix.diff --]
[-- Type: text/x-c, Size: 375 bytes --]

Index: boehm-gc/win32_threads.c
===================================================================
--- boehm-gc/win32_threads.c	(revision 147215)
+++ boehm-gc/win32_threads.c	(working copy)
@@ -753,6 +753,12 @@
     return result;
 }
 
+GC_PTR GC_get_thread_stack_base()
+{
+  extern GC_PTR _tlsbase __asm__ ("%fs:4");
+  return _tlsbase;
+}
+
 #else /* !CYGWIN32 */
 
 /*


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-17  5:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-17  5:31 [Fwd: [PATCH] Fix boehm-gc build on Cygwin] Dave Korn

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