gcc/boehm-gc/include/gc_config_macros.h
Bernd Edlinger 54fde020cc 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.

From-SVN: r210386
2014-05-13 16:23:11 +00:00

120 lines
3.3 KiB
C

/*
* This should never be included directly. It is included only from gc.h.
* We separate it only to make gc.h more suitable as documentation.
*/
#if !defined(_REENTRANT) && (defined(GC_SOLARIS_THREADS) \
|| defined(GC_SOLARIS_PTHREADS) \
|| defined(GC_HPUX_THREADS) \
|| defined(GC_AIX_THREADS) \
|| defined(GC_LINUX_THREADS) \
|| defined(GC_GNU_THREADS))
# define _REENTRANT
/* Better late than never. This fails if system headers that */
/* depend on this were previously included. */
#endif
#if defined(GC_DGUX386_THREADS) && !defined(_POSIX4A_DRAFT10_SOURCE)
# define _POSIX4A_DRAFT10_SOURCE 1
#endif
# if defined(GC_SOLARIS_PTHREADS) || defined(GC_FREEBSD_THREADS) || \
defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
defined(GC_GNU_THREADS) || \
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(__CYGWIN__))
# define GC_PTHREADS
# endif
#if defined(GC_THREADS) && !defined(GC_PTHREADS)
# if defined(__linux__)
# define GC_LINUX_THREADS
# define GC_PTHREADS
# endif
# if !defined(LINUX) && (defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \
|| defined(hppa) || defined(__HPPA))
# define GC_HPUX_THREADS
# define GC_PTHREADS
# endif
# if !defined(__linux__) && (defined(__alpha) || defined(__alpha__))
# define GC_OSF1_THREADS
# define GC_PTHREADS
# endif
# if defined(__mips) && !defined(__linux__)
# define GC_IRIX_THREADS
# define GC_PTHREADS
# endif
# if defined(__sparc) && !defined(__linux__)
# define GC_SOLARIS_PTHREADS
# define GC_PTHREADS
# endif
# if defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
# define GC_DARWIN_THREADS
# define GC_PTHREADS
# endif
# if !defined(GC_PTHREADS) && defined(__FreeBSD__)
# define GC_FREEBSD_THREADS
# define GC_PTHREADS
# endif
# if defined(DGUX) && (defined(i386) || defined(__i386__))
# define GC_DGUX386_THREADS
# define GC_PTHREADS
# endif
# if defined(_AIX)
# define GC_AIX_THREADS
# define GC_PTHREADS
# endif
#endif /* GC_THREADS */
#if defined(GC_THREADS) && !defined(GC_PTHREADS) && \
(defined(_WIN32) || defined(_MSC_VER) || defined(__CYGWIN__) \
|| defined(__MINGW32__) || defined(__BORLANDC__) \
|| defined(_WIN32_WCE))
# define GC_WIN32_THREADS
#endif
# define __GC
# ifndef _WIN32_WCE
# include <stddef.h>
# else /* ! _WIN32_WCE */
/* Yet more kluges for WinCE */
# include <stdlib.h> /* size_t is defined here */
typedef long ptrdiff_t; /* ptrdiff_t is not defined */
# endif
#if ((defined(_DLL) && !defined (__MINGW32__)) \
|| (defined (DLL_EXPORT) && defined (GC_BUILD))) \
&& !defined(GC_DLL)
# define GC_DLL
#endif
#if defined(__MINGW32__) && defined(GC_DLL)
# ifdef GC_BUILD
# define GC_API __declspec(dllexport)
# else
# define GC_API __declspec(dllimport)
# endif
#endif
#if (defined(__DMC__) || defined(_MSC_VER)) && defined(GC_DLL)
# ifdef GC_BUILD
# define GC_API extern __declspec(dllexport)
# else
# define GC_API __declspec(dllimport)
# endif
#endif
#if defined(__WATCOMC__) && defined(GC_DLL)
# ifdef GC_BUILD
# define GC_API extern __declspec(dllexport)
# else
# define GC_API extern __declspec(dllimport)
# endif
#endif
#ifndef GC_API
#define GC_API extern
#endif