[Gd-chatter] r10718 - in trunk/fundev/sources/lib/run-time: . pentium-win32
housel at gwydiondylan.org
housel at gwydiondylan.org
Wed May 10 06:41:32 CEST 2006
Author: housel
Date: Wed May 10 06:41:30 2006
New Revision: 10718
Added:
trunk/fundev/sources/lib/run-time/pentium-win32/minvcrt.def (contents, props changed)
trunk/fundev/sources/lib/run-time/pentium-win32/rtsyms.s (contents, props changed)
Modified:
trunk/fundev/sources/lib/run-time/collector.c
trunk/fundev/sources/lib/run-time/pentium-win32/makefile
Log:
Bug: 7311
Include a linkable C runtime library that we can legally redistribute.
* fundev/sources/lib/run-time/pentium-win32/rtsyms.s: GNU as source file
defining __fltused, __ldused, and __except_list, required by
generated C code.
* fundev/sources/lib/run-time/pentium-win32/minvcrt.def: Linker DEF file
containing symbols needed by the Dylan runtime from MSVCRT.dll.
* fundev/sources/lib/run-time/pentium-win32/makefile: Build minvcrt.lib,
and stop copying *.c files from the parent directory.
* fundev/sources/lib/run-time/collector.c (dylan_init_memory_manager):
Only allow 2048 bytes for the OPEN_DYLAN_MPS_HEAP environment variable
on Win32, in order to prevent VC++ from generating calls to the stack
checking routine in the C library.
Modified: trunk/fundev/sources/lib/run-time/collector.c
==============================================================================
--- trunk/fundev/sources/lib/run-time/collector.c (original)
+++ trunk/fundev/sources/lib/run-time/collector.c Wed May 10 06:41:30 2006
@@ -2575,7 +2575,7 @@
mps_gen_param_s *params = NULL;
#ifdef _WIN32
- char specbuf[32768];
+ char specbuf[2048];
const char *spec = NULL;
if(GetEnvironmentVariableA("OPEN_DYLAN_MPS_HEAP", specbuf,
sizeof specbuf) != 0) {
Modified: trunk/fundev/sources/lib/run-time/pentium-win32/makefile
==============================================================================
--- trunk/fundev/sources/lib/run-time/pentium-win32/makefile (original)
+++ trunk/fundev/sources/lib/run-time/pentium-win32/makefile Wed May 10 06:41:30 2006
@@ -42,13 +42,13 @@
CC = $(cc)
LINKLIB = $(implib) /nologo /out:
-CFLAGS = $(cflags) $(cvarsmt) $(cdebug) /I$(INCLUDEDEST) /I$(MPSKIT) $(OPEN_DYLAN_C_FLAGS) $(mmtuneflags) /DEXPIRATION=$(EXPIRATION)
+CFLAGS = $(cflags) $(cvarsmt) $(cdebug) /I$(INCLUDEDEST) /I. /I.. /I$(MPSKIT) $(OPEN_DYLAN_C_FLAGS) $(mmtuneflags) /DEXPIRATION=$(EXPIRATION)
HEAPOBJS = heap-display.obj heap-utils.obj heap-trail.obj heap-order1.obj heap-order2.obj heap-table.obj
OBJS = collector.obj $(HEAPOBJS) runtime.obj win32-threads-primitives.obj spy-interfaces.obj expiration.obj
LIBFILE = pentium-run-time.lib
USEROBJ = dylan-support.obj
USERLIB = dylan-support.lib
-MINCRT = mincrt.lib
+MINCRT = minvcrt.lib
RUNTIMELIBDEST = $(LIBDEST)\pentium-run-time.lib
MMDWDEST = $(LIBDEST)\mmdw.lib
@@ -78,30 +78,25 @@
PLINTHOBJS = plinth.obj mpsiowin32.obj
DYLANPLINTH = dylan-plinth.lib
-# VCINSTALLDIR = C:\apps\ms\VC98
-# Now we use MSVCDIR instead, which is set through VCVAR32.BAT of VC++ Studio
+collector.obj: ..\collector.c
+ $(CC) $(CFLAGS) /c ..\collector.c
+no-weakness-collector.obj: ..\no-weakness-collector.c ..\collector.c
+ $(CC) $(CFLAGS) /c ..\no-weakness-collector.c
-# Install shared runtime sources
-
-collector.c: ..\collector.c
- copy ..\*.c .
- copy ..\*.h .
-
-no-weakness-collector.obj: collector.c
-boehm-collector.obj: collector.c
+boehm-collector.obj: ..\boehm-collector.c ..\collector.c
+ $(CC) $(CFLAGS) /c ..\boehm-collector.c
!if defined(fullcrt)
$(MINCRT):
!else
-#$(MINCRT): $(MINCRTOBJS)
-# $(LINKLIB)$(MINCRT) $(MINCRTOBJS)
-$(MINCRT):
- copy $(MSVCDIR)\lib\libcmt.lib $(MINCRT)
- lib /remove:build\intel\mt_obj\crt0.obj $(MINCRT)
- lib /remove:build\intel\mt_obj\wwcrt0.obj $(MINCRT)
+$(MINCRT): minvcrt.def rtsyms.obj
+ $(LINKLIB)$(MINCRT) /def:minvcrt.def /machine:ix86
+ $(LINKLIB)$(MINCRT) $(MINCRT) rtsyms.obj
!endif
+rtsyms.obj: rtsyms.s
+ as -n -o rtsyms.obj rtsyms.s
$(DYLANPLINTH): $(PLINTHOBJS)
$(LINKLIB)$(DYLANPLINTH) $(PLINTHOBJS)
@@ -121,7 +116,7 @@
$(USERLIB): $(USEROBJ)
$(LINKLIB)$(USERLIB) $(USEROBJ)
-ensure-dirs: collector.c
+ensure-dirs:
if not exist $(LIBDEST) mkdir $(LIBDEST)
if not exist $(BINDEST) mkdir $(BINDEST)
@@ -231,7 +226,6 @@
clean:
pushd . & (del /f /q *collector.obj $(HEAPOBJS) win32-threads-primitives.obj spy-interfaces.obj expiration.obj) & popd
pushd . & (del /f /q *pentium-run-time.lib $(USERLIB)) & popd
- pushd . & (del /f /q $(MINCRT) fltused.obj assert.obj) & popd
+ pushd . & (del /f /q $(MINCRT) rtsyms.obj) & popd
pushd . & (del /f /q $(DYLANPLINTH) $(PLINTHOBJS)) & popd
- pushd . & (del /f /q collector.c) & popd
Added: trunk/fundev/sources/lib/run-time/pentium-win32/minvcrt.def
==============================================================================
--- (empty file)
+++ trunk/fundev/sources/lib/run-time/pentium-win32/minvcrt.def Wed May 10 06:41:30 2006
@@ -0,0 +1,9 @@
+LIBRARY MSVCRT.dll
+EXPORTS
+ _except_handler3
+ _ftol
+ free
+ realloc
+ strtod
+ strtoul
+ clock
Added: trunk/fundev/sources/lib/run-time/pentium-win32/rtsyms.s
==============================================================================
--- (empty file)
+++ trunk/fundev/sources/lib/run-time/pentium-win32/rtsyms.s Wed May 10 06:41:30 2006
@@ -0,0 +1,7 @@
+ .global __fltused
+ .set __fltused, 0x9876
+ .global __ldused
+ .set __ldused, 0x9876
+ .global __except_list
+ .set __except_list, 0
+ .end
More information about the chatter
mailing list