platform/upstream/libgc.git
5 years agoFix subexpression widening in memhash() of disclaim_weakmap_test
Ivan Maidanski [Wed, 21 Aug 2019 08:31:52 +0000 (11:31 +0300)]
Fix subexpression widening in memhash() of disclaim_weakmap_test
(fix of commit 0cc2c0e7e)

It would be more correct to widen the argument (from unsigned to
GC_word) of multiply operation instead of implicit widening of the
result.

* tests/disclaim_weakmap_test.c (memhash): Cast acc to GC_word before
multiplying by 2003; cast the whole expression to unsigned type (before
assigning it to acc).

5 years agoEliminate 'conversion from size_t to int' MSVC warning in cordprnt.c
Ivan Maidanski [Wed, 21 Aug 2019 08:13:36 +0000 (11:13 +0300)]
Eliminate 'conversion from size_t to int' MSVC warning in cordprnt.c

* cord/cordprnt.c (ec_len): Cast the expression to int explicitly.

5 years agoEliminate 'conversion from size_t to int' MSVC warning in subthread_create
Ivan Maidanski [Wed, 21 Aug 2019 08:08:11 +0000 (11:08 +0300)]
Eliminate 'conversion from size_t to int' MSVC warning in subthread_create
(fix of commit 0ccf1379e)

* tests/subthread_create.c [AO_HAVE_fetch_and_add1] (entry): Cast
result of AO_fetch_and_add1() to int explicitly.

5 years agoWorkaround 'condition (pred&1)==0 is always false' cppcheck false positive
Ivan Maidanski [Wed, 14 Aug 2019 09:42:08 +0000 (12:42 +0300)]
Workaround 'condition (pred&1)==0 is always false' cppcheck false positive

* backgraph.c [MAKE_BACK_GRAPH] (add_edge): Pass pred value via
COVERT_DATAFLOW() in ((word)pred&1)==0.

5 years agoFix 'condition pred!=NULL is always true' compiler warning
Ivan Maidanski [Wed, 14 Aug 2019 09:32:52 +0000 (12:32 +0300)]
Fix 'condition pred!=NULL is always true' compiler warning

Duplicate check of pred!=NULL is removed in add_edge.

* backgraph.c [MAKE_BACK_GRAPH] (add_edge): Remove pred!=NULL.

5 years agoTravis CI: Test CMake builds
Ivan Maidanski [Tue, 13 Aug 2019 08:19:52 +0000 (11:19 +0300)]
Travis CI: Test CMake builds

5 years agoFix gc_allocator.h compilation by Clang
Ivan Maidanski [Tue, 13 Aug 2019 08:05:06 +0000 (11:05 +0300)]
Fix gc_allocator.h compilation by Clang

Issue #273 (bdwgc).

Though clang may report __cplusplus as 201402L, it seems to be not
C++11 compliant fully.

* include/gc_allocator.h [!GC_ATTR_EXPLICIT && __clang__ && !CPPCHECK]
(GC_ATTR_EXPLICIT): Define to empty (instead of "explicit").
* tests/test_cpp.cc [!GC_ATTR_EXPLICIT && __clang__ && !CPPCHECK]
(GC_ATTR_EXPLICIT): Likewise.

5 years agoEliminate 'treating c input as c++ when in C++ mode' Clang warning (CMake)
Ivan Maidanski [Tue, 13 Aug 2019 07:48:28 +0000 (10:48 +0300)]
Eliminate 'treating c input as c++ when in C++ mode' Clang warning (CMake)

* CMakeLists.txt [build_tests && enable_cplusplus
&& !(BORLAND || MSVC || WATCOM)]: Add "-x c++" compile option.

5 years agoFix 'wrong finalization data' gctest failure on Windows
Ivan Maidanski [Fri, 2 Aug 2019 18:21:59 +0000 (21:21 +0300)]
Fix 'wrong finalization data' gctest failure on Windows
(fix of commit aefc738c1)

Issue #289 (bdwgc).

This commit workarounds some bug in MS compiler for x86 (v19.10.25017,
as of now) which causes generation of an incorrect code for
GC_normal_finalize_mark_proc() if code optimizations are on.

* finalize.c [_MSC_VER && I386] (GC_normal_finalize_mark_proc): Inline
GC_push_obj() manually; add comment.

5 years agoAppVeyor CI: Print .gc.log on gctest failure for mingw-shared-no-make
Ivan Maidanski [Tue, 30 Jul 2019 23:25:04 +0000 (02:25 +0300)]
AppVeyor CI: Print .gc.log on gctest failure for mingw-shared-no-make

5 years agoAppVeyor CI: Fix passing -D NO_MSGBOX_ON_ERROR to cmake build
Ivan Maidanski [Tue, 30 Jul 2019 23:07:47 +0000 (02:07 +0300)]
AppVeyor CI: Fix passing -D NO_MSGBOX_ON_ERROR to cmake build
(fix of commit a401e5475)

Space after -D is removed; %CFLAGS_EXTRA% are surrounded with double
quotes.

5 years agoFix passing CFLAGS_EXTRA to compiler in CMake script
Ivan Maidanski [Tue, 30 Jul 2019 23:01:57 +0000 (02:01 +0300)]
Fix passing CFLAGS_EXTRA to compiler in CMake script
(fix of commit b6ac6a5a4)

The previous solution does not work for MS VC target.

* CMakeLists.txt [CFLAGS_EXTRA] (CMAKE_C_FLAGS, CMAKE_CXX_FLAGS): Do
not set.
* CMakeLists.txt [CFLAGS_EXTRA]: Pass $(CFLAGS_EXTRA) to
add_compile_options.

5 years agoAppVeyor CI: Do not pass -v to cmake
Ivan Maidanski [Tue, 30 Jul 2019 22:17:05 +0000 (01:17 +0300)]
AppVeyor CI: Do not pass -v to cmake
(revert of commit 127d8be34)

Option -v is not supported by the cmake version on AppVeyor.

5 years agoAppVeyor CI: Pass -D NO_MSGBOX_ON_ERROR to CMake (MS VC) and MinGW builds
Ivan Maidanski [Tue, 30 Jul 2019 21:44:06 +0000 (00:44 +0300)]
AppVeyor CI: Pass -D NO_MSGBOX_ON_ERROR to CMake (MS VC) and MinGW builds

This prevents showing a dialog window on GC fatal errors.

5 years agoAppVeyor CI: Turn on verbose mode during cmake build
Ivan Maidanski [Tue, 30 Jul 2019 21:33:20 +0000 (00:33 +0300)]
AppVeyor CI: Turn on verbose mode during cmake build

