summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* Fix CMake build on Cygwin.Ivan Maidanski2011-09-131-1/+1
| | | | | * CMakeLists.txt (cygwin): Remove "-D_REENTRANT" definition. * CMakeLists.txt (cord): Add gdi32 link library.
* 2010-10-22 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * CMakeLists.txt: Check enable_parallel_mark on Darwin. * configure.ac: Ditto. * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS, DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and GC_DISCOVER_TASK_THREADS, respectively. * os_dep.c (DARWIN_SUSPEND_GC_THREADS): Ditto. * pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Ditto. * darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define (and remove FIXME). * darwin_stop_world.c (GC_use_threads_discovery): Add GC_API; comment; remove FIXME. * win32_threads.c (GC_NO_DLLMAIN): Rename to GC_NO_THREADS_DISCOVERY. * tests/test.c (GC_NO_DLLMAIN): Ditto. * doc/README.macros (GC_NO_DLLMAIN): Ditto. * doc/README.win32 (GC_NO_DLLMAIN): Ditto. * doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment. * win32_threads.c (GC_win32_dll_threads): Define as macro to true if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY); update the comment. * win32_threads.c (GC_use_DllMain): Rename to GC_use_threads_discovery; do not set GC_win32_dll_threads if GC_DISCOVER_TASK_THREADS. * win32_threads.c (GC_started_thread_while_stopped, GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread, GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions which use GC_win32_dll_threads to minimize the possibility of an "unreachable code" compiler warning when GC_win32_dll_threads is defined as a macro. * win32_threads.c (GC_unregister_my_thread): Don't call GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC (since can't happen); use "t" local variable only if not GC_win32_dll_threads. * win32_threads.c (GC_register_my_thread_inner): Reformat the comment. * doc/README.macros (GC_DISCOVER_TASK_THREADS): Document. * include/gc.h (GC_use_DllMain): Rename to GC_use_threads_discovery but keep old name as a macro definition. * include/gc.h (GC_use_threads_discovery): Declare also for Darwin; update the comment. * tests/test.c (main): Call GC_use_threads_discovery for Darwin (to test the mode if possible). * configure: Regenerate.
* 2010-07-29 Ivan Maidanski <ivmai@mail.ru> (with input from NIIBE Yutaka)ivmai2011-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | * pthread_start.c: New file. * CMakeLists.txt (SRC): Add pthread_start.c. * Makefile.am (libgc_la_SOURCES): Ditto. * Makefile.direct (CSRCS): Ditto. * Makefile.direct (OBJS): Add pthread_start.obj. * extra/gc.c: Add a comment; include pthread_start.c. * pthread_support.c (start_info): Move the struct definition down closer to its usage. * pthread_support.c (GC_thread_exit_proc): Replace STATIC with GC_INNER. * pthread_support.c (GC_inner_start_routine): Move to the definition to pthread_start.c; leave only the prototype; remove STATIC. * pthread_support.c (GC_start_rtn_prepare_thread): New function (contains parts of the original GC_inner_start_routine). * Makefile.in: Regenerate. * configure: Ditto.
* 2010-02-24 Ivan Maidanski <ivmai@mail.ru> (really Jack Andrews)ivmai2011-07-261-2/+15
| | | | | | * CMakeLists.txt: New file (adding CMake support). * tests/CMakeLists.txt: Ditto. * doc/README.cmake: Ditto.
* 2010-02-24 Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener)ivmai2011-07-261-6/+13
| | | | | | * CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it usable on Mac OS X). * doc/README.cmake: Update.
* 2010-02-24 Ivan Maidanski <ivmai@mail.ru> (really Jack Andrews)ivmai2011-07-261-0/+210
* CMakeLists.txt: New file (adding CMake support). * tests/CMakeLists.txt: Ditto. * doc/README.cmake: Ditto.