From 1e98fcd1d14c270a8dee56345923742e748c7c51 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sat, 22 Apr 2017 17:04:52 +0300 Subject: [PATCH] Enable alternative finalization interface (DISCLAIM) in all makefiles * BCC_MAKEFILE (defines): Add -DENABLE_DISCLAIM. * Makefile.direct (CFLAGS): Likewise. * NT_MAKEFILE (.c.obj): Likewise. * OS2_MAKEFILE (CFLAGS): Likewise. * PCR-Makefile (CFLAGS): Likewise. * WCC_MAKEFILE (DEFS): Likewise. * digimars.mak (DEFINES): Likewise. * gc.mak (CPP_PROJ): Likewise. * build/s60v3/libgc.mmp (ENABLE_DISCLAIM): Uncomment macro. --- BCC_MAKEFILE | 2 +- Makefile.direct | 2 +- NT_MAKEFILE | 2 +- OS2_MAKEFILE | 2 +- PCR-Makefile | 2 +- WCC_MAKEFILE | 2 +- build/s60v3/libgc.mmp | 2 +- digimars.mak | 2 +- gc.mak | 17 ++++++++++------- 9 files changed, 18 insertions(+), 15 deletions(-) diff --git a/BCC_MAKEFILE b/BCC_MAKEFILE index 4e453346..03db5ecd 100644 --- a/BCC_MAKEFILE +++ b/BCC_MAKEFILE @@ -15,7 +15,7 @@ lib= $(bcbin)\tlib link= $(bcbin)\ilink32 cflags= -O2 -R -v- -vi -H -H=gc.csm -I$(bcinclude);$(gcinclude1);$(gcinclude2) -L$(bclib) \ -w-pro -w-aus -w-par -w-ccc -w-rch -a4 -defines= -DALL_INTERIOR_POINTERS -DUSE_GENERIC -DNO_GETENV -DJAVA_FINALIZATION -DGC_OPERATOR_NEW_ARRAY +defines= -DALL_INTERIOR_POINTERS -DUSE_GENERIC -DNO_GETENV -DJAVA_FINALIZATION -DENABLE_DISCLAIM -DGC_OPERATOR_NEW_ARRAY .c.obj: $(cc) @&&| diff --git a/Makefile.direct b/Makefile.direct index f1a8b33a..8488ca79 100644 --- a/Makefile.direct +++ b/Makefile.direct @@ -46,7 +46,7 @@ AO_SRC_DIR=$(srcdir)/libatomic_ops CFLAGS_EXTRA= CFLAGS= -O -I$(srcdir)/include -I$(AO_SRC_DIR)/src \ -DGC_ATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS \ - $(CFLAGS_EXTRA) + -DENABLE_DISCLAIM $(CFLAGS_EXTRA) # To build the collector with threads support, add to the above: # -DGC_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC diff --git a/NT_MAKEFILE b/NT_MAKEFILE index a4d5df37..6958c821 100644 --- a/NT_MAKEFILE +++ b/NT_MAKEFILE @@ -59,7 +59,7 @@ OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_r all: gctest.exe cord\de.exe test_cpp.exe .c.obj: - $(cc) $(cdebug) $(cflags) $(CFLAGS_SPECIFIC) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DCORD_NOT_DLL -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj /wd4100 /wd4127 /wd4701 + $(cc) $(cdebug) $(cflags) $(CFLAGS_SPECIFIC) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DCORD_NOT_DLL -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj /wd4100 /wd4127 /wd4701 # Disable crt security warnings, since unfortunately they warn about all sorts # of safe uses of strncpy. It would be nice to leave the rest enabled. diff --git a/OS2_MAKEFILE b/OS2_MAKEFILE index acfcd566..4fde31cd 100644 --- a/OS2_MAKEFILE +++ b/OS2_MAKEFILE @@ -10,7 +10,7 @@ OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_r CORDOBJS= cord\cordbscs.obj cord\cordxtra.obj cord\cordprnt.obj CC= icc -CFLAGS= /O /Q /DSMALL_CONFIG /DALL_INTERIOR_POINTERS +CFLAGS= /O /Q /DSMALL_CONFIG /DALL_INTERIOR_POINTERS /DENABLE_DISCLAIM # Use /Ti instead of /O for debugging # Setjmp_test may yield overly optimistic results when compiled # without optimization. diff --git a/PCR-Makefile b/PCR-Makefile index ff057808..df8a344c 100644 --- a/PCR-Makefile +++ b/PCR-Makefile @@ -13,7 +13,7 @@ include ../config/common.mk CPPFLAGS = $(INCLUDE) $(CONFIG_CPPFLAGS) \ -DPCR_NO_RENAME -DPCR_NO_HOSTDEP_ERR #CFLAGS = -DPCR $(CONFIG_CFLAGS) -CFLAGS = -DPCR $(CONFIG_CFLAGS) +CFLAGS = -DPCR -DENABLE_DISCLAIM $(CONFIG_CFLAGS) SPECIALCFLAGS = # For code involving asm's ASPPFLAGS = $(INCLUDE) $(CONFIG_ASPPFLAGS) \ diff --git a/WCC_MAKEFILE b/WCC_MAKEFILE index b39df38e..89c6f839 100644 --- a/WCC_MAKEFILE +++ b/WCC_MAKEFILE @@ -25,7 +25,7 @@ CPU=5 OPTIM=-oneatx -s #OPTIM=-ohneatx -s -DEFS=-DALL_INTERIOR_POINTERS #-DSMALL_CONFIG #-DGC_DEBUG +DEFS=-DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM #-DSMALL_CONFIG #-DGC_DEBUG ##### diff --git a/build/s60v3/libgc.mmp b/build/s60v3/libgc.mmp index 8c0dcab5..e074fd2d 100644 --- a/build/s60v3/libgc.mmp +++ b/build/s60v3/libgc.mmp @@ -21,7 +21,7 @@ MACRO USE_MMAP MACRO GC_DONT_REGISTER_MAIN_STATIC_DATA MACRO GC_DLL MACRO SYMBIAN -//MACRO ENABLE_DISCLAIM +MACRO ENABLE_DISCLAIM //MACRO GC_GCJ_SUPPORT USERINCLUDE ..\..\include diff --git a/digimars.mak b/digimars.mak index 7c75eb42..c360aa70 100644 --- a/digimars.mak +++ b/digimars.mak @@ -3,7 +3,7 @@ # Written by Walter Bright -DEFINES=-DNDEBUG -D_WINDOWS -DGC_DLL -DALL_INTERIOR_POINTERS -DWIN32_THREADS +DEFINES=-DNDEBUG -D_WINDOWS -DGC_DLL -DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DWIN32_THREADS CFLAGS=-Iinclude $(DEFINES) -wx -g LFLAGS=/ma/implib/co CC=sc diff --git a/gc.mak b/gc.mak index c0d142a8..c4072a51 100644 --- a/gc.mak +++ b/gc.mak @@ -121,7 +121,8 @@ CPP=cl.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c # ADD CPP /nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /FR /YX /c CPP_PROJ=/nologo /MD /W3 /EHsc /O2 /I include /D "NDEBUG" /D "WIN32"\ - /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /D "_CRT_SECURE_NO_DEPRECATE"\ + /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "ENABLE_DISCLAIM"\ + /D "GC_THREADS" /D "_CRT_SECURE_NO_DEPRECATE"\ /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch"\ /I./libatomic_ops/src /Fo"$(INTDIR)/" /c CPP_OBJS=.\Release/ @@ -313,7 +314,7 @@ CPP=cl.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /FR /YX /c CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I include /D "_DEBUG"\ - /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS"\ + /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "ENABLE_DISCLAIM"\ /D "GC_ASSERTIONS" /D "GC_THREADS" /D "_CRT_SECURE_NO_DEPRECATE"\ /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch" /Fo"$(INTDIR)/"\ /I./libatomic_ops/src /Fd"$(INTDIR)/" /c @@ -453,8 +454,8 @@ CPP=cl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c # ADD CPP /nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /YX /c CPP_PROJ=/nologo /MD /W3 /EHsc /O2 /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS"\ - /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /D "_CRT_SECURE_NO_DEPRECATE"\ - /I./libatomic_ops/src /Fp"$(INTDIR)/gctest.pch"\ + /D "ALL_INTERIOR_POINTERS" /D "ENABLE_DISCLAIM" /D "GC_THREADS"\ + /D "_CRT_SECURE_NO_DEPRECATE" /I./libatomic_ops/src /Fp"$(INTDIR)/gctest.pch"\ /Fo"$(INTDIR)/" /c CPP_OBJS=.\gctest\Release/ CPP_SBRS=.\. @@ -541,7 +542,8 @@ CPP=cl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /FR /YX /c CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I include /D "_DEBUG" /D "WIN32" /D "_WINDOWS"\ - /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /D "_CRT_SECURE_NO_DEPRECATE" /FR"$(INTDIR)/"\ + /D "ALL_INTERIOR_POINTERS" /D "ENABLE_DISCLAIM" /D "GC_THREADS"\ + /D "_CRT_SECURE_NO_DEPRECATE" /FR"$(INTDIR)/"\ /I./libatomic_ops/src /Fp"$(INTDIR)/gctest.pch" /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c CPP_OBJS=.\gctest\Debug/ CPP_SBRS=.\gctest\Debug/ @@ -632,7 +634,8 @@ CPP=cl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /YX /c CPP_PROJ=/nologo /MD /W3 /EHsc /O2 /I "." /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS"\ - /D "ALL_INTERIOR_POINTERS" /I./libatomic_ops/src /Fp"$(INTDIR)/cord.pch" /Fo"$(INTDIR)/" /c + /D "ALL_INTERIOR_POINTERS" /D "ENABLE_DISCLAIM"\ + /I./libatomic_ops/src /Fp"$(INTDIR)/cord.pch" /Fo"$(INTDIR)/" /c CPP_OBJS=.\cord\Release/ CPP_SBRS=.\. @@ -724,7 +727,7 @@ CPP=cl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /YX /c CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I "." /I include /D "_DEBUG" /D "WIN32" /D "_WINDOWS"\ - /D "ALL_INTERIOR_POINTERS" /Fp"$(INTDIR)/cord.pch"\ + /D "ALL_INTERIOR_POINTERS" /D "ENABLE_DISCLAIM" /Fp"$(INTDIR)/cord.pch"\ /I./libatomic_ops/src /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c CPP_OBJS=.\cord\Debug/ CPP_SBRS=.\. -- 2.40.0