enable static libgcj on darwin

Adam Megacz megacz@cs.berkeley.edu
Wed Dec 27 04:58:00 GMT 2006


This patch makes static libgcj builds work on Darwin.

Since darwin doesn't have a crtbegin.o/crtend.o (gcc only supports
this for COFF and ELF), the jcr section doesn't really work.  Until
there is support for Mach-O in crtbegin/end, we need to fall back to
alternative methods of getting classes registered.

Ok to commit?

  - a

Index: gcc/config/i386/darwin.h
===================================================================
--- gcc/config/i386/darwin.h    (revision 120174)
+++ gcc/config/i386/darwin.h    (working copy)
@@ -51,6 +51,8 @@
     }                                           \
   while (0)
 
+#define TARGET_USE_JCR_SECTION 0
+
 #undef PTRDIFF_TYPE
 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
 



More information about the Java-patches mailing list