From: Ivan Maidanski Date: Tue, 18 Dec 2018 23:17:58 +0000 (+0300) Subject: Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48298ad66e5bc1a3517664ab294d6818ce1c4774;p=gc Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts This matches the policy of configure and CMakeLists.txt. * BCC_MAKEFILE (defines): Add -D GC_ATOMIC_UNCOLLECTABLE. * NT_MAKEFILE (.cpp.obj): Likewise. * Makefile.direct (CFLAGS): Add -D JAVA_FINALIZATION; reorder options. * NT_MAKEFILE (.c.obj): Add -D GC_ATOMIC_UNCOLLECTABLE -D JAVA_FINALIZATION. * OS2_MAKEFILE (CFLAGS): Likewise. * WCC_MAKEFILE (DEFS): Likewise. * build/s60v3/libgc.mmp: Likewise. * digimars.mak (DEFINES): Likewise. * gc.mak [$CFG=="gc - Win32 Release" || $CFG=="gc - Win32 Debug"] (CPP_PROJ): Likewise. * NT_MAKEFILE (.cpp.obj): Remove redundant -I $(AO_INCLUDE_DIR) -D ALL_INTERIOR_POINTERS. --- diff --git a/BCC_MAKEFILE b/BCC_MAKEFILE index 86b45dfd..3df06fc9 100644 --- a/BCC_MAKEFILE +++ b/BCC_MAKEFILE @@ -14,7 +14,8 @@ link= $(bcbin)\ilink32 cflags= -O2 -R -v- -vi -H -H=gc.csm -I$(bcinclude);$(gcinclude1) -L$(bclib) \ -w-pro -w-aus -w-par -w-ccc -w-inl -w-rch -a4 defines= -DALL_INTERIOR_POINTERS -DNO_EXECUTE_PERMISSION -DNO_GETENV \ - -DENABLE_DISCLAIM -DJAVA_FINALIZATION -DGC_OPERATOR_NEW_ARRAY + -DENABLE_DISCLAIM -DGC_ATOMIC_UNCOLLECTABLE -DJAVA_FINALIZATION \ + -DGC_OPERATOR_NEW_ARRAY .c.obj: $(cc) @&&| diff --git a/Makefile.direct b/Makefile.direct index 9e4186b7..89f08654 100644 --- a/Makefile.direct +++ b/Makefile.direct @@ -46,8 +46,8 @@ AO_SRC_DIR=$(srcdir)/libatomic_ops CFLAGS_EXTRA= # We need CFLAGS_FOR_PIC because we might be building a shared library. CFLAGS= -O -I$(srcdir)/include -I$(AO_SRC_DIR)/src \ - -DGC_ATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS \ - -DENABLE_DISCLAIM $(CFLAGS_FOR_PIC) $(CFLAGS_EXTRA) + -DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DGC_ATOMIC_UNCOLLECTABLE \ + -DJAVA_FINALIZATION -DNO_EXECUTE_PERMISSION $(CFLAGS_FOR_PIC) $(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 efb1e969..0f4904ca 100644 --- a/NT_MAKEFILE +++ b/NT_MAKEFILE @@ -92,12 +92,12 @@ OBJS= misc.obj win32_threads.obj alloc.obj reclaim.obj allchblk.obj mach_dep.obj all: gctest.exe cord\de.exe test_cpp.exe .c.obj: - $(cc) $(cdebug) $(cflags) $(CFLAGS_SPECIFIC) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DNO_EXECUTE_PERMISSION -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 -DGC_ATOMIC_UNCOLLECTABLE -DJAVA_FINALIZATION -DNO_EXECUTE_PERMISSION -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. .cpp.obj: - $(cc) $(cdebug) $(cflags) $(CFLAGS_SPECIFIC) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj + $(cc) $(cdebug) $(cflags) $(CFLAGS_SPECIFIC) -Iinclude -DGC_ATOMIC_UNCOLLECTABLE -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj $(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\gc_disclaim.h include\private\msvc_dbg.h diff --git a/OS2_MAKEFILE b/OS2_MAKEFILE index 9a0d6ae7..21a64f65 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 /DALL_INTERIOR_POINTERS /DENABLE_DISCLAIM /DNO_EXECUTE_PERMISSION /DSMALL_CONFIG +CFLAGS= /O /Q /DALL_INTERIOR_POINTERS /DENABLE_DISCLAIM /DGC_ATOMIC_UNCOLLECTABLE /DJAVA_FINALIZATION /DNO_EXECUTE_PERMISSION /DSMALL_CONFIG # Use /Ti instead of /O for debugging # Setjmp_test may yield overly optimistic results when compiled # without optimization. diff --git a/WCC_MAKEFILE b/WCC_MAKEFILE index 4fd4c443..3256265e 100644 --- a/WCC_MAKEFILE +++ b/WCC_MAKEFILE @@ -25,7 +25,7 @@ CPU=5 OPTIM=-oneatx -s #OPTIM=-ohneatx -s -DEFS=-DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DNO_EXECUTE_PERMISSION #-DSMALL_CONFIG +DEFS=-DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DGC_ATOMIC_UNCOLLECTABLE -DJAVA_FINALIZATION -DNO_EXECUTE_PERMISSION #-DSMALL_CONFIG ##### diff --git a/build/s60v3/libgc.mmp b/build/s60v3/libgc.mmp index 7fee8ad1..a0dad4c8 100644 --- a/build/s60v3/libgc.mmp +++ b/build/s60v3/libgc.mmp @@ -18,8 +18,10 @@ CAPABILITY PowerMgmt ReadDeviceData ReadUserData WriteDeviceData WriteUserData S MACRO ALL_INTERIOR_POINTERS MACRO NO_EXECUTE_PERMISSION MACRO USE_MMAP +MACRO GC_ATOMIC_UNCOLLECTABLE MACRO GC_DONT_REGISTER_MAIN_STATIC_DATA MACRO GC_DLL +MACRO JAVA_FINALIZATION MACRO SYMBIAN MACRO ENABLE_DISCLAIM //MACRO GC_GCJ_SUPPORT diff --git a/digimars.mak b/digimars.mak index 9e9f21f8..7aff1d0b 100644 --- a/digimars.mak +++ b/digimars.mak @@ -2,7 +2,7 @@ # compiler from www.digitalmars.com # Written by Walter Bright -DEFINES=-D_WINDOWS -DGC_DLL -DGC_THREADS -DGC_DISCOVER_TASK_THREADS -DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DNO_EXECUTE_PERMISSION +DEFINES=-D_WINDOWS -DGC_DLL -DGC_THREADS -DGC_DISCOVER_TASK_THREADS -DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DGC_ATOMIC_UNCOLLECTABLE -DJAVA_FINALIZATION -DNO_EXECUTE_PERMISSION CFLAGS=-Iinclude -Ilibatomic_ops\src $(DEFINES) -wx -g LFLAGS=/ma/implib/co CC=sc diff --git a/gc.mak b/gc.mak index 32f06d32..67038930 100644 --- a/gc.mak +++ b/gc.mak @@ -120,7 +120,8 @@ CPP=cl.exe # 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 "ENABLE_DISCLAIM"\ - /D "GC_THREADS" /D "NO_EXECUTE_PERMISSION" /D "_CRT_SECURE_NO_DEPRECATE"\ + /D "GC_ATOMIC_UNCOLLECTABLE" /D "GC_THREADS" /D "JAVA_FINALIZATION"\ + /D "NO_EXECUTE_PERMISSION" /D "_CRT_SECURE_NO_DEPRECATE"\ /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch"\ /I./libatomic_ops/src /Fo"$(INTDIR)/" /c CPP_OBJS=.\Release/ @@ -309,7 +310,8 @@ CPP=cl.exe # 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 "ENABLE_DISCLAIM"\ - /D "GC_ASSERTIONS" /D "GC_THREADS" /D "NO_EXECUTE_PERMISSION"\ + /D "GC_ASSERTIONS" /D "GC_ATOMIC_UNCOLLECTABLE" /D "GC_THREADS"\ + /D "JAVA_FINALIZATION" /D "NO_EXECUTE_PERMISSION"\ /D "_CRT_SECURE_NO_DEPRECATE" /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch"\ /Fo"$(INTDIR)/" /I./libatomic_ops/src /Fd"$(INTDIR)/" /c CPP_OBJS=.\Debug/