5 years agoSupport CFLAGS_EXTRA to pass extra user-defined compiler flags (CMake)
Ivan Maidanski [Tue, 30 Jul 2019 08:40:57 +0000 (11:40 +0300)]
Support CFLAGS_EXTRA to pass extra user-defined compiler flags (CMake)

* CMakeLists.txt [CFLAGS_EXTRA] (CMAKE_C_FLAGS): Append $(CFLAGS_EXTRA).
* CMakeLists.txt [CFLAGS_EXTRA && enable_cplusplus] (CMAKE_CXX_FLAGS):
Likewise.

5 years agoFix test_cpp failure caused by arbitrary link order (Win32)
Ivan Maidanski [Fri, 26 Jul 2019 18:35:30 +0000 (21:35 +0300)]
Fix test_cpp failure caused by arbitrary link order (Win32)
(fix of commit 4a08ae983)

* Makefile.direct (test_cpp): Pass -D GC_NOT_DLL to $(CC) (except for
HP UX case).
* configure.ac [($enable_shared=no || $enable_static=yes)
&& $host=*-*-cygwin*|*-*-mingw*|*-*-msys*] (CXXFLAGS): Add
-D GC_NOT_DLL; add comment.

5 years agoPass -D GC_DLL -fvisibility=hidden if default configure build is requested
Ivan Maidanski [Fri, 26 Jul 2019 18:24:18 +0000 (21:24 +0300)]
Pass -D GC_DLL -fvisibility=hidden if default configure build is requested
(fix of commit c9964cfc0)

If --disable-shared and --enable-static are not passed to configure
then build generates only shared libraries, thus the internal symbols
visibility could be restricted.

* configure.ac [$enable_shared="" && $enable_static!=yes
|| $enable_shared=yes && $enable_static==""] (GC_DLL): Define AC macro.
* configure.ac [($enable_shared="" && $enable_static!=yes
|| $enable_shared=yes && $enable_static=="") && $GCC=yes
&& $ac_cv_fvisibility_hidden=yes] (CFLAGS): Add
-DGC_VISIBILITY_HIDDEN_SET -fvisibility=hidden.

5 years agoAppVeyor CI: Add builds based on NT_MAKEFILE
Ivan Maidanski [Thu, 25 Jul 2019 21:51:27 +0000 (00:51 +0300)]
AppVeyor CI: Add builds based on NT_MAKEFILE

5 years agoEliminate 'conversion from int to void*' MS VC warning in cordtest (x64)
Ivan Maidanski [Thu, 25 Jul 2019 21:28:09 +0000 (00:28 +0300)]
Eliminate 'conversion from int to void*' MS VC warning in cordtest (x64)

* cord/tests/cordtest.c (test_fn, test_basics): Cast 13 to void* thru
GC_word type.

5 years agoWorkaround 'typedef ignored on left of' MSVC warning in imagehlp.h (CMake)
Ivan Maidanski [Thu, 25 Jul 2019 07:07:58 +0000 (10:07 +0300)]
Workaround 'typedef ignored on left of' MSVC warning in imagehlp.h (CMake)

* CMakeLists.txt [enable_werror && MSVC]: Add /wd4091 compile option;
add comment.

5 years agoAppVeyor CI: Remove building redundant check-cpp target of Makefile.direct
Ivan Maidanski [Wed, 24 Jul 2019 22:39:48 +0000 (01:39 +0300)]
AppVeyor CI: Remove building redundant check-cpp target of Makefile.direct

Now check executes test_cpp, so check-cpp is a redundant target.

5 years agoTravis CI: Remove building redundant check-cpp target of Makefile.direct
Ivan Maidanski [Wed, 24 Jul 2019 22:19:54 +0000 (01:19 +0300)]
Travis CI: Remove building redundant check-cpp target of Makefile.direct

Now check executes test_cpp, so check-cpp is a redundant target.

5 years agoCompile gc.c unless building static libraries (NT_MAKEFILE, WCC_MAKEFILE)
Ivan Maidanski [Wed, 24 Jul 2019 21:55:22 +0000 (00:55 +0300)]
Compile gc.c unless building static libraries (NT_MAKEFILE, WCC_MAKEFILE)

This is to match the behavior of CMake and configure scripts.

* NT_MAKEFILE [!ENABLE_STATIC] (OBJS): Set to extra\gc.obj,
extra\msvc_dbg.obj.
* WCC_MAKEFILE (OBJS): Define only if ENABLE_STATIC.
* WCC_MAKEFILE [!ENABLE_STATIC] (gc.obj): New target.
* WCC_MAKEFILE [!ENABLE_STATIC] (gc.dll): Depend on and append gc.obj
instead of $(OBJS) elements.

5 years agoBuild cord.lib by Makefile.direct, NT_MAKEFILE, OS2_MAKEFILE, WCC_MAKEFILE
Ivan Maidanski [Wed, 24 Jul 2019 08:11:29 +0000 (11:11 +0300)]
Build cord.lib by Makefile.direct, NT_MAKEFILE, OS2_MAKEFILE, WCC_MAKEFILE

Note: Makefile.direct builds cord.a (not libcord.a or cord.lib).

* Makefile.direct: Update header comment about all and cords targets.
* Makefile.direct (all): Depend also on cords.
* Makefile.direct (cord.a): New target (duplicates cords target).
* Makefile.direct (cords): Do not depend on base_lib; create cord.a
instead of updating gc.a.
* Makefile.direct (cordtest, de): Depend on cords instead of
$(CORD_OBJS); pass cord.a (instead of $(CORD_OBJS)) to $(CC).
* NT_MAKEFILE (CFLAGS_MT): Move variable definition (which uses cvarsmt) to
be after CORDFLAG one.
* NT_MAKEFILE (CORDFLAG, COBJS): New variable.
* WCC_MAKEFILE (CORDFLAG, COBJS): Likewise.
* NT_MAKEFILE [!ENABLE_STATIC] (cvarsmt): Set variable value to empty;
add comment.
* NT_MAKEFILE (all): Depend also on cord.lib.
* OS2_MAKEFILE (all): Likewise.
* WCC_MAKEFILE (all): Likewise.
* NT_MAKEFILE (check): Depend also on cordtest.exe; run also cordtest.
* WCC_MAKEFILE (check): Likewise.
* NT_MAKEFILE (.c.obj): Remove -DCORD_NOT_DLL; add $(CORDFLAG).
* NT_MAKEFILE (cord.lib, cordtest.exe): New target.
* OS2_MAKEFILE (cord.lib, cordtest.exe, clean): Likewise.
* WCC_MAKEFILE (cord.lib, cordtest.exe, cordbscs.obj, cordxtra.obj,
cordprnt.obj, cordtest.obj): Likewise.
* WCC_MAKEFILE [!ENABLE_STATIC] (cord.dll): Likewise.
* NT_MAKEFILE (de.exe): Depend on cord.lib instead of cordbscs.obj and
cordxtra.obj.
* NT_MAKEFILE (clean): Delete cordtst*.tmp files; delete *.lib, *.dll,
and *.exp files instead of gc*.lib, gc*.dll, gc*.exp, cord\*.exe,
cord\*.exp, cord\*.lib, cord\*.pdb.
* README.md (Installation and Portability): Update information about
"make cords".

