Some support in makefile for 32 bit model.

This commit is contained in:
David Brown 2016-09-22 20:02:46 +01:00
parent b158671cf8
commit b40dc4e2f8
27 changed files with 141 additions and 116 deletions

View file

@ -65,7 +65,7 @@ MODULE Console; (* J. Templ, 29-June-96 *)
END Hex;
PROCEDURE Read*(VAR ch: CHAR);
VAR n: LONGINT; error: Platform.ErrorCode;
VAR n: SYSTEM.ADDRESS; error: Platform.ErrorCode;
BEGIN Flush();
error := Platform.ReadBuf(Platform.StdIn, ch, n);
IF n # 1 THEN ch := 0X END

View file

@ -34,14 +34,16 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files
Buffer = POINTER TO BufDesc;
FileDesc = RECORD
workName, registerName: FileName;
tempFile: BOOLEAN;
identity: Platform.FileIdentity;
fd-: Platform.FileHandle;
len, pos: LONGINT;
bufs: ARRAY nofbufs OF Buffer;
swapper, state: INTEGER;
next: File;
workName: FileName;
registerName: FileName;
tempFile: BOOLEAN;
identity: Platform.FileIdentity;
fd-: Platform.FileHandle;
len, pos: LONGINT;
bufs: ARRAY nofbufs OF Buffer;
swapper: INTEGER;
state: INTEGER;
next: File;
END;
BufDesc = RECORD
@ -52,11 +54,12 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files
data: ARRAY bufsize OF SYSTEM.BYTE
END;
Rider* = RECORD
res*: LONGINT;
eof*: BOOLEAN;
buf: Buffer;
org, offset: LONGINT
Rider* = RECORD
res*: LONGINT;
eof*: BOOLEAN;
buf: Buffer;
org: LONGINT;
offset: LONGINT
END;

View file

@ -316,7 +316,7 @@ PROCEDURE -structstats "struct stat s";
PROCEDURE -statdev(): LONGINT "(LONGINT)s.st_dev";
PROCEDURE -statino(): LONGINT "(LONGINT)s.st_ino";
PROCEDURE -statmtime(): LONGINT "(LONGINT)s.st_mtime";
PROCEDURE -statsize(): LONGINT "(LONGINT)s.st_size";
PROCEDURE -statsize(): SYSTEM.ADDRESS "(address)s.st_size";
PROCEDURE Identify*(h: FileHandle; VAR identity: FileIdentity): ErrorCode;
BEGIN
@ -358,7 +358,7 @@ BEGIN
END MTimeAsClock;
PROCEDURE Size*(h: FileHandle; VAR l: LONGINT): ErrorCode;
PROCEDURE Size*(h: FileHandle; VAR l: SYSTEM.ADDRESS): ErrorCode;
BEGIN
structstats;
IF fstat(h) < 0 THEN RETURN err() END;

View file

@ -379,6 +379,7 @@ void writeMakeParameters() {
fprintf(fd, "ONAME=%s\n", oname);
fprintf(fd, "DATAMODEL=%s\n", dataModel);
fprintf(fd, "INTSIZE=%d\n", intsize);
fprintf(fd, "MODEL=-O%c\n", intsize == 2 ? '2' : 'V');
fprintf(fd, "ADRSIZE=%d\n", addressSize);
fprintf(fd, "ALIGNMENT=%d\n", alignment);
fprintf(fd, "INSTALLDIR=%s\n", installdir);

View file

@ -97,6 +97,7 @@ translate:
@printf "\nmake translate - translating compiler source from Oberon to C:\n"
@printf " PLATFORM: %s\n" $(PLATFORM)
@printf " INTSIZE: %s\n" $(INTSIZE)
@printf " MODEL: %s\n" $(MODEL)
@printf " ADRSIZE: %s\n" $(ADRSIZE)
@printf " ALIGNMENT: %s\n" $(ALIGNMENT)
@mkdir -p $(BUILDDIR)