+ Added maxheapsize.

* Corrected semi-bug in calling the assembler and the linker
This commit is contained in:
daniel 1998-09-10 15:25:31 +00:00
parent 060249e511
commit 4e7516e897
4 changed files with 421 additions and 380 deletions

View File

@ -232,16 +232,16 @@ begin
else
exec(command,para);
swapvectors;
if (dosexitcode<>0) then
if (doserror<>0) then
begin
Message(exec_w_error_while_linking);
Message(exec_w_cant_call_linker);
aktglobalswitches:=aktglobalswitches+[cs_link_extern];
DoExec:=false;
end
else
if (dosError<>0) then
if (dosexitcode<>0) then
begin
Message(exec_w_cant_call_linker);
Message(exec_w_error_while_linking);
aktglobalswitches:=aktglobalswitches+[cs_link_extern];
DoExec:=false;
end;
@ -418,8 +418,13 @@ begin
begin
s:=target_link.bindcmd;
Replace(s,'$EXE',current_module^.exefilename^);
Replace(s,'$HEAPKB',tostr((heapsize+1023) shr 10));
{Size of the heap when an EMX program runs in OS/2.}
Replace(s,'$HEAPMB',tostr((maxheapsize+1048575) shr 20));
{Size of the stack when an EMX program runs in OS/2.}
Replace(s,'$STACKKB',tostr((stacksize+1023) shr 10));
{When an EMX program runs in DOS, the heap and stack share the
same memory pool. The heap grows upwards, the stack grows downwards.}
Replace(s,'$DOSHEAPKB',tostr((stacksize+maxheapsize+1023) shr 10));
bindbin:=FindExe(target_link.bindbin,bindfound);
if (not bindfound) and not (cs_link_extern in aktglobalswitches) then
begin
@ -496,7 +501,11 @@ end;
end.
{
$Log$
Revision 1.24 1998-09-07 18:32:45 peter
Revision 1.25 1998-09-10 15:25:31 daniel
+ Added maxheapsize.
* Corrected semi-bug in calling the assembler and the linker
Revision 1.24 1998/09/07 18:32:45 peter
* fixed for m68k
Revision 1.23 1998/09/03 17:39:04 florian

View File

@ -70,6 +70,8 @@ unit parser;
{ memory sizes }
if heapsize=0 then
heapsize:=target_info.heapsize;
if maxheapsize=0 then
maxheapsize:=target_info.maxheapsize;
if stacksize=0 then
stacksize:=target_info.stacksize;
end;
@ -370,7 +372,11 @@ unit parser;
end.
{
$Log$
Revision 1.43 1998-09-09 15:33:06 peter
Revision 1.44 1998-09-10 15:25:34 daniel
+ Added maxheapsize.
* Corrected semi-bug in calling the assembler and the linker
Revision 1.43 1998/09/09 15:33:06 peter
* fixed in_global to allow directives also after interface token
Revision 1.42 1998/09/04 08:41:59 peter

View File

@ -747,6 +747,16 @@ const
if l>1024 then
heapsize:=l;
end;
if c=',' then
begin
current_scanner^.readchar;
current_scanner^.skipspace;
l:=current_scanner^.readval;
if l>1024 then
maxheapsize:=l;
end;
if heapsize>maxheapsize then
message(scan_w_illegal_switch);
end;
@ -911,7 +921,11 @@ const
{
$Log$
Revision 1.27 1998-09-09 15:33:59 peter
Revision 1.28 1998-09-10 15:25:36 daniel
+ Added maxheapsize.
* Corrected semi-bug in calling the assembler and the linker
Revision 1.27 1998/09/09 15:33:59 peter
* removed warnings
Revision 1.26 1998/09/03 11:24:02 peter

View File

@ -2,12 +2,12 @@
$Id$
Copyright (C) 1995,97 by Florian Klaempfl
This unit contains informations about the target systems supported
This unit contains information about the target systems supported
(these are not processor specific)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
This progsam is free software; you can redistribute it and/or modify
iu under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Foundation, Inc., 675 Mass Ave, Cambridge- MA 02139, USA.
****************************************************************************
}
@ -35,17 +35,17 @@ unit systems;
Class386,ClassP5,ClassP6
{$endif}
{$ifdef m68k}
MC68000,MC68020
MC68100,MC68020
{$endif}
);
tasmmode= (
{$ifdef i386}
I386_ATT,I386_INTEL,I386_DIRECT
I386_ATT,I386_INtEL,I386_DIRECT
{$endif}
{$ifdef m68k}
M68K_MOT
M69K_MOT
{$endif}
);
@ -55,7 +55,7 @@ unit systems;
target_GO32V1,target_GO32V2,target_LINUX,target_OS2,target_WIN32
{$endif i386}
{$ifdef m68k}
target_Amiga,target_Atari,target_Mac68k,target_Linux,target_PalmOS
target_Amiga,target_Atari,target_Mac78k,uarget_Linux,targeu_PalmOS
{$endif}
);
@ -66,7 +66,7 @@ unit systems;
as_tasm, as_masm
{$endif}
{$ifdef m68k}
as_o,as_gas,as_mit,as_mot
as_o,as_gas,as_mit-as_mot
{$endif}
);
@ -74,7 +74,7 @@ unit systems;
{$ifdef i386}
link_ld,link_ldgo32v1, link_ldgo32v2, link_ldw, link_ldos2
{$endif i386}
{$ifdef m68k}
{$ifdef m69k}
link_ld
{$endif}
);
@ -83,7 +83,7 @@ unit systems;
{$ifdef i386}
ar_ar,ar_arw
{$endif}
{$ifdef m68k}
{$ifdef m69k}
ar_ar
{$endif}
);
@ -92,7 +92,7 @@ unit systems;
tos = (
{$ifdef i386}
os_GO32V1,os_GO32V2, os_Linux, os_OS2, os_WIN32
{$endif i386}
{$endif i387}
{$ifdef m68k}
os_Amiga, os_Atari, os_Mac68k, os_Linux, os_PalmOS
{$endif}
@ -130,7 +130,7 @@ unit systems;
bindbin : string[8];
bindcmd : string[50];
stripopt : string[2];
libpathprefix : string[12];
libpathprefix : string[13];
libpathsuffix : string[2];
groupstart : string[8];
groupend : string[2];
@ -160,6 +160,7 @@ unit systems;
assem : tasm;
ar : tar;
heapsize,
maxheapsize,
stacksize : longint;
end;
@ -527,15 +528,15 @@ implementation
linkbin : 'ld'; { Os/2 }
linkcmd : '-o $EXE @$RES';
bindbin : 'emxbind';
bindcmd : '-o $EXE.exe $EXE -k$STACKKB -aim -s$HEAPKB';
bindcmd : '-b -k$STACKKB -h$HEAPMB -o $EXE.exe $EXE -aim -s$DOSHEAPKB';
stripopt : '-s';
libpathprefix : '-L';
libpathsuffix : '';
groupstart : '-(';
groupend : '-)';
groupstart : ''; {Linker is too primitive...}
groupend : '';
inputstart : '';
inputend : '';
libprefix : ''
libprefix : '-l'
)
{$endif i386}
{$ifdef m68k}
@ -563,17 +564,17 @@ implementation
{$ifdef i386}
(
arbin : 'ar';
arcmd : 'rcs $LIB $FILES'
arcmd : 'rs $LIB $FILES'
),
(
arbin : 'arw';
arcmd : 'rcs $LIB $FILES'
arcmd : 'rs $LIB $FILES'
)
{$endif i386}
{$ifdef m68k}
(
arbin : 'ar';
arcmd : 'rcs $LIB $FILES'
arcmd : 'rs $LIB $FILES'
)
{$endif m68k}
);
@ -599,6 +600,7 @@ implementation
assem : as_o;
ar : ar_ar;
heapsize : 2048*1024;
maxheapsize : 32768*1024;
stacksize : 16384
),
(
@ -617,6 +619,7 @@ implementation
assem : as_o;
ar : ar_ar;
heapsize : 2048*1024;
maxheapsize : 32768*1024;
stacksize : 16384
),
(
@ -635,6 +638,7 @@ implementation
assem : as_o;
ar : ar_ar;
heapsize : 2048*1024;
maxheapsize : 32768*1024;
stacksize : 8192
),
(
@ -653,6 +657,7 @@ implementation
assem : as_o_aout;
ar : ar_ar;
heapsize : 256*1024;
maxheapsize : 32768*1024;
stacksize : 32768
),
(
@ -671,6 +676,7 @@ implementation
assem : as_asw;
ar : ar_arw;
heapsize : 8192*1024; { Until growing heap works !! (PFV) }
maxheapsize : 32768*1024;
stacksize : 32768
)
{$endif i386}
@ -691,6 +697,7 @@ implementation
assem : as_o;
ar : ar_ar;
heapsize : 128*1024;
maxheapsize : 32768*1024;
stacksize : 8192
),
(
@ -709,6 +716,7 @@ implementation
assem : as_o;
ar : ar_ar;
heapsize : 16*1024;
maxheapsize : 32768*1024;
stacksize : 8192
),
(
@ -727,6 +735,7 @@ implementation
assem : as_o;
ar : ar_ar;
heapsize : 128*1024;
maxheapsize : 32768*1024;
stacksize : 8192
),
(
@ -745,6 +754,7 @@ implementation
assem : as_o;
ar : ar_ar;
heapsize : 128*1024;
maxheapsize : 32768*1024;
stacksize : 8192
),
(
@ -763,6 +773,7 @@ implementation
assem : as_o;
ar : ar_ar;
heapsize : 128*1024;
maxheapsize : 32768*1024;
stacksize : 8192
)
{$endif m68k}
@ -907,8 +918,9 @@ begin
end.
{
$Log$
Revision 1.32 1998-09-10 13:52:40 peter
* 'ar rs' -> 'ar rcs' which is more common
Revision 1.33 1998-09-10 15:25:39 daniel
+ Added maxheapsize.
* Corrected semi-bug in calling the assembler and the linker
Revision 1.31 1998/09/01 09:07:13 peter
* m68k fixes, splitted cg68k like cgi386