5 years agoFix gccpp.lib dependency in NT_MAKEFILE
Ivan Maidanski [Tue, 23 Jul 2019 21:51:35 +0000 (00:51 +0300)]
Fix gccpp.lib dependency in NT_MAKEFILE
(fix of commit 4a08ae983)

Also, update README that Makefile.direct creates cord.a now (instead
of adding cord files to gc.a).

* NT_MAKEFILE [!ENABLE_STATIC] (gccpp.lib): Add dependency on gc.lib.
* README.QUICK (INSTALLATION): Update information about "make cords".

5 years ago.gitignore: Ignore all *.a files in the base folder
Ivan Maidanski [Tue, 23 Jul 2019 21:42:21 +0000 (00:42 +0300)]
.gitignore: Ignore all *.a files in the base folder

5 years agoCompile msvc_dbg.c by CMake script (MS VC)
Ivan Maidanski [Mon, 22 Jul 2019 06:53:32 +0000 (09:53 +0300)]
Compile msvc_dbg.c by CMake script (MS VC)

* CMakeLists.txt [MSVC] (SRC): Add extra/msvc_dbg.c; add comment.

5 years agoReplace _M_AMD64 macro with _M_X64
Ivan Maidanski [Mon, 22 Jul 2019 06:40:29 +0000 (09:40 +0300)]
Replace _M_AMD64 macro with _M_X64
(code refactoring)

Also, adjust strcat_s usage in msvc_dbg.c.

* extra/msvc_dbg.c [_MSC_VER]: Check _M_X64 instead of _M_AMD64.
* tests/test.c [CPPCHECK && _MSC_VER] (main): Likewise.
* extra/msvc_dbg.c [_M_X64 && _MSC_VER<1200] (GetModuleBase): Use
strcat() instead of strcat_s().

5 years agoRename make_as_lib option to enable_static in NT_MAKEFILE and WCC_MAKEFILE
Ivan Maidanski [Fri, 19 Jul 2019 21:44:38 +0000 (00:44 +0300)]
Rename make_as_lib option to enable_static in NT_MAKEFILE and WCC_MAKEFILE

This is to match the behavior of CMake script.

* NT_MAKEFILE: Update header comment (rename make_as_lib to
enable_static).
* NT_MAKEFILE (MAKE_AS_LIB): Rename to ENABLE_STATIC.
* WCC_MAKEFILE (MAKE_AS_DLL): Remove (check "ndef ENABLE_STATIC"
instead).
* WCC_MAKEFILE (MAKE_AS_LIB): Rename to ENABLE_STATIC; update comment.
* doc/README.win32 (Microsoft Tools): Rename make_as_lib to
enable_static.
* doc/README.win64: Likewise.

5 years agoBuild shared libraries by default (WCC_MAKEFILE)
Ivan Maidanski [Fri, 19 Jul 2019 18:27:34 +0000 (21:27 +0300)]
Build shared libraries by default (WCC_MAKEFILE)

This is to match the behavior of CMake script.

* WCC_MAKEFILE (MAKE_AS_DLL): Uncomment.
* WCC_MAKEFILE (MAKE_AS_LIB): Comment out.

5 years agoRename nothreads option to disable_threads in NT_MAKEFILE
Ivan Maidanski [Fri, 19 Jul 2019 18:17:18 +0000 (21:17 +0300)]
Rename nothreads option to disable_threads in NT_MAKEFILE

* NT_MAKEFILE: Change nothreads=1 to disable_threads=1 in the header
comment.
* NT_MAKEFILE (CFLAGS_MT): Rename NOTHREADS to DISABLE_THREADS.
* doc/README.win32 (Microsoft Tools): Change nothreads=1 to
disable_threads=1.
* doc/README.win64: Likewise.

5 years agoBuild gccpp library by Makefile.direct, NT_MAKEFILE and WCC_MAKEFILE
Ivan Maidanski [Fri, 19 Jul 2019 17:42:38 +0000 (20:42 +0300)]
Build gccpp library by Makefile.direct, NT_MAKEFILE and WCC_MAKEFILE

* Makefile.direct: Update header comment about all, gc.a (base_lib),
c++, check, check-cpp targets.
* Makefile.direct (CXX): Refine comment.
* Makefile.direct (all): Depend also on c++.
* Makefile.direct (bsd-libgccpp.a): New target (duplicates bsd-libgc.a
one).
* Makefile.direct (bsd-libgc.a): Add a rename of gccpp.a to
bsd-libgccpp.a.
* Makefile.direct (BSD-pkg-install): Copy bsd-libgccpp.a file to
libgccpp.a, install the latter one.
* Makefile.direct (test_cpp): Depend on c++ instead of gc_cpp.o; pass
gccpp.a (instead of gc_cpp.o) to $(CXX).
* Makefile.direct (gccpp.a): New target (duplicates c++ one).
* Makefile.direct (c++): Do not depend on gc_cpp.h and base_lib;
create gccpp.a instead of updating gc.a.
* Makefile.direct (clean): Delete *.a files instead of gc.a.
* Makefile.direct (check): Depend also on test_cpp$(EXEEXT); run also
test_cpp.
* NT_MAKEFILE (LINK_GC, LINK_DLL_FLAGS): Remove variable.
* NT_MAKEFILE (OBJS): Remove gc_cpp.obj.
* NT_MAKEFILE (all, test_cpp.exe): Depend also on gccpp.lib.
* WCC_MAKEFILE (all, test_cpp.exe): Likewise.
* NT_MAKEFILE (gccpp.lib): New target (depending on gc_cpp.obj).
* WCC_MAKEFILE (gccpp.lib): Likewise.
* WCC_MAKEFILE [MAKE_AS_DLL] (gccpp.dll): Likewise.
* NT_MAKEFILE (test_cpp.exe): Pass gccpp.lib to $(link).
* WCC_MAKEFILE [MAKE_AS_LIB] (MAKE_AS_LIB): Set to -DGC_NOT_DLL.
* WCC_MAKEFILE (gc.lib): Do not depend gc_cpp.obj.
* WCC_MAKEFILE [MAKE_AS_DLL] (gc.lib): Do not add gc_cpp.obj to gc.lib.
* WCC_MAKEFILE [MAKE_AS_DLL] (gc.dll): Specify "op case".

