summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Fix CMake build on macOS CatalinaIvan Maidanski2021-08-211-7/+0
| | | | | | | | (a cherry-pick of commit 981fd4057 from 'master') Issue #319 (bdwgc). * CMakeLists.txt [APPLE] (CMAKE_OSX_ARCHITECTURES): Do not set.
* Fix missing specific.c in CMake scriptIvan Maidanski2021-08-211-1/+1
| | | | | | | (a cherry-pick of commit 6668de8af from 'master') * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && enable_thread_local_alloc] (SRC): Add specific.c file.
* Fix missing gc_dlopen.c in CMake scriptMahder Gebremedhin2021-08-211-1/+2
| | | | | | | | | | | | | (a cherry-pick of commit af4b03570 from 'master') Issue #336 (bdwgc). The source file gc_dlopen.c is not listed in the SRC variable of the cmake configuration. This leads to undefined references of GC_dlopen when the library is built as a STATIC library. This patch fixes the issue. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT] (SRC): Add gc_dlopen.c file.
* Remove gcmt-lib generation by CMakeIvan Maidanski2019-06-271-4/+0
| | | | | | | | | (a cherry-pick of commit 491e6ac0 from 'master') Because of an incorrect definition, gcmt-lib was identical to gc-lib. * CMakeLists.txt (gcmt-lib): Remove add_library and set_target_properties commands.
* Fix build for OS X (CMake)Victor Romero2019-06-271-1/+2
| | | | | | | | | | | | | (a cherry-pick of commit f73611c2 from 'master') Issue #275 (bdwgc). Having "ppc" in CMAKE_OSX_ARCHITECTURES fails the build on Mac OS X 10.13, at least. * CMakeLists.txt [APPLE && $CMAKE_OSX_ARCHITECTURES==""] (CMAKE_OSX_ARCHITECTURES): Set to "x86_64;i386" (instead of "ppc;i386;x86_64").
* Support MSYS builds by CMakeIvan Maidanski2019-03-261-2/+2
| | | | | | | | | | | | | * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=.*-.*-msys.*] (GC_THREADS, _REENTRANT): Define macro. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=.*-.*-msys.* && enable_parallel_mark] (PARALLEL_MARK): Likewise. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=.*-.*-msys.* && enable_thread_local_alloc] (THREAD_LOCAL_ALLOC): Likewise. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=.*-.*-msys.* && enable_thread_local_alloc] (SRC): Add thread_local_alloc.c. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=.*-.*-msys.*] (SRC): Add win32_threads.c.
* Fix comment typo in CMakeLists.txtIvan Maidanski2018-09-281-1/+1
| | | | | * CMakeLists.txt (CMAKE_USE_PTHREADS_INIT): Fix typo ("lib and includes") in comment.
* Allow register_main_static_data disabling in CMake scriptIvan Maidanski2018-07-311-0/+5
| | | | | | | * CMakeLists.txt (enable_register_main_static_data): New OPTION (on by default). * CMakeLists.txt [!enable_register_main_static_data]: Define GC_DONT_REGISTER_MAIN_STATIC_DATA macro.
* Allow dynamic_loading disabling in CMake scriptIvan Maidanski2018-07-311-0/+5
| | | | | | * CMakeLists.txt (enable_dynamic_loading): New OPTION (on by default). * CMakeLists.txt [!enable_dynamic_loading]: Define IGNORE_DYNAMIC_LOADING macro.
* Allow mmap enabling in CMake scriptIvan Maidanski2018-07-311-1/+5
| | | | | * CMakeLists.txt (enable_mmap): New OPTION (off by default). * CMakeLists.txt [!enable_munmap && enable_mmap]: Define USE_MMAP macro.
* Allow threads_discovery disabling in CMake scriptIvan Maidanski2018-07-311-0/+5
| | | | | | * CMakeLists.txt (enable_threads_discovery): New OPTION (on by default). * CMakeLists.txt [!enable_threads_discovery]: Define GC_NO_THREADS_DISCOVERY macro.
* Fix wrong expression for ENDIF in CMakeLists.txtIvan Maidanski2018-07-301-1/+1
| | | | | | (fix of commit 1aabce0f9) * CMakeLists.txt [enable_checksums]: Remove enable_threads for ENDIF.
* Fix build for Android after enabling handle-fork by defaultIvan Maidanski2018-07-111-1/+3
| | | | | | | | | | | (fix of commit 686a667) Issue #174 (bdwgc). * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT]: Do not define HANDLE_FORK macro for android host. * configure.ac [$enable_handle_fork!=yes/no/manual && THREADS=xposix]: Likewise.
* Remove stubborn.c fileIvan Maidanski2018-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (code refactoring) * BCC_MAKEFILE (XXXOBJS): Remove XXXstubborn.obj entry. * CMakeLists.txt (SRC): Remove stubborn.c entry. * Makefile.am (libgc_la_SOURCES): Likewise. * Makefile.direct (CSRCS): Likewise. * PCR-Makefile (CSRC): Likewise. * build/s60v3/libgc.mmp (SOURCE): Likewise. * doc/README.Mac (Files to build the GC libraries): Likewise. * Makefile.direct (OBJS): Remove stubborn.o entry. * PCR-Makefile (COBJ): Likewise. * SMakefile.amiga (OBJS): Likewise. * digimars.mak (OBJS): Likewise. * NT_MAKEFILE (OBJS): Remove stubborn.obj entry. * OS2_MAKEFILE (OBJS): Likewise. * WCC_MAKEFILE (OBJS): Likewise. * SMakefile.amiga (stubborn.o): Remove rule. * digimars.mak (stubborn.obj): Likewise. * extra/gc.c: Do not include stubborn.c. * gc.mak: Remove rules for stubborn.obj and stubborn.sbr. * mallocx.c [MANUAL_VDB] (GC_dirty): Move the function declaration from stubborn.c. * mallocx.c (GC_malloc_stubborn, GC_change_stubborn, GC_end_stubborn_change): Move the function implementation from stubborn.c. * stubborn.c: Delete file.
* Enable memory unmapping by defaultIvan Maidanski2018-04-141-1/+6
| | | | | | | | | | | | | | | Issue #152 (bdwgc). * CMakeLists.txt (enable_munmap): New OPTION (on by default). * CMakeLists.txt [enable_munmap] (USE_MMAP, USE_MUNMAP): Define macro. * CMakeLists.txt [enable_checksums && enable_munmap): Issue MESSAGE that CHECKSUMS is not compatible with USE_MUNMAP. * configure.ac (AC_ARG_ENABLE(munmap)): Update the help message. * configure.ac [$enable_munmap=""]: Treat as enable_munmap="yes". * configure.ac [$MUNMAP_THRESHOLD=""]: Treat as MUNMAP_THRESHOLD="yes". * doc/README.win32 (GNU Tools): Note about "--disable-munmap" option. * doc/debugging.md (Unexpectedly Large Heap): Remove advice about "--enable-munmap" option.
* Fix 'unexpected newline after ELSE' CMake errorIvan Maidanski2018-04-131-1/+1
| | | | | | (fix of commit 32479d59c) * CMakeLists.txt [enable_redirect_malloc]: Fix ELSE directive syntax.
* Comment out unused enable_cplusplus option in CMake scriptIvan Maidanski2018-04-131-2/+3
| | | | | | | | | (code refactoring) Note: gc_cpp.cc is always compiled by CMake. * CMakeLists.txt (enable_cplusplus): Comment out OPTION. * CMakeLists.txt (SRC): Move addition of gc_cpp.cc to a separate line.
* Allocate non-executable memory by default (CMake)Ivan Maidanski2018-04-131-1/+1
| | | | * CMakeLists.txt (NO_EXECUTE_PERMISSION): Define macro.
* Turn on atomic uncollectable functionality by default (CMake)Ivan Maidanski2018-04-131-0/+5
| | | | | | | * CMakeLists.txt (enable_atomic_uncollectable): New OPTION (on by default). * CMakeLists.txt [enable_atomic_uncollectable] (GC_ATOMIC_UNCOLLECTABLE): Define macro.
* Turn on gcj, disclaim and java finalization by default (CMake)Ivan Maidanski2018-04-131-1/+12
| | | | | | | | | | * CMakeLists.txt (enable_gcj_support): Enable by default. * CMakeLists.txt (enable_disclaim, enable_java_finalization): New OPTION (on by default). * CMakeLists.txt [enable_disclaim] (ENABLE_DISCLAIM): Define macro. * CMakeLists.txt [enable_java_finalization] (JAVA_FINALIZATION): Likewise. * CMakeLists.txt [enable_disclaim] (SRC): Add fnlz_mlc.c entry.
* Allow gc_assertions enabling in CMake scriptIvan Maidanski2018-04-131-0/+5
| | | | | * CMakeLists.txt (enable_gc_assertions): New OPTION, off by default. * CMakeLists.txt [enable_gc_assertions] (GC_ASSERTIONS): Define macro.
* Allow gc_debug, redirect_malloc, large_config options in CMake scriptIvan Maidanski2018-04-131-0/+31
| | | | | | | | | | | | | | | | * CMakeLists.txt (enable_gc_debug, enable_redirect_malloc, enable_large_config): New OPTION (off by default). * CMakeLists.txt [enable_gc_debug] (DBG_HDRS_ALL, KEEP_BACK_PTRS): Define macro. * CMakeLists.txt [enable_redirect_malloc] (REDIRECT_MALLOC, REDIRECT_REALLOC, REDIRECT_FREE, GC_USE_DLOPEN_WRAP): Likewise. * CMakeLists.txt [enable_large_config] (LARGE_CONFIG): Likewise. * CMakeLists.txt [enable_gc_debug] (MAKE_BACK_GRAPH): Define macro if host is Linux or DG/UX. * CMakeLists.txt [enable_gc_debug] (SAVE_CALL_COUNT): Define macro to 8 if host is Linux. * CMakeLists.txt [enable_gc_debug] (SRC): Add backgraph.c if host is Linux or DG/UX.
* Do not match kFreeBSD by FreeBSD host string pattern (CMake/configure)Ivan Maidanski2018-04-061-1/+1
| | | | | | | | | | | (code refactoring of commit 686a66731) Issue #174 (bdwgc). * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && enable_handle_fork]: Replace ".*-.*-.*freebsd.*" to ".*-.*-freebsd.*". * configure.ac [$enable_handle_fork=auto && $THREADS=posix]: Replace "*-*-*freebsd*" to "*-*-freebsd*".
* Enable handle-fork by defaultIvan Maidanski2018-03-291-0/+13
| | | | | | | | | | | | | | | | | | | Issue #174 (bdwgc). * CMakeLists.txt (enable_handle_fork): New option (on by default). * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && enable_handle_fork]: Define HANDLE_FORK macro for aix, cygwin, freebsd, haiku, hpux11, irix, kfreebsd, linux, netbsd, openbsd, osf, solaris hosts. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-darwin* && enable_handle_fork && enable_parallel_mark]: Define HANDLE_FORK macro; add comment. * configure.ac (AC_ARG_ENABLE(handle-fork)): Allow "auto" and "manual" values; update help message. * configure.ac [$enable_handle_fork!=yes && $enable_handle_fork!=no && $enable_handle_fork!=manual && $THREADS=posix]: Define HANDLE_FORK macro for aix, cygwin, freebsd, haiku, hpux11, irix, kfreebsd, linux, netbsd, openbsd, osf, solaris hosts (and also for darwin if enable_parallel_mark); add comment.
* Support Haiku multi-threaded build by CMakeIvan Maidanski2018-03-281-1/+1
| | | | | | | | | | | Issue #97 (bdwgc). * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-haiku*]: Define GC_THREADS and _REENTRANT macros. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-haiku* && enable_parallel_mark]: Define PARALLEL_MARK macro. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-haiku* && enable_thread_local_alloc]: Define THREAD_LOCAL_ALLOC macro.
* Accept Android platform by both CMake and configureIvan Maidanski2018-03-271-7/+2
| | | | | | | | | | | | | | | | | | | (fix of commit 1680d91) * CMakeLists.txt (_HOST): Adjust FIXME comment. * CMakeLists.txt (HOST): Remove replacement of "android" to "linux". * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-android*]: Define GC_THREADS and _REENTRANT macros. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-android* && enable_parallel_mark]: Define PARALLEL_MARK macro. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-android* && enable_thread_local_alloc]: Define THREAD_LOCAL_ALLOC macro. * configure.ac [$THREADS=posix && $host=*-*-android*] (GC_THREADS, _REENTRANT): Define macro. * configure.ac [$THREADS=posix && $host=*-*-android* && $enable_parallel_mark] (PARALLEL_MARK): Likewise. * configure.ac [$THREADS=posix && $host=*-*-android* && $enable_thread_local_alloc] (THREAD_LOCAL_ALLOC): Likewise.
* Treat Android platform as Linux (CMake)Alexis Laferriere2018-01-181-0/+4
| | | | | * CMakeLists.txt (HOST): Replace "android" string (if present) to "linux".
* Rename with_checksums to enable_checksums option in CMake scriptIvan Maidanski2017-07-061-3/+3
| | | | | | (refactoring of commit 4530166) * CMakeLists.txt (with_checksums): Rename to enable_checksums.
* Support with_checksums option in CMake scriptIvan Maidanski2017-06-091-0/+8
| | | | | | | | * CMakeLists.txt (with_checksums): New option (off by default). * CMakeLists.txt [with_checksums && enable_threads]: Issue MESSAGE that the configuration is not supported. * CMakeLists.txt [with_checksums] (CHECKSUMS): Define macro. * CMakeLists.txt [with_checksums] (SRC): Add checksums.c.
* Support configure --disable-thread-local-alloc option (similar for CMake)Ivan Maidanski2017-06-081-4/+11
| | | | | | | | | | | | | | | | | | * CMakeLists.txt (enable_thread_local_alloc): New option (on by default). * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT || CMAKE_USE_WIN32_THREADS_INIT] (SRC): Add thread_local_alloc.c only if enable_thread_local_alloc. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT || CMAKE_USE_WIN32_THREADS_INIT]: Define THREAD_LOCAL_ALLOC macro only if enable_thread_local_alloc. * Makefile.am (libgc_la_SOURCES): Add thread_local_alloc.c only if THREAD_LOCAL_ALLOC. * configure.ac (thread-local-alloc): New option. * configure.ac: AC_DEFINE(THREAD_LOCAL_ALLOC) only if enable_thread_local_alloc is yes or unset. * configure.ac (THREAD_LOCAL_ALLOC): New AM_CONDITIONAL.
* Group common defines for POSIX platforms in configure and CMake scriptsIvan Maidanski2017-06-071-28/+4
| | | | | | | | | | | | (code refactoring) * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT]: Eliminate duplication of ADD_DEFINITIONS of GC_THREADS, _REENTRANT, PARALLEL_MARK, THREAD_LOCAL_ALLOC (and AC_MSG_WARN) for aix, cygwin, darwin, freebsd, gnu (including kfreebsd), hpux11, irix, linux, nacl, netbsd, openbsd, osf, solaris platforms; add comment. * configure.ac [THREADS=posix]: Likewise. * configure.ac [THREADS=posix]: Remove explicit hpux10 case handling.
* Define GC_THREADS instead of GC_x_THREADS in MakefilesIvan Maidanski2017-05-121-86/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (code refactoring) * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT] (SRC): Add thread_local_alloc.c in a single place. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT]: Define GC_THREADS macro instead of GC_LINUX_THREADS, GC_AIX_THREADS, GC_HPUX_THREADS, GC_OPENBSD_THREADS, GC_FREEBSD_THREADS, GC_NETBSD_THREADS, GC_SOLARIS_THREADS, GC_IRIX_THREADS, GC_DARWIN_THREADS, GC_OSF1_THREADS. * configure.ac [THREADS=posix]: Likewise. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT]: Handle *-*-aix*, *-*-*freebsd* (including kfreebsd), *-*-gnu*, *-*-irix*, *-*-openbsd*, *-*-osf*, *-*-solaris* targets in the same ways as *-*-*linux*. * Makefile.direct (CFLAGS): Do not mention GC_HPUX_THREADS in comment. * README.QUICK: Refine documentation about macro and configure option for builds with (and without) threads support. * configure.ac (GC_AIX_THREADS, GC_DARWIN_THREADS, GC_FREEBSD_THREADS, GC_HPUX_THREADS, GC_IRIX_THREADS, GC_LINUX_THREADS, GC_NETBSD_THREADS, GC_OPENBSD_THREADS, GC_OSF1_THREADS, GC_SOLARIS_THREADS, GC_WIN32_THREADS, GC_RTEMS_PTHREADS): Remove AH_TEMPLATE. * configure.ac [THREADS=posix]: Handle *-*-aix*, *-*-irix* targets in the same ways as *-*-*linux*. * configure.ac [THREADS=win32 || THREADS=dgux386 || THREADS=aix || THREADS=rtems]: Define GC_THREADS macro instead of GC_WIN32_THREADS, GC_DGUX386_THREADS, GC_AIX_THREADS, GC_RTEMS_PTHREADS. * doc/README.darwin: Replace GC_MACOSX_THREADS with GC_THREADS. * doc/README.environment (doc/README.environment): Replace GC_OSF1_THREADS with OSF1. * doc/README.hp: Replace GC_HPUX_THREADS with GC_THREADS. * doc/README.linux: Replace GC_LINUX_THREADS with GC_THREADS. * doc/scale.html: Likewise. * doc/README.macros (GC_SOLARIS_THREADS, GC_IRIX_THREADS, GC_HPUX_THREADS, GC_LINUX_THREADS, GC_OSF1_THREADS, GC_FREEBSD_THREADS, GC_NETBSD_THREADS, GC_OPENBSD_THREADS, GC_DARWIN_THREADS, GC_AIX_THREADS, GC_DGUX386_THREADS, GC_WIN32_THREADS): Add note that the macro is deprecated (GC_THREADS one should be used instead). * doc/README.sgi: Replace GC_IRIX_THREADS with GC_THREADS. * doc/README.solaris2: Do not mention GC_SOLARIS_THREADS. * doc/gcinterface.html: Do not mention GC_XXXX_THREADS.
* Fix OSF1 host pattern in CMakeLists.txtIvan Maidanski2017-05-051-1/+1
| | | | | * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && osf]: Replace ".*-.*-osf*" pattern ".*-.*-osf.*" (a missing "." before "*" is added).
* Remove GC_GNU_THREADS macro (HURD)Ivan Maidanski2017-05-031-1/+1
| | | | | | | | | | | | | | | | (code refactoring) * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && *-*-gnu*] (GC_GNU_THREADS): Define GC_THREADS macro instead. * configure.ac [THREADS=posix && *-*-gnu*] (GC_GNU_THREADS): Likewise. * configure.ac (GC_GNU_THREADS): Remove AH_TEMPLATE. * include/gc_config_macros.h: Remove check for GC_GNU_THREADS. * include/private/gcconfig.h [!CPPCHECK]: Remove consistency check for GC_GNU_THREADS. * pthread_support.c [GC_PTHREADS && !GC_WIN32_THREADS] (GC_get_nprocs): Replace GC_GNU_THREADS to HURD macro check. * tools/threadlibs.c (main): Replace GC_GNU_THREADS to HURD and GC_THREADS macros check.
* Fix missing win32_threads.c compilation for Cygwin (CMake)Ivan Maidanski2017-05-031-4/+1
| | | | | | | * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && *-*-cygwin*] (SRC): Add win32_threads.c. * CMakeLists.txt (win32_threads): Remove commented out variable definition.
* Use thread-local allocations for all multi-threaded buildsIvan Maidanski2017-04-281-21/+16
| | | | | | | | | | | | | | | | | | | | | This change affects only builds by configure and CMake. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT]: Handle *-*-*linux* and *-*-nacl* targets in the same way as x86-*-linux*. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT] (THREAD_LOCAL_ALLOC): Define macro (and add thread_local_alloc.c to SRC) for *-*-aix*, *-*-hpux11*, *-*-openbsd*, *-*-freebsd*, *-*-netbsd*, *-*-irix* targets. * configure.ac [THREADS=posix] (THREAD_LOCAL_ALLOC): AC_DEFINE for *-*-*linux*, *-*-nacl*, *-*-aix*, *-*-openbsd*, *-*-netbsd*, *-*-irix* targets. * configure.ac [THREADS=posix && *-*-freebsd*]: Remove AC_MSG_WARN that threads are not fully supported by GC. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && *-*-freebsd*]: Likewise. * configure.ac [THREADS=posix && *-*-osf*] (THREAD_LOCAL_ALLOC): Define even if enable_parallel_mark is false. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && *-*-osf*] (THREAD_LOCAL_ALLOC): Likewise. * configure.ac [THREADS=aix] (THREAD_LOCAL_ALLOC): AC_DEFINE.
* Turn on parallel marker by default for all multi-threaded buildsIvan Maidanski2017-04-221-5/+45
| | | | | | | | | | | | | | Note: if some target does not support PARALLEL_MARK, it should be fixed (or a workaround should be added). * CMakeLists.txt (enable_parallel_mark): Change default value to ON. * CMakeLists.txt [enable_parallel_mark] (PARALLEL_MARK): Define only along with GC_LINUX_THREADS, or GC_AIX_THREADS, or GC_HPUX_THREADS, or GC_OPENBSD_THREADS, or GC_FREEBSD_THREADS, or GC_NETBSD_THREADS, or GC_SOLARIS_THREADS, or GC_IRIX_THREADS, or GC_THREADS, or GC_DARWIN_THREADS, or GC_OSF1_THREADS. * configure.ac (PARALLEL_MARK): Always define unless threads are disabled or enable_parallel_mark is "no".
* Fix enable_parallel_mark condition in CMake scriptIvan Maidanski2017-02-011-19/+3
| | | | | | * CMakeLists.txt [enable_parallel_mark] (ADD_DEFINITIONS): Add -DPARALLEL_MARK; remove ADD_DEFINITIONS("-DPARALLEL_MARK") in other places; remove ${} for enable_parallel_mark in IF.
* Fix MS VC warning about compiling unused checksums and thread_local_allocIvan Maidanski2017-02-011-4/+9
| | | | | | | * CMakeLists.txt (SRC): Remove checksums.c (to avoid MS VC warning about unused file). * CMakeLists.txt (SRC): Do not add thread_local_alloc.c unless ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") present.
* Fix GCJ support in CMake build scriptIvan Maidanski2017-01-251-1/+4
| | | | | | * CMakeLists.txt [enable_gcj_support] (SRC): Add gcj_mlc.c. * CMakeLists.txt [enable_gcj_support] (ADD_DEFINITIONS): Add -DGC_ENABLE_SUSPEND_THREAD only if enable_threads.
* CMake: add gctest as a testAndy Li2016-08-101-0/+2
| | | | | * CMakeLists.txt: Include CTest. * tests/CMakeLists.txt: Add gctest as test.
* Merge branch 'thread-suspend'Ivan Maidanski2016-06-211-0/+1
|\
| * Code refactoring of thread suspend/resume API supportIvan Maidanski2015-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * CMakeLists.txt (enable_gcj_support): Define GC_ENABLE_SUSPEND_THREAD. * configure.ac (enable_gcj_support): Likewise. * doc/README.macros (GC_ENABLE_SUSPEND_THREAD): Document. * include/gc.h (GC_suspend_thread, GC_resume_thread, GC_is_thread_suspended): Move to javaxfc.h. * include/gc_pthread_redirects.h (GC_SUSPEND_THREAD_ID): New macro. * include/javaxfc.h (GC_SUSPEND_THREAD_ID): Likewise. * include/javaxfc.h (GC_suspend_thread, GC_resume_thread, GC_is_thread_suspended): Define if and only if GC_THREADS; refine comment. * include/javaxfc.h (GC_suspend_thread, GC_resume_thread, GC_is_thread_suspended): Decorate with GC_CALL; change argument type from pthread_t to GC_SUSPEND_THREAD_ID. * pthread_stop_world.c (GC_suspend_thread, GC_resume_thread, GC_is_thread_suspended): Likewise. * pthread_stop_world.c (GC_suspend_handler): Move check for SUSPENDED_EXT to GC_suspend_handler_inner (to avoid duplicate GC_lookup_thread call). * pthread_stop_world.c (suspend_self_inner, GC_TIME_LIMIT, GC_brief_async_signal_safe_sleep, GC_suspend_thread, GC_resume_thread, GC_is_thread_suspended): Do not defined unless GC_ENABLE_SUSPEND_THREAD. * pthread_stop_world.c (suspend_self): Remove (invoke GC_do_blocking(suspend_self_inner) directly). * pthread_stop_world.c (GC_brief_async_signal_safe_sleep): Decorate with STATIC. * pthread_stop_world.c (GC_suspend_thread, GC_resume_thread, GC_is_thread_suspended): Wrap code into LOCK/UNLOCK (because, at least, GC_lookup_thread should be called with the allocation lock held). * pthread_stop_world.c (GC_suspend_thread, GC_resume_thread): Do not ABORT if thread is unregistered in GC (just no-op instead). * pthread_stop_world.c (GC_is_thread_suspended): Return 0 if thread is not registered in GC.
* | Fix CMake warning about CMP0054 by unquoting instances of HOSTAndrew Buss2015-12-241-16/+16
|/ | | | | | See CMake v3.1 policy CMP0054. * CMakeLists.txt: Use HOST variable without quotes.
* Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURESYusuke Suzuki2013-12-081-1/+3
| | | | | | * CMakeLists.txt: Since latest OSX compiler (clang) provided by Xcode is not accept "-arch ppc"; So if CMAKE_OSX_ARCHITECTURES is defined by client, CMakeLists.txt should not force "ppc;i386;x86_64".
* Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSDYusuke Suzuki2013-12-081-2/+2
| | | | * CMakeLists.txt: Fix broken ADD_DEFINITION for kFreeBSD.
* Remove GC_BUILD definition from build scriptsIvan Maidanski2013-05-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * CMakeLists.txt (ADD_DEFINITIONS): Remove -D GC_BUILD (not needed since it is defined in gc_priv.h, gc_pmark.h and gc_cpp.cc). * WCC_MAKEFILE (CFLAGS): Likewise. * build/s60v3/libgc.mmp: Likewise. * digimars.mak (DEFINES, tests/test.obj): Likewise. * windows-untested/vc60/gc.dsp (ADD CPP): Likewise. * windows-untested/vc60/libgc.dsp (ADD CPP): Likewise. * windows-untested/vc60/libgcmt.dsp (ADD CPP): Likewise. * windows-untested/vc70/gc.vcproj (PreprocessorDefinitions): Likewise. * windows-untested/vc70/libgc.vcproj (PreprocessorDefinitions): Likewise. * windows-untested/vc70/libgcmt.vcproj (PreprocessorDefinitions): Likewise. * windows-untested/vc71/gc.vcproj (PreprocessorDefinitions): Likewise. * windows-untested/vc71/libgc.vcproj (PreprocessorDefinitions): Likewise. * windows-untested/vc71/libgcmt.vcproj (PreprocessorDefinitions): Likewise. * extra/MacOS.c: Define GC_BUILD (before include of gc.h). * extra/msvc_dbg.c: Likewise. * windows-untested/vc60/gc.dsp (MESSAGE, ENDIF): Remove trailing spaces at EOLn. * windows-untested/vc60/libgc.dsp (MESSAGE, ENDIF): Likewise. * windows-untested/vc60/libgcmt.dsp (MESSAGE, ENDIF): Likewise.
* configure: Remove unused AM conditionalsIvan Maidanski2012-02-251-2/+0
| | | | | | | | * CMakeLists.txt: Remove FIXME for openbsd_threads and ENABLE_GCJ_SUPPORT. * configure.ac (openbsd_threads): Remove unused variable. * configure.ac (OPENBSD_THREADS, ENABLE_GCJ_SUPPORT): Remove unused AM conditional definition.
* Move "cord" library tests to "cord/tests" folder.Ivan Maidanski2011-09-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * cord/cordtest.c, cord/de.c, cord/de_win.c, cord/de_cmds.h, cord/de_win.h: Move to cord/tests folder. * cord/de_win.RC: Move ad rename to cord/tests/de_win.rc. * .gitignore: Add cord/tests/de_win.res file. * BCC_MAKEFILE (cord/de.obj, cord/de_win.obj, cord/de_win.res): Rename (targets and source moved to cord/tests). * NT_MAKEFILE (cord/de.obj, cord/de_win.obj): Likewise. * CMakeLists.txt (cord): Rename cord/de.c, cord/de_win.c (source moved to cord/tests). * EMX_MAKEFILE (cord/cordtest.exe, cord/de.exe): Rename cord/cordtest.c, cord/de.c to cord/tests (source moved to cord/tests). * Makefile.direct, Makefile.dj (cord/cordtest, cord/de): Likewise. * OS2_MAKEFILE (cord/cordtest.exe): Likewise. * SMakefile.amiga (cord/cordtest.o): Likewise. * Makefile.direct, Makefile.dj (CORD_SRCS): Rename cord/cordtest.c, cord/de.c, cord/de_cmds.h, cord/de_win.c, cord/de_win.h, cord/de_win.rc (moved to cord/tests). * NT_MAKEFILE, NT_STATIC_THREADS_MAKEFILE, NT_X64_STATIC_THREADS_MAKEFILE, NT_X64_THREADS_MAKEFILE (cord/de_win.res, cord/de.exe): Move cord/de.obj, cord/de_win.obj to cord/tests. * cord/cord.am (EXTRA_DIST): Move cordtest.c, de.c, de_cmds.h, de_win.h, de_win.c, de_win.rc to cord/tests. * doc/README.cords: Update (regarding de.c file move). * gc.mak (SOURCE): Move de_win.c, de.c, de_win.rc to cord/tests.
* Adjust CMakeLists.txt for Cygwin (set CMAKE_LEGACY_CYGWIN_WIN32).Ivan Maidanski2011-09-131-0/+2
| | | | | * CMakeLists.txt (CMAKE_LEGACY_CYGWIN_WIN32): Set to 0 (required for Cygwin).