[m-rev.] preparing to update to Boehm GC v8.2.2
Peter Wang
novalazy at gmail.com
Thu Oct 6 18:02:44 AEDT 2022
Hi,
I've made some preparations to update our copy of Boehm GC to the v8.2.x
branch, from v8.0.x. The change of interest in the v8.2.x branch is to
not (unnecessarily) change memory protection when returning memory to
Linux, which ran into issues with too many memory regions.
The v8.2.x branch can also use GCC intrinsics instead of libatomic_ops,
but since libatomic_ops is required for MSVC, I have not made any
changes to remove that dependency.
There is a new branch in our bdwgc repository called
'release-8_2-mercury', and a temporary tag named
'release-8_2-mercury-20221006-rc' for testing purposes.
I've also updated our copy of libatomic_ops from v7.6.12 to v7.6.14
just because.
I've so far bootchecked Mercury with the updated boehm_gc submodule on:
Linux/x86-64
Linux/i686
FreeBSD/x86-64
OpenBSD/x86-64
and cross-compiled for and slightly tested:
Linux/aarch64
MinGW-w64/x86-64
Julien, would you be able to test MacOS and/or MSVC some time?
There is no rush.
For MSVC, our Mmakefile used to use a gc.mak file which has been deleted
upstream. I've changed the rule to use NT_MAKEFILE to produce both
libgc.lib and libpar_gc.lib (both should be identical), but I haven't
tested it. This is the part of the Mmakefile I am referring to:
diff --git a/Mmakefile b/Mmakefile
index 7faeac37..245140db 100644
--- a/Mmakefile
+++ b/Mmakefile
@@ -61,17 +61,16 @@ else
CDEBUG=
endif
-ifeq ("$(GC_GRADE)", "par_gc")
+# FIXME: This used to use gc.mak for par_gc but that file was removed in v8.2.
+# Now we use NT_MAKEFILE for both gc and par_gc. Thread support is enabled by
+# default so there SHOULD be no difference between gc.lib and par_gc.lib
+# but we may want to try building with disable_threads=1 for gc.lib.
+#
+# FIXME: Is it necessary to hardcode cpu=x86?
submake: force
MAKEFLAGS=""; export MAKEFLAGS; \
- TMP=. nmake -f "gc.mak" CFG="gc - Win32 Release"
- mv Release/libpar_gc.dll Release/libpar_gc.lib .
-else
-submake: force
- MAKEFLAGS=""; export MAKEFLAGS; \
- nmake -f NT_MAKEFILE cdebug="$(CDEBUG)" nodebug=1 CPU=x86 MAKE_AS_LIB=1 gc.lib; \
+ nmake -f NT_MAKEFILE cdebug="$(CDEBUG)" nodebug=1 cpu=x86 enable_static=1 gc.lib; \
cp gc.lib lib$(GC_GRADE).lib
-endif
clean_local:
rm -rf Release/ Debug/
Peter
More information about the reviews
mailing list