5 years agoUpdate README.cmake regarding Unix, C++ and tests
Ivan Maidanski [Wed, 17 Jul 2019 08:52:26 +0000 (11:52 +0300)]
Update README.cmake regarding Unix, C++ and tests

Issue #105 (bdwgc).

* doc/README.cmake: Mention that Unix targets are also supported;
remove not that support is not yet complete; update the list of
supported targets (that CMake is able to generate for); use Visual
Studio 9 instead of Visual Studio 8 in the examples; document
enable_cplusplus and build_tests options; provide an example with
--config option; change "build" artifacts folder to "out" one in
the example.

5 years agoRemove gc.mak script (MS VC)
Ivan Maidanski [Wed, 17 Jul 2019 08:39:26 +0000 (11:39 +0300)]
Remove gc.mak script (MS VC)

Issue #105 (bdwgc).

CMake script or NT_MAKEFILE should be used instead of gc.mak.

* ChangeLog (8.1.0): Remove item about gc.mak.
* Makefile.am (EXTRA_DIST): Remove gc.mak.
* gc.mak: Remove file.
* doc/README.win32 (Threads): Remove gc.mak usage information; mention
that CMake script is the preferred way of building for Windows.

5 years ago.gitattributes: Update after BCC_MAKEFILE removal
Ivan Maidanski [Wed, 17 Jul 2019 07:31:46 +0000 (10:31 +0300)]
.gitattributes: Update after BCC_MAKEFILE removal

Issue #105 (bdwgc).

5 years agoRemove Borland-specific Makefile (BCC_MAKEFILE)
Ivan Maidanski [Wed, 17 Jul 2019 07:29:36 +0000 (10:29 +0300)]
Remove Borland-specific Makefile (BCC_MAKEFILE)

Issue #105 (bdwgc).

CMake script should be used instead of BCC_MAKEFILE.

* BCC_MAKEFILE: Remove file.
* Makefile.am (EXTRA_DIST): Remove BCC_MAKEFILE.
* doc/README.win32 (Borland Tools): Remove "rarely tested" note; change
BCC_MAKEFILE to cmake -G "Borland Makefiles"; remove note that
Borland 5.5 is assumed.

5 years agoEnable CMake-based build for Borland and Watcom compilers
Ivan Maidanski [Wed, 17 Jul 2019 07:08:12 +0000 (10:08 +0300)]
Enable CMake-based build for Borland and Watcom compilers

Issue #105 (bdwgc).

* CMakeLists.txt [BORLAND] (add_compile_options): Specify /a4 and
/w /w-pro /w-aus /w-par /w-ccc /w-inl /w-rch; add comment.
* CMakeLists.txt [WATCOM] (add_compile_options): Specify /zp4 and /wx.
* CMakeLists.txt [enable_werror && BORLAND] (add_compile_options):
Specify /w!.
* CMakeLists.txt [enable_werror && WATCOM] (add_compile_options):
Specify /we.
* CMakeLists.txt [!enable_single_obj_compilation && !BUILD_SHARED_LIBS
&& BORLAND] (add_compile_options): Specify /w-use; add comment.
* CMakeLists.txt [build_tests && WATCOM] (gctest): Specify /wcd=13
/wcd=201 /wcd=367 /wcd=368 /wcd=726 target compile options; add comment.
* doc/README.win32 (Watcom compiler): Mention that OpenWatcom 2.0 is
tested on; remove note that cord is not ported; add note about the
new way to build the collector using CMake script.

5 years agoFix a typo in control_chars() comment in de_win.c
Ivan Maidanski [Tue, 16 Jul 2019 22:13:18 +0000 (01:13 +0300)]
Fix a typo in control_chars() comment in de_win.c

* cord/tests/de_win.c (control_chars): Replace "32" to "64" in comment.

5 years agoEliminate 'conversion may lose significant digits' BCC warning in de_win
Ivan Maidanski [Tue, 16 Jul 2019 21:44:29 +0000 (00:44 +0300)]
Eliminate 'conversion may lose significant digits' BCC warning in de_win

* cord/tests/de_win.c (control_chars): Cast text[i]+0x40 to char.

5 years agoEliminate 'comparing signed and unsigned values' BCC warning in cordtest
Ivan Maidanski [Tue, 16 Jul 2019 21:37:51 +0000 (00:37 +0300)]
Eliminate 'comparing signed and unsigned values' BCC warning in cordtest

* cord/tests/cordtest.c (test_basics): Cast (unsigned char)c to size_t.

5 years agoSuppress warnings in test_tinyfl() of gctest reported by Watcom C complier
Ivan Maidanski [Tue, 16 Jul 2019 07:34:48 +0000 (10:34 +0300)]
Suppress warnings in test_tinyfl() of gctest reported by Watcom C complier

* WCC_MAKEFILE (test.obj): Pass /wcd=13 /wcd=201 /wcd=367 /wcd=368
options to $(CC).

5 years agoFix typo in SMakefile filename in README
Ivan Maidanski [Tue, 16 Jul 2019 07:29:08 +0000 (10:29 +0300)]
Fix typo in SMakefile filename in README

* doc/README.amiga (WHATS NEW): Change SMakefile.smk to SMakefile.amiga.

5 years agoWorkaround 'expression is only useful for its side effects' WCC warning
Ivan Maidanski [Mon, 15 Jul 2019 06:24:04 +0000 (09:24 +0300)]
Workaround 'expression is only useful for its side effects' WCC warning

* include/ec.h (CORD_ac_append): Cast result of ternary operator to
void.

5 years agoFix test_cpp fail when gc_cpp resides in a dll (Borland, Watcom)
Ivan Maidanski [Tue, 9 Jul 2019 08:41:18 +0000 (11:41 +0300)]
Fix test_cpp fail when gc_cpp resides in a dll (Borland, Watcom)

* include/gc_cpp.h [(__BORLANDC__ || __WATCOMC__) && !GC_BUILD
&& !GC_NOT_DLL && GC_OPERATOR_NEW_ARRAY] (new[], delete[]): Define
inline operator.
* include/gc_cpp.h [(__BORLANDC__ || __WATCOMC__) && !GC_BUILD
&& !GC_NOT_DLL] (new, delete): Likewise.

5 years agowindows-untested: Remove all contents
Ivan Maidanski [Mon, 8 Jul 2019 22:00:09 +0000 (01:00 +0300)]
windows-untested: Remove all contents

Issue #105 (bdwgc).

CMake script should be used instead.

5 years agoDo not build tests by default (Makefile.direct and other Makefiles)
Ivan Maidanski [Sun, 7 Jul 2019 12:56:12 +0000 (15:56 +0300)]
Do not build tests by default (Makefile.direct and other Makefiles)

