diff options
author | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-13 16:23:11 +0000 |
---|---|---|
committer | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-13 16:23:11 +0000 |
commit | b061dab231b806bfa80134a11b0a55524ddcdcef (patch) | |
tree | fbcc4f4a9f2fcf4816b6055b5e2b235c10e3d758 /boehm-gc | |
parent | fe2a2cce250aa22ac2692f7feda446a5df7d622d (diff) | |
download | gcc-b061dab231b806bfa80134a11b0a55524ddcdcef.tar.gz |
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 'boehm-gc')
-rw-r--r-- | boehm-gc/ChangeLog | 8 | ||||
-rw-r--r-- | boehm-gc/include/gc_config_macros.h | 2 | ||||
-rw-r--r-- | boehm-gc/win32_threads.c | 10 |
3 files changed, 18 insertions, 2 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index 1b5c92d878b..50a0802d9d8 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,11 @@ +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. + 2014-04-22 Jakub Jelinek <jakub@redhat.com> PR other/43620 diff --git a/boehm-gc/include/gc_config_macros.h b/boehm-gc/include/gc_config_macros.h index fd3006c1789..a01da4a1342 100644 --- a/boehm-gc/include/gc_config_macros.h +++ b/boehm-gc/include/gc_config_macros.h @@ -23,7 +23,7 @@ defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \ defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \ defined(GC_AIX_THREADS) || \ - (defined(GC_WIN32_THREADS) && defined(__CYGWIN32__)) + (defined(GC_WIN32_THREADS) && defined(__CYGWIN__)) # define GC_PTHREADS # endif diff --git a/boehm-gc/win32_threads.c b/boehm-gc/win32_threads.c index ffb34e0a8b1..2de1c6953b8 100644 --- a/boehm-gc/win32_threads.c +++ b/boehm-gc/win32_threads.c @@ -365,7 +365,11 @@ void GC_push_all_stacks() # define PUSH1(reg) GC_push_one((word)context.reg) # define PUSH2(r1,r2) PUSH1(r1), PUSH1(r2) # define PUSH4(r1,r2,r3,r4) PUSH2(r1,r2), PUSH2(r3,r4) -# if defined(I386) +# if defined(__x86_64__) + PUSH4(Rdi,Rsi,Rbx,Rdx), PUSH2(Rcx,Rax), PUSH1(Rbp); + PUSH4(R8,R9,R10,R11), PUSH4(R12,R13,R14,R15); + sp = (ptr_t)context.Rsp; +# elif defined(I386) PUSH4(Edi,Esi,Ebx,Edx), PUSH2(Ecx,Eax), PUSH1(Ebp); sp = (ptr_t)context.Esp; # elif defined(ARM32) @@ -755,8 +759,12 @@ int GC_pthread_detach(pthread_t thread) GC_PTR GC_get_thread_stack_base() { +#ifdef __x86_64__ + return ((NT_TIB*)NtCurrentTeb())->StackBase; +#else extern GC_PTR _tlsbase __asm__ ("%fs:4"); return _tlsbase; +#endif } #else /* !CYGWIN32 */ |