Fwd: [Gc] GC on 64 bit linux
friedrichdominicus at googlemail.com
Fri Aug 31 06:01:07 PDT 2007
---------- Forwarded message ----------
From: Friedrich Dominicus <friedrichdominicus at googlemail.com>
Date: 31.08.2007 14:20
Subject: Re: [Gc] GC on 64 bit linux
To: "Boehm, Hans" <hans.boehm at hp.com>
Ok I have gone this way and it seems I have a makefile which at least
here could be used successfully.
It's a bit of a mixture as suggested. It may be that I've overseen
even obvious things. Howerver it compiles (with debug information) and
gctest tells me it has run successfull also. Here's the Makefile, feel
free to try it out and modify it to you needs, but don't come over me
if it does anything harmful please
ATTENTION: I just have set the flags that debug information are kept.
I have just run gctest, but not anything related to C++ tests. I do
not like C++ and doubt I ever will....
# Makefile for Windows NT. Assumes Microsoft compiler.
# DLLs are included in the root set under NT, but not under win32S.
# modified 2007 August: - copied from NT_X64_STATIC_THREADS_MAKEFILES
# - checked agaist NT_THREADS_MAKEFILE
# - added changes to integrate the tools
# - currently just with debug information
# problems can be send to
# frido at q-software-solutions.de
# or the mailing list
# Make sure that .cc is not viewed as a suffix. It is for VC++2005, but
# not earlier versions. We can deal with either, but not inconsistency.
.SUFFIXES: .obj .cpp .c
# Atomic_ops installation directory. For win32, the source directory
# should do, since we only need the headers.
# We assume this was manually unpacked, since I'm not sure there is
# a Windows standard command line tool to do this.
OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj
os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj
finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj
dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj
win32_threads.obj msvc_dbg.obj thread_local_alloc.obj
$(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR)
-DALL_INTERIOR_POINTERS -DGC_DLL -D__STDC__ -DGC_BUILD
-DGC_WIN32_THREADS $*.c /Fo$*.obj /wd4701 -D_CRT_SECURE_NO_DEPRECATE
# Disable "may not be initialized" warnings. They're too approximate.
# 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.
# $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR)
#-DALL_INTERIOR_POINTERS -DGC_NOT_DLL $*.CPP -DGC_WIN32_THREADS
#-DTHREAD_LOCAL_ALLOC /Fo$*.obj -D_CRT_SECURE_NO_DEPRECATE
$(OBJS) tests\test.obj: include\private\gc_priv.h
include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h
LINK64_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib /nologo /subsystem:windows /dll /incremental:no\
/pdb:"gc.pdb" /machine:X64 /out:"gc64_dll.dll"\
gc64_dll.dll : $(OBJS)
$(LINK64) $(ldebug) $(LINK64_FLAGS) $(OBJS)
gctest.exe: test.obj gc64_dll.lib
# This produces a "GUI" applications that opens no windows and writes
to the log file
# "gc.log". This was done to make the result runnable under win32s and
# should be fixed.
$(link) $(ldebug) $(guiflags) -stack:131072 -out:$*.exe test.obj
cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
cord\de.obj cord\de_win.obj: include\cord.h include\private\cord_pos.h
cord\de_win.res: cord\de_win.rc cord\de_win.h cord\de_cmds.h
$(rc) $(rcvars) -r -fo cord\de_win.res cord\de_win.rc
# Cord/de is a real win32 gui application.
cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj
cord\de_win.obj cord\de_win.rbj gc.lib
$(link) $(ldebug) $(guiflags) -stack:16384 -out:cord\de.exe
cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj
cord\de_win.rbj gc.lib $(guilibs)
gc_cpp.obj: include\gc_cpp.h include\gc.h
copy gc_cpp.cc gc_cpp.cpp
copy tests\test_cpp.cc test_cpp.cpp
# This generates the C++ test executable. The executable expects
# a single numeric argument, which is the number of iterations.
# The output appears in the file "gc.log".
test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib
$(link) $(ldebug) $(guiflags) -stack:16384 -out:test_cpp.exe
test_cpp.obj gc.lib $(guilibs)
tar xvfz $(AO_SRC_DIR).tar.gz;
del *.obj gc64_dll.lib gc64_dll.dll
More information about the Gc