This is to match the behavior of configure-based Makefile and the
CMake script. Tests are built and executed now by `make check`.

* BCC_MAKEFILE (all): Depend on gc.lib only (instead of gctest, de
and test_cpp).
* OS2_MAKEFILE (all): Likewise.
* BCC_MAKEFILE (check): New target to build and run the tests (de is
not executed).
* NT_MAKEFILE (check): Likewise.
* Makefile.direct (all): Remove dependency on gctest.
* NT_MAKEFILE (all): Remove dependency on gctest, de and test_cpp; add
dependency on gc.lib.
* OS2_MAKEFILE (check): New target to build and run gctest and
cordtest.
* README.QUICK (INSTALLATION): Change "make test" to "make check".
* README.md (Installation and Portability): Likewise.
* doc/README.arm.cross: Likewise.
* SMakefile.amiga (all): Depend on gc.lib and cord.lib only (instead
of gctest, setjmp_t, cordtest).
* SMakefile.amiga (test): Rename to "check".
* WCC_MAKEFILE (all): Remove dependency on gctest and test_cpp.
* digimars.mak (targets): Likewise.
* WCC_MAKEFILE (check): New symbolic target to build and run gctest
and test_cpp.
* digimars.mak (check): Likewise.
* digimars.mak (gc.lib): New target (depend on gc.dll target).
* doc/README.win32 (Watcom compiler): Remove information that wmake
compiles the tests by default.
* doc/README.win64: Update information about tests building.

5 years agoRename gc68060.lib to gc.lib, cord/cord68060.lib to cord.lib in SMakefile
Ivan Maidanski [Tue, 16 Jul 2019 07:16:04 +0000 (10:16 +0300)]
Rename gc68060.lib to gc.lib, cord/cord68060.lib to cord.lib in SMakefile

This is to match the behavior of the CMake script.

