From: Chris Hanson Date: Wed, 2 Oct 1996 18:53:21 +0000 (+0000) Subject: Changes that result in a successful build with the Watcom compiler. X-Git-Tag: 20090517-FFI~5381 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=fb964595c50ccb143bead1156af8a148c4a34d7c;p=mit-scheme.git Changes that result in a successful build with the Watcom compiler. --- diff --git a/v7/src/microcode/cmpauxmd/i386.m4 b/v7/src/microcode/cmpauxmd/i386.m4 index 16742d7eb..066a71c22 100644 --- a/v7/src/microcode/cmpauxmd/i386.m4 +++ b/v7/src/microcode/cmpauxmd/i386.m4 @@ -1,6 +1,6 @@ ### -*-Midas-*- ### -### $Id: i386.m4,v 1.44 1996/03/04 20:31:56 cph Exp $ +### $Id: i386.m4,v 1.45 1996/10/02 18:53:21 cph Exp $ ### ### Copyright (c) 1992-96 Massachusetts Institute of Technology ### @@ -133,10 +133,15 @@ ### If defined, external symbol names are generated as written; ### otherwise, they have an underscore prepended to them. ### CALLER_ALLOCS_STRUCT_RETURN +### STATIC_STRUCT_RETURN ### Controls the conventions used to return 8-byte structs from C -### procedures. If defined, the caller allocates space on the -### stack and passes a pointer to that space on the top of the -### stack. Otherwise, the callee returns the struct in EAX/EDX. +### procedures. If CALLER_ALLOCS_STRUCT_RETURN is defined, the +### caller allocates space on the stack and passes a pointer to +### that space on the top of the stack. If STATIC_STRUCT_RETURN +### is defined, the callee returns a pointer to a static struct in +### EAX. Otherwise, the callee returns the struct in EAX/EDX. +### WCC386 +### Should be defined when using Watcom assembler. ### WCC386R ### Should be defined when using Watcom assembler and generating ### code to use the Watcom register-based argument conventions. @@ -185,6 +190,7 @@ ifdef(`DISABLE_387', IFDOS(`define(DASM,1)') IF_WIN32(`define(DASM,1)') +ifdef(`WCC386R',`define(WCC386,1)') ifdef(`DASM', `define(IFDASM,`$1')', @@ -455,6 +461,9 @@ allocate_word(Scheme_Stack_Segment_Selector) IFOS2(`define(CALLER_ALLOCS_STRUCT_RETURN,1)') IF_LINUX_ELF(`define(CALLER_ALLOCS_STRUCT_RETURN,1)') + +IFDOS(`define(`STATIC_STRUCT_RETURN',1)') +IF_WIN32(`ifdef(`WCC386', `define(`STATIC_STRUCT_RETURN',1)')') DECLARE_CODE_SEGMENT() declare_alignment(2) @@ -630,7 +639,7 @@ ifdef(`CALLER_ALLOCS_STRUCT_RETURN',` ') OP(add,l) TW(IMM(16),REG(esp)) # Pop utility args -IFDOS(` +ifdef(`STATIC_STRUCT_RETURN',` OP(mov,l) TW(LOF(4,REG(eax)),REG(edx)) OP(mov,l) TW(IND(REG(eax)),REG(eax)) ') diff --git a/v7/src/microcode/ntutl/makefile.wcc b/v7/src/microcode/ntutl/makefile.wcc index 47b35d2ae..d07d6a252 100644 --- a/v7/src/microcode/ntutl/makefile.wcc +++ b/v7/src/microcode/ntutl/makefile.wcc @@ -1,8 +1,8 @@ ### -*- Fundamental -*- ### -### $Id: makefile.wcc,v 1.3 1995/10/25 05:01:08 cph Exp $ +### $Id: makefile.wcc,v 1.4 1996/10/02 18:50:56 cph Exp $ ### -### Copyright (c) 1992-95 Massachusetts Institute of Technology +### Copyright (c) 1992-96 Massachusetts Institute of Technology ### ### This material was developed by the Scheme project at the ### Massachusetts Institute of Technology, Department of @@ -53,7 +53,7 @@ UTIL_SYSTEM = os2v2 WRCFLAGS_SYSTEM = /i=$(%NT_INCLUDE) !else UTIL_SYSTEM = nt -WRCFLAGS_SYSTEM = +WRCFLAGS_SYSTEM = /i=$(%NT_INCLUDE) !endif # Compiler options. @@ -61,6 +61,7 @@ WRCFLAGS_SYSTEM = # [OPTIMIZE] marks options used for optimization. # # /4r 386 instructions, 486 timings, register-based args +# /bd build NT DLL # /bt=nt build NT binary (default when host is NT) # /d1+ generate debug info [OPTIMIZE] # /d2 generate debug info [DEBUG] @@ -83,16 +84,17 @@ WRCFLAGS_SYSTEM = # /DMIT_SCHEME required to specialize some code # /DGUI configure a console window # omitted: /DNO_CONST /Di386 -UTIL_CFLAGS = /4r /d2 /ei /fpi /fp3 /op /s /w0 /zc /zp4 /zq -CFLAGS = $(UTIL_CFLAGS) /bt=nt /DMIT_SCHEME /DGUI +UTIL_CFLAGS = /4r /d2 /ei /fpi /fp3 /op /s /w1 /zc /zp4 /zq +CFLAGS = $(UTIL_CFLAGS) /DMIT_SCHEME /DGUI # Linker options. # # debug all include debug info in executable # option caseexact use case-sensitive comparison for identifiers +# option map create a .map file # option quiet operate quietly # option symfile put debug info in .sym file -LDFLAGS = debug all option caseexact option quiet +LDFLAGS = debug all option caseexact option map option quiet # M4 options. # @@ -110,7 +112,15 @@ M4FLAGS = -DWIN32 -DWCC386R # /zq operate quietly ASFLAGS = /bt=nt /d1 /fpi /fp3 /mf /zq -all : scheme.exe bchschem.exe bintopsb.exe psbtobin.exe +# Library Manager options. +# +# /b Suppress backup file +# /c case-sensitive comparison +# /n produce a new output file +# /q operate quietly +WLIB_FLAGS = /b /c /n /q + +all : scheme.exe bchschem.exe scheme32.dll bintopsb.exe psbtobin.exe .c.obj : $(CC) $(CFLAGS) $[@ @@ -370,6 +380,15 @@ bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS) ntscmlib.lib ntgui.res library { ntscmlib.lib $(SCHEME_LIB) } wrc /q /ad /bt=nt ntgui.res $^@ +ntscmlib.lib : scheme32.dll + wlib $(WLIB_FLAGS) $^@ +$[@ + +scheme32.dll : scheme32.obj scheme32.lnk scheme32.lbc + wlink $(LDFLAGS) @scheme32.lnk + +scheme32.obj : scheme32.c ntscmlib.h + $(CC) /bd $(CFLAGS) $[@ + bintopsb.exe : bintopsb.obj missing.obj wlink system nt $(LDFLAGS) name $^@ file { $< } @@ -382,9 +401,6 @@ findprim.exe : findprim.obj findprim.obj : findprim.c $(CC) $(UTIL_CFLAGS) $[@ -ntscmlib.lib : ntscmlib.lbc - wlib /b /c /n /q $^@ @$[@ - # Update the resource if necessary ntgui.res : ntgui.rc ntgui.h ntdialog.dlg ntdialog.h wrc /q /ad /bt=nt /r /x /D__WATCOMC__ $(WRCFLAGS_SYSTEM) $[@ diff --git a/v7/src/microcode/ntutl/wconfig.bat b/v7/src/microcode/ntutl/wconfig.bat index 83141958d..feba645d0 100644 --- a/v7/src/microcode/ntutl/wconfig.bat +++ b/v7/src/microcode/ntutl/wconfig.bat @@ -1,16 +1,15 @@ @echo off rem MIT Scheme microcode configuration script for Win32 / Watcom C rem -rem Copyright (c) 1995 Massachusetts Institute of Technology +rem Copyright (c) 1995-96 Massachusetts Institute of Technology rem -rem $Id: wconfig.bat,v 1.1 1995/10/24 09:34:29 cph Exp $ +rem $Id: wconfig.bat,v 1.2 1996/10/02 18:52:34 cph Exp $ rem copy cmpintmd\i386.h cmpintmd.h copy cmpauxmd\i386-ntw.asm cmpauxmd.asm copy ntutl\makefile.wcc makefile copy ntutl\*.h . copy ntutl\*.c . -copy ntutl\*.mak . copy ntutl\*.lbc . copy ntutl\*.dlg . copy ntutl\*.ico .