aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authoredlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-13 16:23:11 +0000
committeredlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-13 16:23:11 +0000
commitb061dab231b806bfa80134a11b0a55524ddcdcef (patch)
treefbcc4f4a9f2fcf4816b6055b5e2b235c10e3d758 /libjava
parentfe2a2cce250aa22ac2692f7feda446a5df7d622d (diff)
Enable Java on Cygwin-64
Currently it is not possible to build GCC's libjava support on Cygwin-64. This patch fixes the current build-problems on Cygwin-64 and the most fundamental bugs on that platform. Note you must still add --enable-threads=posix to successfully build the java language support. boehm-gc/ChangeLog: 2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de> Fix current cygwin-64 build problems. * include/gc_config_macros.h (GC_PTHREADS): Use __CYGWIN__ instead of __CYGWIN32__ here. * win32_threads.c (GC_push_all_stacks): Push all X86_64 registers. (GC_get_thread_stack_base): Get the stack base for X86_64. libffi/ChangeLog: 2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de> Fix current cygwin-64 build problems. * src/java_raw_api.c: Remove if !defined(FFI_NO_RAW_API). * src/x86/ffi.c: Add if defined(__CYGWIN__). * src/x86/win64.S (ffi_closure_win64, ffi_call_win64): Added handling for FFI_TYPE_UINT64, FFI_TYPE_POINTER and FFI_TYPE_INT. Added SEH information. Fixed formatting. libgcc/ChangeLog: 2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de> * unwind-seh.c (_Unwind_Backtrace): Uncommented, finished implementation. libjava/ChangeLog: 2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de> Fix current cygwin-64 build problems. * configure.host: Added handling for x86_64-*-cygwin/mingw. * boehm.cc (_Jv_GCAttachThread, _Jv_GCDetachThread): Don't compile if GC_WIN32_THREADS is defined. * java/lang/natClass.cc (_Jv_InterfaceAssignableFrom): Rename interface to source_interface. libjava/classpath/ChangeLog: 2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de> Fix current cygwin-64 build problems. * native/fdlibm/mprec.c (_REENT_CHECK_MP, _REENT_MP_FREELIST, _REENT_MP_P5S, __ULong, __Long): Undefine previous definitions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210386 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog9
-rw-r--r--libjava/boehm.cc6
-rw-r--r--libjava/classpath/ChangeLog6
-rw-r--r--libjava/classpath/native/fdlibm/mprec.c9
-rw-r--r--libjava/configure.host7
-rw-r--r--libjava/java/lang/natClass.cc6
6 files changed, 36 insertions, 7 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 661bb7a30c1..0bedfed271d 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,12 @@
+2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ Fix current cygwin-64 build problems.
+ * configure.host: Added handling for x86_64-*-cygwin/mingw.
+ * boehm.cc (_Jv_GCAttachThread, _Jv_GCDetachThread): Don't compile if
+ GC_WIN32_THREADS is defined.
+ * java/lang/natClass.cc (_Jv_InterfaceAssignableFrom): Rename interface
+ to source_interface.
+
2014-04-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (THREADLIBS, THREADSPEC): Remove *-*-solaris2.9
diff --git a/libjava/boehm.cc b/libjava/boehm.cc
index 855d23cb024..043fd0030ca 100644
--- a/libjava/boehm.cc
+++ b/libjava/boehm.cc
@@ -747,7 +747,8 @@ _Jv_GCAttachThread ()
// The registration interface is only defined on posixy systems and
// only actually works if pthread_getattr_np is defined.
// FIXME: until gc7 it is simpler to disable this on solaris.
-#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS)
+#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS) \
+ && !defined(GC_WIN32_THREADS)
GC_register_my_thread ();
#endif
}
@@ -755,7 +756,8 @@ _Jv_GCAttachThread ()
void
_Jv_GCDetachThread ()
{
-#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS)
+#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS) \
+ && !defined(GC_WIN32_THREADS)
GC_unregister_my_thread ();
#endif
}
diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog
index 4d9f1a6e49c..4389fc05507 100644
--- a/libjava/classpath/ChangeLog
+++ b/libjava/classpath/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ Fix current cygwin-64 build problems.
+ * native/fdlibm/mprec.c (_REENT_CHECK_MP, _REENT_MP_FREELIST,
+ _REENT_MP_P5S, __ULong, __Long): Undefine previous definitions.
+
2013-09-20 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
diff --git a/libjava/classpath/native/fdlibm/mprec.c b/libjava/classpath/native/fdlibm/mprec.c
index 8a7cdc03968..460c301054d 100644
--- a/libjava/classpath/native/fdlibm/mprec.c
+++ b/libjava/classpath/native/fdlibm/mprec.c
@@ -93,12 +93,17 @@
#define _reent _Jv_reent
#define _Bigint _Jv_Bigint
+#undef _REENT_CHECK_MP
#define _REENT_CHECK_MP(x)
+#undef _REENT_MP_FREELIST
#define _REENT_MP_FREELIST(x) ((x)->_freelist)
+#undef _REENT_MP_P5S
#define _REENT_MP_P5S(x) ((x)->_p5s)
-typedef unsigned long __ULong;
-typedef long __Long;
+#undef __ULong
+#define __ULong unsigned long
+#undef __Long
+#define __Long long
static void *
mprec_calloc (void *ignore, size_t x1, size_t x2)
diff --git a/libjava/configure.host b/libjava/configure.host
index f2d1bb5ed3b..c6f359c5492 100644
--- a/libjava/configure.host
+++ b/libjava/configure.host
@@ -365,6 +365,13 @@ EOF
esac
case "${host}" in
+ x86_64-*-cygwin* | x86_64-*-mingw*)
+ # Win32 DLLs are limited to 64k exported symbols each.
+ enable_libgcj_sublibs_default=yes
+ libgcj_sublib_ltflags='$(lt_host_flags) \
+ -Wl,-u,_ZN3org4ietf4jgss10GSSManagerC1Ev,-L..,-lgcj-noncore-dummy'
+ libgcj_sublib_core_extra_deps=libgcj-noncore-dummy.dll.a
+ ;;
*-cygwin* | *-mingw*)
fallback_backtrace_h=sysdep/i386/backtrace.h
# We need a frame pointer on Windows, so override BACKTRACESPEC
diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc
index b5ad91f2252..00766d0b102 100644
--- a/libjava/java/lang/natClass.cc
+++ b/libjava/java/lang/natClass.cc
@@ -1870,9 +1870,9 @@ _Jv_InterfaceAssignableFrom (jclass source, jclass iface)
{
for (int i = 0; i < source->interface_count; i++)
{
- jclass interface = source->interfaces[i];
- if (iface == interface
- || _Jv_InterfaceAssignableFrom (interface, iface))
+ jclass source_interface = source->interfaces[i];
+ if (iface == source_interface
+ || _Jv_InterfaceAssignableFrom (source_interface, iface))
return true;
}