* SMakefile.amiga (clean): Remove cord/*.lib, cord/*.lnk.
* SMakefile.amiga (gctest, cordtest, gc$(CPU).lib): Rename gc$(CPU).lib
to gc.lib.
* SMakefile.amiga (cordtest, cord/cord$(CPU).lib): Rename
cord/cord$(CPU).lib to cord.lib.
* SMakefile.amiga (cordtest): Use $(LINKER) instead of slink.
* SMakefile.amiga (cord.lib): Use $(LIBER) instead of oml.
* SMakefile.amiga (cord/cordbscs.o, cord/cordprnt.o, cord/cordxtra.o,
cord/cordtest.o): Use $(CC) instead of sc.

5 years agoFix cordtest build in SMakefile.amiga
Ivan Maidanski [Tue, 16 Jul 2019 07:12:43 +0000 (10:12 +0300)]
Fix cordtest build in SMakefile.amiga
(fix of commit 1ffa0b268)

* SMakefile.amiga (clean): Delete also cord/tests/*.o.
* SMakefile.amiga (cordtest, cord/cordtest.o): Rename cord/cordtest.o
to cord/tests/cordtest.o.

5 years agoRename gc64.dll to gc.dll and gc[64]_dll.lib to gc.lib in NT_MAKEFILE
Ivan Maidanski [Sun, 7 Jul 2019 12:26:53 +0000 (15:26 +0300)]
Rename gc64.dll to gc.dll and gc[64]_dll.lib to gc.lib in NT_MAKEFILE

This is to match the behavior of gc.mak and the CMake script.

* NT_MAKEFILE [!MAKE_AS_LIB]: Remove; use gc.dll instead of $(GC_DLL).
* NT_MAKEFILE (GC_LIB): Remove; use gc.lib instead of $(GC_LIB).

5 years ago.gitignore: Ignore de.dir produced by CMake
Ivan Maidanski [Sun, 7 Jul 2019 07:53:53 +0000 (10:53 +0300)]
.gitignore: Ignore de.dir produced by CMake

5 years agoAppVeyor CI: enable_werror for all cmake builds
Ivan Maidanski [Sun, 7 Jul 2019 07:49:47 +0000 (10:49 +0300)]
AppVeyor CI: enable_werror for all cmake builds

5 years agoAppVeyor CI: Fail cmake build if deprecated macro and function warnings
Ivan Maidanski [Sun, 7 Jul 2019 07:45:28 +0000 (10:45 +0300)]
AppVeyor CI: Fail cmake build if deprecated macro and function warnings

5 years agoEliminate 'possible loss of data' compiler warning in disclaim_test (MS VC)
Ivan Maidanski [Sun, 7 Jul 2019 07:39:04 +0000 (10:39 +0300)]
Eliminate 'possible loss of data' compiler warning in disclaim_test (MS VC)
(fix of commit 63fd11df9)

* disclaim_test.c (test_misc_sizes): Cast i to unsigned char when
assigning its value to *p.

5 years agoEliminate 'possible loss of data' compiler warning in cordprnt (MS VC)
Ivan Maidanski [Sun, 7 Jul 2019 07:28:09 +0000 (10:28 +0300)]
Eliminate 'possible loss of data' compiler warning in cordprnt (MS VC)

* cordprnt.c (CORD_vsprintf): Cast result of ec_len() to short if
long_arg<0.

5 years agoSupport enable_werror option in CMake script
Ivan Maidanski [Sat, 6 Jul 2019 05:57:41 +0000 (08:57 +0300)]
Support enable_werror option in CMake script

Issue #281 (bdwgc).

* CMakeLists.txt (enable_werror): New option (OFF by default).
* CMakeLists.txt: Specify add_compile_options to report all warnings;
add TODO about pedantic.
* CMakeLists.txt [enable_werror]: Specify add_compile_options to treat
all warnings as errors.
* CMakeLists.txt [enable_werror && APPLE]: Specify add_compile_options
to ignore deprecated declarations, e.g.
_dyld_bind_fully_image_containing_address.

5 years agoRemove dependency on user32.dll import library from static libgc (Win32)
Ivan Maidanski [Fri, 5 Jul 2019 20:30:37 +0000 (23:30 +0300)]
Remove dependency on user32.dll import library from static libgc (Win32)

* CMakeLists.txt [!BUILD_SHARED_LIBS && WIN32] (DONT_USE_USER32_DLL):
Define C macro; add comment.
* configure.ac [($enable_static=yes || $enable_shared=no)
&& $host=*-*-cygwin*|*-*-mingw*|*-*-msys*] (DONT_USE_USER32_DLL):
Likewise.

5 years agoNew macro (NO_MSGBOX_ON_ERROR) to avoid message box on GC abort (Win32)
Ivan Maidanski [Thu, 4 Jul 2019 20:44:40 +0000 (23:44 +0300)]
New macro (NO_MSGBOX_ON_ERROR) to avoid message box on GC abort (Win32)

NO_MSGBOX_ON_ERROR macro disables Win32 MessageBox() invocation.

* doc/README.macros (NO_MSGBOX_ON_ERROR): Document.
* include/private/gcconfig.h [!MSGBOX_ON_ERROR && !NO_MSGBOX_ON_ERROR
&& !SMALL_CONFIG && MSWIN32 && !MSWINRT_FLAVOR && !MSWIN_XBOX1]
(MSGBOX_ON_ERROR): Define new macro.
* misc.c (GC_win32_MessageBoxA): Define only if MSGBOX_ON_ERROR.
* misc.c [!PCR && !SMALL_CONFIG] (GC_default_on_abort): Do not call
GC_win32_MessageBoxA() unless MSGBOX_ON_ERROR is defined.

5 years agoUpdate ChangeLog file
Ivan Maidanski [Mon, 1 Jul 2019 10:15:18 +0000 (13:15 +0300)]
Update ChangeLog file

5 years agoUpdate ChangeLog file (v8.0 changes)
Ivan Maidanski [Sun, 30 Jun 2019 06:00:13 +0000 (09:00 +0300)]
Update ChangeLog file (v8.0 changes)

5 years agoUpdate ChangeLog file (v7.6 changes)
Ivan Maidanski [Sun, 30 Jun 2019 05:48:37 +0000 (08:48 +0300)]
Update ChangeLog file (v7.6 changes)

5 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Sat, 29 Jun 2019 16:12:27 +0000 (19:12 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)

5 years agoAppVeyor CI: Fix cmake Release build by passing --config
Ivan Maidanski [Wed, 26 Jun 2019 19:55:42 +0000 (22:55 +0300)]
AppVeyor CI: Fix cmake Release build by passing --config

5 years agoFix 'const object must be initialized' MS VC error for debug_header_size
Ivan Maidanski [Wed, 26 Jun 2019 13:26:28 +0000 (16:26 +0300)]
Fix 'const object must be initialized' MS VC error for debug_header_size
(fix of commit 85e3083ff)

* include/gc_mark.h (GC_debug_header_size): Do not use "const" keyword
unless GC_BUILD; update comment.

5 years agoFix 'redefinition of struct GC_ms_entry' compilation error in gc_priv.h
Ivan Maidanski [Tue, 25 Jun 2019 21:03:41 +0000 (00:03 +0300)]
Fix 'redefinition of struct GC_ms_entry' compilation error in gc_priv.h
(fix of commit 38962c655)

* include/gc_mark.h [NOT_GCBUILD] (GC_ms_entry): Declare (instead of
an opaque struct definition).

5 years agoFix 'GC_debug_header_size is deprecated' GCC warning
Ivan Maidanski [Tue, 25 Jun 2019 20:55:22 +0000 (23:55 +0300)]
Fix 'GC_debug_header_size is deprecated' GCC warning
(fix of commit 85e3083ff)

* include/private/gc_priv.h [!GC_BUILD && NOT_GCBUILD] (GC_BUILD): Do
not define.
* tests/disclaim_bench.c (NOT_GCBUILD): Define macro (before include
gc_priv.h); remove outdated comment.
* tests/test.c (NOT_GCBUILD): Likewise.

5 years agoTravis CI: Replace clang-5.0 with clang (update to Xenial image)
Ivan Maidanski [Mon, 24 Jun 2019 20:20:55 +0000 (23:20 +0300)]
Travis CI: Replace clang-5.0 with clang (update to Xenial image)

5 years agoTravis CI: Fix out-of-memory during cppcheck build
Ivan Maidanski [Fri, 21 Jun 2019 21:59:36 +0000 (00:59 +0300)]
Travis CI: Fix out-of-memory during cppcheck build

Number of make parallel jobs is reduced to 8 when building cppcheck.

5 years agoUpdate AUTHORS file (add iarspider)
Ivan Maidanski [Fri, 21 Jun 2019 21:37:58 +0000 (00:37 +0300)]
Update AUTHORS file (add iarspider)

5 years agoFix 'ISO C++17 does not allow dynamic exception spec' clang-8 error
Ivan R [Fri, 14 Jun 2019 09:24:47 +0000 (11:24 +0200)]
Fix 'ISO C++17 does not allow dynamic exception spec' clang-8 error

Issue #287 (bdwgc).

Before this patch, clang 8 (and -std=c++1z) fails for gc_cpp.cc.
The error message produced is: ISO C++17 does not allow dynamic
exception specifications.

The "dynamic exception" syntax was declared deprecated in C++11 and
removed in C++17.

* gc_cpp.cc [!_MSC_VER && !__DMC__ && GC_NEW_DELETE_NEED_THROW
&& __cplusplus >= 201703L] (GC_DECL_NEW_THROW): Define to
noexcept(false); add comment.

5 years agoFix 'while clause does not guard' GCC warning in GC_parse_map_entry
Ivan Maidanski [Fri, 21 Jun 2019 20:47:47 +0000 (23:47 +0300)]
Fix 'while clause does not guard' GCC warning in GC_parse_map_entry

* os_dep.c [DYNAMIC_LOADING && USE_PROC_FOR_LIBRARIES || IA64
|| INCLUDE_LINUX_THREAD_DESCR || REDIRECT_MALLOC] (GC_parse_map_entry):
Fix "while" statements indentation; place just one "while" statement on
a line.

5 years agoFix fread failure after enable_incremental if malloc is redirected (Linux)
Ivan Maidanski [Fri, 21 Jun 2019 20:33:32 +0000 (23:33 +0300)]
Fix fread failure after enable_incremental if malloc is redirected (Linux)

The failure is observed in cord refill_cache() executed by cordtest,
fread() fails with EFAULT.  The fix is to disable MPROTECT_VDB on Linux
when REDIRECT_MALLOC is defined.

* include/private/gcconfig.h [(M68K || I386 || ALPHA || IA64 || AARCH64
|| ARM32 || X86_64 || HEXAGON) && LINUX] (MPROTECT_VDB): Do not define
if REDIRECT_MALLOC.

5 years agoDo not use Manual VDB mode if C malloc is redirected
Ivan Maidanski [Fri, 21 Jun 2019 09:24:26 +0000 (12:24 +0300)]
Do not use Manual VDB mode if C malloc is redirected
(fix of commit 06009b0a0)

* misc.c [!GC_DISABLE_INCREMENTAL && (REDIRECT_MALLOC
|| REDIRECT_MALLOC_IN_HEADER)] (GC_init, GC_enable_incremental):
Do not set GC_manual_vdb to true.

5 years agoSpecify rules for installing targets in CMake script
Victor Romero [Wed, 19 Jun 2019 22:31:01 +0000 (01:31 +0300)]
Specify rules for installing targets in CMake script

Issue #281 (bdwgc).

* CMakeLists.txt [build_cord] (cord): Specify install(TARGETS).
* CMakeLists.txt (gc): Likewise.
* CMakeLists.txt [enable_cplusplus] (gccpp): Likewise.

5 years ago.gitignore: Ignore libgccpp shared and static libraries generated by CMake
Ivan Maidanski [Wed, 19 Jun 2019 22:03:58 +0000 (01:03 +0300)]
.gitignore: Ignore libgccpp shared and static libraries generated by CMake

5 years agoBuild gc_cpp.cc as gccpp library by CMake script
Ivan Maidanski [Wed, 19 Jun 2019 22:01:30 +0000 (01:01 +0300)]
Build gc_cpp.cc as gccpp library by CMake script

Issue #281 (bdwgc).

This matches the behavior of the Automake-based build script.

* CMakeLists.txt [enable_cplusplus] (SRC): Do not add gc_cpp.cc.
* CMakeLists.txt [enable_cplusplus] (gccpp): Specify add_library and
target_link_libraries.
* CMakeLists.txt [build_tests && enable_cplusplus] (test_cpp): Add gccpp
to target_link_libraries.

5 years agoCompile 'de' test GUI app with resources by CMake script
Ivan Maidanski [Wed, 19 Jun 2019 21:42:42 +0000 (00:42 +0300)]
Compile 'de' test GUI app with resources by CMake script

* CMakeLists.txt [build_tests && build_cord && WIN32] (de): Add
cord/tests/de_win.rc to add_executable specification.

5 years agoFix 'cordtest: command not found' in Makefile.direct
Ivan Maidanski [Wed, 19 Jun 2019 20:49:22 +0000 (23:49 +0300)]
Fix 'cordtest: command not found' in Makefile.direct
(fix of commit 701ce8de2)

* Makefile.direct (check): Run ./cordtest instead of "cordtest".

5 years ago.gitignore: Ignore libcord shared and static libraries generated by CMake
Ivan Maidanski [Wed, 19 Jun 2019 20:44:20 +0000 (23:44 +0300)]
.gitignore: Ignore libcord shared and static libraries generated by CMake

5 years agoFix 'unresolved external symbol _main' in gctest reported by MS VC
Ivan Maidanski [Wed, 19 Jun 2019 20:41:38 +0000 (23:41 +0300)]
Fix 'unresolved external symbol _main' in gctest reported by MS VC
(fix of commit 78c458958)

Issue #281 (bdwgc).

* CMakeLists.txt [build_tests && enable_cplusplus] (test_cpp): Add WIN32
in add_executable specification.

5 years agoBuild libcord by CMake script
Ivan Maidanski [Wed, 19 Jun 2019 08:48:40 +0000 (11:48 +0300)]
Build libcord by CMake script

Issue #281 (bdwgc).

* CMakeLists.txt [build_cord] (CORD_SRC): Set variable.
* CMakeLists.txt [build_cord] (cord): Specify add_library and
target_link_libraries; remove TODO.
* CMakeLists.txt [install_headers && build_cord] (cord/cord.h,
cord/cord_pos.h, cord/ec.h): Specify install.
* CMakeLists.txt [build_tests && build_cord] (cordtest, de): Do not
compile cord/cordbscs.c, cord/cordprnt.c, cord/cordxtra.c; add cord to
target_link_libraries specification.

5 years agoAppVeyor CI: Add CMake build with the default release configuration
Ivan Maidanski [Tue, 18 Jun 2019 22:36:08 +0000 (01:36 +0300)]
AppVeyor CI: Add CMake build with the default release configuration

5 years agoAppVeyor CI: Test CMake build with enable_large_config
Ivan Maidanski [Tue, 18 Jun 2019 22:34:23 +0000 (01:34 +0300)]
AppVeyor CI: Test CMake build with enable_large_config

5 years agoAppVeyor CI: Add CMake build with disabled shared libraries
Ivan Maidanski [Tue, 18 Jun 2019 22:26:10 +0000 (01:26 +0300)]
AppVeyor CI: Add CMake build with disabled shared libraries

5 years agoGenerate cordtest and de executable files in GC base folder
Ivan Maidanski [Tue, 18 Jun 2019 21:18:27 +0000 (00:18 +0300)]
Generate cordtest and de executable files in GC base folder

This is to match the behavior of Automake- and CMake-based scripts.

* BCC_MAKEFILE (all, cord\de.exe): Rename cord\de.exe to de.exe.
* NT_MAKEFILE (all, cord\de.exe): Likewise.
* doc/README.win32: Likewise.
* Makefile.direct (cord/cordtest, clean, check): Rename cord/cordtest to
cordtest.
* SMakefile.amiga (all, clean, test, cord/cordtest): Likewise.
* Makefile.direct (cord/de): Rename cord/de to de$(EXEEXT); add cord/de
rule depending on de$(EXEEXT).
* Makefile.direct (clean): Rename cord/de to de.
* doc/README.cords: Likewise.
* OS2_MAKEFILE (all, cord\cordtest.exe): Rename cord\cordtest.exe to
cordtest.exe.

5 years agoBuild gc as a shared library by default (CMake)
Ivan Maidanski [Tue, 18 Jun 2019 08:46:32 +0000 (11:46 +0300)]
Build gc as a shared library by default (CMake)

Issue #281 (bdwgc).

* CMakeLists.txt (BUILD_SHARED_LIBS): Document option and set default to ON.
* CMakeLists.txt: Remove commented out ADD_LIBRARY for atomic_ops.
* CMakeLists.txt [BUILD_SHARED_LIBS] (SRC): Override to extra/gc.c.
* CMakeLists.txt [BUILD_SHARED_LIBS] (GC_DLL): Define macro.
* CMakeLists.txt [!BUILD_SHARED_LIBS] (GC_NOT_DLL): Define macro not only
for tests but also for gc library.
* CMakeLists.txt (gc): Remove STATIC in add_library specification.

5 years agoFix 'external linkage required for var because of dllimport' error on MinGW
Ivan Maidanski [Tue, 18 Jun 2019 08:34:55 +0000 (11:34 +0300)]
Fix 'external linkage required for var because of dllimport' error on MinGW

* include/gc_config_macros.h [GC_DLL && !GC_API && !__CEGCC__
&& __MINGW32__ && !GC_BUILD && !__MINGW32_DELAY_LOAD__] (GC_API): Add
"extern" keyword.

5 years agoEnable test_cpp in CMake script
Ivan Maidanski [Mon, 17 Jun 2019 07:51:11 +0000 (10:51 +0300)]
Enable test_cpp in CMake script

Issue #281 (bdwgc).

* CMakeLists.txt [enable_cplusplus] (test_cpp): Uncomment add_executable,
target_link_libraries, add_test; remove TODO.

5 years agoFix building of shared library with C++ support on MinGW
Ivan Maidanski [Mon, 17 Jun 2019 07:18:52 +0000 (10:18 +0300)]
Fix building of shared library with C++ support on MinGW

* include/gc_config_macros.h [GC_DLL && !GC_API && __MINGW32__
&& GC_BUILD && __cplusplus] (GC_API): Add "extern" keyword.

5 years agoMove test executable files produced by CMake to the base folder
Ivan Maidanski [Sat, 15 Jun 2019 12:30:32 +0000 (15:30 +0300)]
Move test executable files produced by CMake to the base folder

Issue #281 (bdwgc).

This is done by moving the content of cord/CMakeLists.txt and
tests/CMakeLists.txt files to the base CMakeLists.txt.

* CMakeLists.txt [build_tests && build_cord]: Move content from
cord/CMakeLists.txt.
* CMakeLists.txt [build_tests && build_cord] (cordtest, de): Add
"cord/" to .c files in add_executable.
* CMakeLists.txt [build_tests]: Move content from tests/CMakeLists.txt.
* CMakeLists.txt [build_tests] (gctest, hugetest, leaktest, middletest,
realloc_test, smashtest, tracetest, test_cpp, disclaim_bench,
disclaim_test, disclaim_weakmap_test, disclaim_weakmap_test): Add
"tests/" to .c and .cc files in add_executable.
* Makefile.am (EXTRA_DIST): Remove cord/CMakeLists.txt,
tests/CMakeLists.txt.
* doc/README.cmake: Update info about CMakeLists.txt files (there is
just one file now).
* cord/CMakeLists.txt: Remove file.
* tests/CMakeLists.txt: Likewise.

5 years agoRename libgc-lib.a to libgc.a in CMake script
Victor Romero [Sat, 15 Jun 2019 10:52:08 +0000 (13:52 +0300)]
Rename libgc-lib.a to libgc.a in CMake script

Issue #281 (bdwgc).

Also specify that libgc.a is used privately in test executables.

* CMakeLists.txt (gc-lib): Rename library to gc in add_library and
set_target_properties.
* cord/CMakeLists.txt [build_tests] (cordtest, de): Rename gc-lib to gc
and add PRIVATE in target_link_libraries.
* tests/CMakeLists.txt (gctest, hugetest, leaktest, middletest,
realloc_test, smashtest): Likewise.
* tests/CMakeLists.txt [enable_gc_debug] (tracetest): Likewise.
* tests/CMakeLists.txt [enable_disclaim] (disclaim_bench,
disclaim_test, disclaim_weakmap_test): Likewise.

5 years agoRemove gcmt-dll generation by CMake
Ivan Maidanski [Fri, 14 Jun 2019 07:40:09 +0000 (10:40 +0300)]
Remove gcmt-dll generation by CMake

Issue #281 (bdwgc).

Now only gc-lib is produced.

* CMakeLists.txt (gcmt-dll): Remove add_library command.

5 years agoRemove gcmt-lib generation by CMake
Ivan Maidanski [Fri, 14 Jun 2019 07:36:48 +0000 (10:36 +0300)]
Remove gcmt-lib generation by CMake

Because of an incorrect definition, gcmt-lib was identical to gc-lib.

* CMakeLists.txt (gcmt-lib): Remove add_library and
set_target_properties commands.

5 years agoRestrict CMake project to C-only language unless enable_cplusplus
Ivan Maidanski [Fri, 14 Jun 2019 07:12:47 +0000 (10:12 +0300)]
Restrict CMake project to C-only language unless enable_cplusplus

Issue #281 (bdwgc).

* CMakeLists.txt (enable_cplusplus): Move option to above project
command.
* CMakeLists.txt [!enable_cplusplus] (project): Specify C as the only
project language.

5 years agoFix gc_cpp.cc compilation by CMake if enable_single_obj_compilation
Ivan Maidanski [Thu, 13 Jun 2019 22:09:15 +0000 (01:09 +0300)]
Fix gc_cpp.cc compilation by CMake if enable_single_obj_compilation
(fix of commit 17885ab0b)

Issue #281 (bdwgc).

* CMakeLists.txt [enable_cplusplus] (SRC): Add gc_cpp.cc after SRC
overridden to extra/gc.c (not before) if enable_single_obj_compilation.

5 years ago.gitignore: Ignore CMake-generated libgc.dll.a
Ivan Maidanski [Thu, 13 Jun 2019 08:02:15 +0000 (11:02 +0300)]
.gitignore: Ignore CMake-generated libgc.dll.a

5 years agoRemove unnecessary checks of __ELF__ for NaCl
Ivan Maidanski [Tue, 11 Jun 2019 07:09:21 +0000 (10:09 +0300)]
Remove unnecessary checks of __ELF__ for NaCl
(code refactoring of commit 9738a14a0)

* dyn_load.c [NACL]: Assume __ELF__ is always defined.

5 years ago.gitignore: Ignore CMake-generated libgc.a
Ivan Maidanski [Tue, 11 Jun 2019 06:37:20 +0000 (09:37 +0300)]
.gitignore: Ignore CMake-generated libgc.a

5 years agoUpdate AUTHORS file (add Maya Rashish)
Ivan Maidanski [Tue, 11 Jun 2019 06:36:09 +0000 (09:36 +0300)]
Update AUTHORS file (add Maya Rashish)

5 years agoGet rid of some non-ELF ifdefs
Maya Rashish [Thu, 6 Jun 2019 02:43:51 +0000 (05:43 +0300)]
Get rid of some non-ELF ifdefs
(code refactoring)

Issue #283 (bdwgc).

Linux started switching to ELF in 1995 (Linux-2.0), due to the previous
a.out being really bad.
NetBSD has used ELF since 2002 (NetBSD 1.6), it's OK to let it go now.
FreeBSD switched to ELF in FreeBSD 3.0 (1998).

* include/private/gcconfig.h [(POWERPC || SPARC || MIPS || ALPHA
|| AARCH64 || ARM32 || X86_64) && FREEBSD] (DYNAMIC_LOADING): Define
regardless of __ELF__ (assuming __ELF__ is always defined).
* include/private/gcconfig.h [(ARM32 || X86_64 || HEXAGON) && LINUX]
(DYNAMIC_LOADING, SEARCH_FOR_DATA_START, DATASTART, DATAEND): Likewise.
* include/private/gcconfig.h [X86_64 && NETBSD] (DATASTART,
DYNAMIC_LOADING): Likewise.