* small os2 fixes

* fixed interdependent units with newppu (remake3 under linux works now)
This commit is contained in:
peter 1998-06-17 14:10:11 +00:00
parent 6452fa5095
commit f07849effe
8 changed files with 819 additions and 827 deletions

View File

@ -136,6 +136,7 @@ unit files;
procedure setfilename(const _path,name:string);
{$ifdef NEWPPU}
function openppu:boolean;
destructor done;virtual;
{$else}
function load_ppu(const unit_path,n,ext:string):boolean;
{$endif}
@ -234,13 +235,14 @@ unit files;
{$endif}
var
main_module : pmodule;
current_module : pmodule;
main_module : pmodule; { Main module of the program }
current_module : pmodule; { Current module which is compiled }
{$ifdef NEWPPU}
current_ppu : pppufile;
current_ppu : pppufile; { Current ppufile which is read }
{$endif}
global_unit_count : word;
loaded_units : tlinkedlist;
usedunits : tlinkedlist; { Used units for this program }
loaded_units : tlinkedlist; { All loaded units }
implementation
@ -254,7 +256,6 @@ unit files;
****************************************************************************}
constructor textfile.init(const p,n,e : string);
begin
inherited init(p+n+e,extbufsize);
path:=stringdup(p);
@ -263,17 +264,16 @@ unit files;
end;
destructor textfile.done;
begin
inherited done;
end;
{****************************************************************************
TINPUTFILE
****************************************************************************}
constructor tinputfile.init(const p,n,e : string);
begin
inherited init(p,n,e);
filenotatend:=true;
@ -284,13 +284,12 @@ unit files;
end;
procedure tinputfile.write_file_line(var t : text);
begin
write(t,get_file_line);
end;
function tinputfile.get_file_line : string;
function tinputfile.get_file_line : string;
begin
if Use_Rhide then
get_file_line:=lower(bstoslash(path^)+name^+ext^)+':'+tostr(line_no)+':'
@ -298,22 +297,21 @@ unit files;
get_file_line:=name^+ext^+'('+tostr(line_no)+')'
end;
{****************************************************************************
TFILEMANAGER
****************************************************************************}
constructor tfilemanager.init;
begin
files:=nil;
last_ref_index:=0;
end;
destructor tfilemanager.done;
destructor tfilemanager.done;
var
hp : pextfile;
begin
hp:=files;
while assigned(hp) do
@ -325,11 +323,10 @@ unit files;
last_ref_index:=0;
end;
procedure tfilemanager.close_all;
procedure tfilemanager.close_all;
var
hp : pextfile;
begin
hp:=files;
while assigned(hp) do
@ -339,8 +336,8 @@ unit files;
end;
end;
procedure tfilemanager.register_file(f : pextfile);
procedure tfilemanager.register_file(f : pextfile);
begin
inc(last_ref_index);
f^._next:=files;
@ -348,8 +345,8 @@ unit files;
files:=f;
end;
function tfilemanager.get_file(w : word) : pextfile;
function tfilemanager.get_file(w : word) : pextfile;
var
ff : pextfile;
begin
@ -359,6 +356,7 @@ unit files;
get_file:=ff;
end;
{****************************************************************************
TMODULE
****************************************************************************}
@ -387,91 +385,91 @@ unit files;
objfiletime,
ppufiletime,
asmfiletime : longint;
begin
openppu:=false;
{ Get ppufile time (also check if the file exists) }
ppufiletime:=getnamedfiletime(ppufilename^);
if ppufiletime=-1 then
exit;
{ Open the ppufile }
Message1(unit_u_ppu_loading,ppufilename^);
ppufile:=new(pppufile,init(ppufilename^));
if not ppufile^.open then
begin
dispose(ppufile,done);
Message(unit_d_ppu_file_too_short);
begin
openppu:=false;
{ Get ppufile time (also check if the file exists) }
ppufiletime:=getnamedfiletime(ppufilename^);
if ppufiletime=-1 then
exit;
end;
{ check for a valid PPU file }
if not ppufile^.CheckPPUId then
begin
dispose(ppufile,done);
Message(unit_d_ppu_invalid_header);
exit;
end;
{ check for allowed PPU versions }
if not (ppufile^.GetPPUVersion in [15]) then
begin
dispose(ppufile,done);
Message1(unit_d_ppu_invalid_version,tostr(ppufile^.GetPPUVersion));
exit;
end;
{ check the target processor }
if ttargetcpu(ppufile^.header.cpu)<>target_cpu then
begin
dispose(ppufile,done);
Comment(V_Debug,'unit is compiled for an other processor');
exit;
end;
{ check target }
if ttarget(ppufile^.header.target)<>target_info.target then
begin
dispose(ppufile,done);
Comment(V_Debug,'unit is compiled for an other target');
exit;
end;
{!!!!!!!!!!!!!!!!!!! }
{ Load values to be access easier }
flags:=ppufile^.header.flags;
crc:=ppufile^.header.checksum;
{ Show Debug info }
Message1(unit_d_ppu_time,filetimestring(ppufiletime));
Message1(unit_d_ppu_flags,tostr(flags));
Message1(unit_d_ppu_crc,tostr(ppufile^.header.checksum));
{ check the object and assembler file to see if we need only to
assemble, only if it's not in a library }
do_compile:=false;
if (flags and uf_in_library)=0 then
begin
if (flags and uf_smartlink)<>0 then
begin
objfiletime:=getnamedfiletime(libfilename^);
if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
do_compile:=true;
end
else
begin
{ the objectfile should be newer than the ppu file }
objfiletime:=getnamedfiletime(objfilename^);
if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
begin
{ check if assembler file is older than ppu file }
asmfileTime:=GetNamedFileTime(asmfilename^);
if (asmfiletime<0) or (ppufiletime>asmfiletime) then
begin
Message(unit_d_obj_and_asm_are_older_than_ppu);
do_compile:=true;
end
else
begin
Message(unit_d_obj_is_older_than_asm);
do_assemble:=true;
end;
end;
end;
end;
openppu:=true;
end;
{ Open the ppufile }
Message1(unit_u_ppu_loading,ppufilename^);
ppufile:=new(pppufile,init(ppufilename^));
if not ppufile^.open then
begin
dispose(ppufile,done);
Message(unit_d_ppu_file_too_short);
exit;
end;
{ check for a valid PPU file }
if not ppufile^.CheckPPUId then
begin
dispose(ppufile,done);
Message(unit_d_ppu_invalid_header);
exit;
end;
{ check for allowed PPU versions }
if not (ppufile^.GetPPUVersion in [15]) then
begin
dispose(ppufile,done);
Message1(unit_d_ppu_invalid_version,tostr(ppufile^.GetPPUVersion));
exit;
end;
{ check the target processor }
if ttargetcpu(ppufile^.header.cpu)<>target_cpu then
begin
dispose(ppufile,done);
Comment(V_Debug,'unit is compiled for an other processor');
exit;
end;
{ check target }
if ttarget(ppufile^.header.target)<>target_info.target then
begin
dispose(ppufile,done);
Comment(V_Debug,'unit is compiled for an other target');
exit;
end;
{!!!!!!!!!!!!!!!!!!! }
{ Load values to be access easier }
flags:=ppufile^.header.flags;
crc:=ppufile^.header.checksum;
{ Show Debug info }
Message1(unit_d_ppu_time,filetimestring(ppufiletime));
Message1(unit_d_ppu_flags,tostr(flags));
Message1(unit_d_ppu_crc,tostr(ppufile^.header.checksum));
{ check the object and assembler file to see if we need only to
assemble, only if it's not in a library }
do_compile:=false;
if (flags and uf_in_library)=0 then
begin
if (flags and uf_smartlink)<>0 then
begin
objfiletime:=getnamedfiletime(libfilename^);
if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
do_compile:=true;
end
else
begin
{ the objectfile should be newer than the ppu file }
objfiletime:=getnamedfiletime(objfilename^);
if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
begin
{ check if assembler file is older than ppu file }
asmfileTime:=GetNamedFileTime(asmfilename^);
if (asmfiletime<0) or (ppufiletime>asmfiletime) then
begin
Message(unit_d_obj_and_asm_are_older_than_ppu);
do_compile:=true;
end
else
begin
Message(unit_d_obj_is_older_than_asm);
do_assemble:=true;
end;
end;
end;
end;
openppu:=true;
end;
function tmodule.search_unit(const n : string):boolean;
@ -554,6 +552,12 @@ unit files;
{$else NEWPPU}
{*****************************************************************************
Old PPU
*****************************************************************************}
function tmodule.load_ppu(const unit_path,n,ext : string):boolean;
var
header : tunitheader;
@ -573,153 +577,152 @@ unit files;
_n : namestr;
_e : extstr;
{$endif UseBrowser}
begin
load_ppu:=false;
{ Get ppufile time (also check if the file exists) }
ppufiletime:=getnamedfiletime(ppufilename^);
if ppufiletime=-1 then
exit;
Message1(unit_u_ppu_loading,ppufilename^);
ppufile:=new(pextfile,init(unit_path,n,ext));
ppufile^.reset;
ppufile^.flush;
{ load the header }
ppufile^.read_data(header,sizeof(header),count);
if count<>sizeof(header) then
begin
ppufile^.done;
Message(unit_d_ppu_file_too_short);
begin
load_ppu:=false;
{ Get ppufile time (also check if the file exists) }
ppufiletime:=getnamedfiletime(ppufilename^);
if ppufiletime=-1 then
exit;
end;
{ check for a valid PPU file }
if (header[0]<>'P') or (header[1]<>'P') or (header[2]<>'U') then
begin
ppufile^.done;
Message(unit_d_ppu_invalid_header);
exit;
end;
{ load ppu version }
val(header[3]+header[4]+header[5],ppuversion,code);
if not(ppuversion in [13..14]) then
begin
ppufile^.done;
Message1(unit_d_ppu_invalid_version,tostr(ppuversion));
exit;
end;
flags:=byte(header[9]);
crc:=plongint(@header[10])^;
{Get ppufile time}
ppufiletime:=getnamedfiletime(ppufilename^);
{Show Debug info}
Message1(unit_d_ppu_time,filetimestring(ppufiletime));
Message1(unit_d_ppu_flags,tostr(flags));
Message1(unit_d_ppu_crc,tostr(crc));
{ read name if its there }
ppufile^.read_data(b,1,count);
if b=ibunitname then
begin
ppufile^.read_data(hs[0],1,count);
ppufile^.read_data(hs[1],ord(hs[0]),count);
stringdispose(modulename);
modulename:=stringdup(hs);
ppufile^.read_data(b,1,count);
end;
Message1(unit_u_ppu_loading,ppufilename^);
ppufile:=new(pextfile,init(unit_path,n,ext));
ppufile^.reset;
ppufile^.flush;
{ load the header }
ppufile^.read_data(header,sizeof(header),count);
if count<>sizeof(header) then
begin
ppufile^.done;
Message(unit_d_ppu_file_too_short);
exit;
end;
{ check for a valid PPU file }
if (header[0]<>'P') or (header[1]<>'P') or (header[2]<>'U') then
begin
ppufile^.done;
Message(unit_d_ppu_invalid_header);
exit;
end;
{ load ppu version }
val(header[3]+header[4]+header[5],ppuversion,code);
if not(ppuversion in [13..14]) then
begin
ppufile^.done;
Message1(unit_d_ppu_invalid_version,tostr(ppuversion));
exit;
end;
flags:=byte(header[9]);
crc:=plongint(@header[10])^;
{Get ppufile time}
ppufiletime:=getnamedfiletime(ppufilename^);
{Show Debug info}
Message1(unit_d_ppu_time,filetimestring(ppufiletime));
Message1(unit_d_ppu_flags,tostr(flags));
Message1(unit_d_ppu_crc,tostr(crc));
{ search source files there is at least one source file }
do_compile:=false;
sources_avail:=true;
while b<>ibend do
begin
ppufile^.read_data(hs[0],1,count);
ppufile^.read_data(hs[1],ord(hs[0]),count);
ppufile^.read_data(b,1,count);
temp:='';
if (flags and uf_in_library)<>0 then
begin
sources_avail:=false;
temp:=' library';
end
else
begin
{ check the date of the source files }
Source_Time:=GetNamedFileTime(unit_path+hs);
if Source_Time=-1 then
begin
{ search for include files in the includepathlist }
if b<>ibend then
begin
temp:=search(hs,includesearchpath,incfile_found);
if incfile_found then
begin
hs:=temp+hs;
Source_Time:=GetNamedFileTime(hs);
end;
end;
end
else
hs:=unit_path+hs;
if Source_Time=-1 then
begin
sources_avail:=false;
temp:=' not found';
end
else
begin
temp:=' time '+filetimestring(source_time);
if (source_time>ppufiletime) then
{ read name if its there }
ppufile^.read_data(b,1,count);
if b=ibunitname then
begin
ppufile^.read_data(hs[0],1,count);
ppufile^.read_data(hs[1],ord(hs[0]),count);
stringdispose(modulename);
modulename:=stringdup(hs);
ppufile^.read_data(b,1,count);
end;
{ search source files there is at least one source file }
do_compile:=false;
sources_avail:=true;
while b<>ibend do
begin
ppufile^.read_data(hs[0],1,count);
ppufile^.read_data(hs[1],ord(hs[0]),count);
ppufile^.read_data(b,1,count);
temp:='';
if (flags and uf_in_library)<>0 then
begin
sources_avail:=false;
temp:=' library';
end
else
begin
{ check the date of the source files }
Source_Time:=GetNamedFileTime(unit_path+hs);
if Source_Time=-1 then
begin
do_compile:=true;
temp:=temp+' *'
end;
end;
end;
Message1(unit_t_ppu_source,hs+temp);
{$ifdef UseBrowser}
fsplit(hs,_d,_n,_e);
new(hp,init(_d,_n,_e));
{ the indexing should match what is done in writeasunit }
sourcefiles.register_file(hp);
{$endif UseBrowser}
end;
{ main source is always the last }
stringdispose(mainsource);
mainsource:=stringdup(hs);
{ check the object and assembler file if not a library }
if (flags and uf_smartlink)<>0 then
begin
objfiletime:=getnamedfiletime(libfilename^);
if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
do_compile:=true;
end
else
begin
if (flags and uf_in_library)=0 then
begin
{ the objectfile should be newer than the ppu file }
objfiletime:=getnamedfiletime(objfilename^);
if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
begin
{ check if assembler file is older than ppu file }
asmfileTime:=GetNamedFileTime(asmfilename^);
if (asmfiletime<0) or (ppufiletime>asmfiletime) then
begin
Message(unit_d_obj_and_asm_are_older_than_ppu);
do_compile:=true;
{ search for include files in the includepathlist }
if b<>ibend then
begin
temp:=search(hs,includesearchpath,incfile_found);
if incfile_found then
begin
hs:=temp+hs;
Source_Time:=GetNamedFileTime(hs);
end;
end;
end
else
begin
Message(unit_d_obj_is_older_than_asm);
do_assemble:=true;
end;
end;
end;
end;
load_ppu:=true;
end;
else
hs:=unit_path+hs;
if Source_Time=-1 then
begin
sources_avail:=false;
temp:=' not found';
end
else
begin
temp:=' time '+filetimestring(source_time);
if (source_time>ppufiletime) then
begin
do_compile:=true;
temp:=temp+' *'
end;
end;
end;
Message1(unit_t_ppu_source,hs+temp);
{$ifdef UseBrowser}
fsplit(hs,_d,_n,_e);
new(hp,init(_d,_n,_e));
{ the indexing should match what is done in writeasunit }
sourcefiles.register_file(hp);
{$endif UseBrowser}
end;
{ main source is always the last }
stringdispose(mainsource);
mainsource:=stringdup(hs);
{ check the object and assembler file if not a library }
if (flags and uf_smartlink)<>0 then
begin
objfiletime:=getnamedfiletime(libfilename^);
if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
do_compile:=true;
end
else
begin
if (flags and uf_in_library)=0 then
begin
{ the objectfile should be newer than the ppu file }
objfiletime:=getnamedfiletime(objfilename^);
if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
begin
{ check if assembler file is older than ppu file }
asmfileTime:=GetNamedFileTime(asmfilename^);
if (asmfiletime<0) or (ppufiletime>asmfiletime) then
begin
Message(unit_d_obj_and_asm_are_older_than_ppu);
do_compile:=true;
end
else
begin
Message(unit_d_obj_is_older_than_asm);
do_assemble:=true;
end;
end;
end;
end;
load_ppu:=true;
end;
function tmodule.search_unit(const n : string):boolean;
var
@ -802,7 +805,6 @@ unit files;
{$endif NEWPPU}
constructor tmodule.init(const s:string;_is_unit:boolean);
var
p : dirstr;
@ -856,8 +858,32 @@ unit files;
end;
end;
destructor tmodule.special_done;
destructor tmodule.done;
begin
if assigned(map) then
dispose(map);
if assigned(ppufile) then
dispose(ppufile,done);
if assigned(imports) then
dispose(imports,done);
used_units.done;
sourcefiles.done;
linkofiles.done;
linkstaticlibs.done;
linksharedlibs.done;
stringdispose(objfilename);
stringdispose(asmfilename);
stringdispose(ppufilename);
stringdispose(libfilename);
stringdispose(path);
stringdispose(modulename);
stringdispose(mainsource);
inherited done;
end;
destructor tmodule.special_done;
begin
if assigned(map) then
dispose(map);
@ -893,6 +919,7 @@ unit files;
unitid:=0;
end;
constructor tused_unit.init_to_load(const n:string;c:longint;intface:boolean);
begin
u:=nil;
@ -905,6 +932,7 @@ unit files;
unitid:=0;
end;
destructor tused_unit.done;
begin
stringdispose(name);
@ -933,7 +961,11 @@ unit files;
end.
{
$Log$
Revision 1.24 1998-06-16 08:56:20 peter
Revision 1.25 1998-06-17 14:10:11 peter
* small os2 fixes
* fixed interdependent units with newppu (remake3 under linux works now)
Revision 1.24 1998/06/16 08:56:20 peter
+ targetcpu
* cleaner pmodules for newppu

View File

@ -278,6 +278,13 @@ Var
LinkResponse : Text;
i : longint;
prtobj,s,s2 : string;
procedure WriteRes(const s:string);
begin
if s<>'' then
WriteLn(Linkresponse,s);
end;
begin
WriteResponseFile:=False;
{ set special options for some targets }
@ -330,19 +337,19 @@ begin
i:=255;
S:=Copy(S2,1,i-1);
If S<>'' then
WriteLn(linkresponse,target_link.libpathprefix+s+target_link.libpathsuffix);
WriteRes(target_link.libpathprefix+s+target_link.libpathsuffix);
Delete (S2,1,i);
until S2='';
writeln(linkresponse,target_link.inputstart);
WriteRes(target_link.inputstart);
{ add objectfiles, start with prt0 always }
if prtobj<>'' then
Writeln(linkresponse,FindObjectFile(prtobj));
WriteRes(FindObjectFile(prtobj));
while not ObjectFiles.Empty do
begin
s:=ObjectFiles.Get;
if s<>'' then
Writeln(linkresponse,s);
WriteRes(s);
end;
{ Write sharedlibraries like -l<lib> }
@ -352,20 +359,20 @@ begin
i:=Pos(target_os.sharedlibext,S);
if i>0 then
Delete(S,i,255);
writeln(linkresponse,target_link.libprefix+s);
WriteRes(target_link.libprefix+s);
end;
writeln(linkresponse,target_link.inputend);
WriteRes(target_link.inputend);
{ Write staticlibraries }
if not StaticLibFiles.Empty then
begin
Writeln(LinkResponse,target_link.GroupStart);
WriteRes(target_link.GroupStart);
While not StaticLibFiles.Empty do
begin
S:=StaticLibFiles.Get;
writeln(linkresponse,s)
WriteRes(s)
end;
Writeln(LinkResponse,target_link.GroupEnd);
WriteRes(target_link.GroupEnd);
end;
{ Close response }
@ -479,7 +486,11 @@ end;
end.
{
$Log$
Revision 1.13 1998-06-08 22:59:46 peter
Revision 1.14 1998-06-17 14:10:13 peter
* small os2 fixes
* fixed interdependent units with newppu (remake3 under linux works now)
Revision 1.13 1998/06/08 22:59:46 peter
* smartlinking works for win32
* some defines to exclude some compiler parts

View File

@ -259,8 +259,7 @@ const ar_magic:array[1..8] of char='!<arch>'#10;
begin
seq_no:=1;
Linker.AddSharedLibrary(s+'.dll');
current_module^.linkofiles.insert(s+'.dll');
current_module^.linksharedlibs.insert(s);
assign(out_file,s+'.ao2');
rewrite(out_file,1);
blockwrite(out_file,ar_magic,sizeof(ar_magic));
@ -329,7 +328,11 @@ end.
{
$Log$
Revision 1.3 1998-06-04 23:51:48 peter
Revision 1.4 1998-06-17 14:10:14 peter
* small os2 fixes
* fixed interdependent units with newppu (remake3 under linux works now)
Revision 1.3 1998/06/04 23:51:48 peter
* m68k compiles
+ .def file creation moved to gendef.pas so it could also be used
for win32

View File

@ -67,11 +67,32 @@ unit parser;
loaded_units.init;
usedunits.init;
{ memory sizes }
if heapsize=0 then
heapsize:=target_info.heapsize;
if stacksize=0 then
stacksize:=target_info.stacksize;
end;
procedure default_macros;
var
hp : pstring_item;
begin
{ commandline }
hp:=pstring_item(initdefines.first);
while assigned(hp) do
begin
def_macro(hp^.str^);
hp:=pstring_item(hp^.next);
end;
{ set macros for version checking }
set_macro('FPC_VERSION',version_nr);
set_macro('FPC_RELEASE',release_nr);
set_macro('FPC_PATCH',patch_nr);
end;
{ moved out to save stack }
var
addparam : string;
procedure compile(const filename:string;compile_system:boolean);
var
@ -104,65 +125,6 @@ unit parser;
oldoptprocessor : tprocessors;
oldasmmode : tasmmode;
procedure def_macro(const s : string);
var
mac : pmacrosym;
begin
mac:=pmacrosym(macros^.search(s));
if mac=nil then
begin
mac:=new(pmacrosym,init(s));
Message1(parser_m_macro_defined,mac^.name);
macros^.insert(mac);
end;
mac^.defined:=true;
end;
procedure set_macro(const s : string;value : string);
var
mac : pmacrosym;
begin
mac:=pmacrosym(macros^.search(s));
if mac=nil then
begin
mac:=new(pmacrosym,init(s));
macros^.insert(mac);
end
else
begin
if assigned(mac^.buftext) then
freemem(mac^.buftext,mac^.buflen);
end;
Message2(parser_m_macro_set_to,mac^.name,value);
mac^.buflen:=length(value);
getmem(mac^.buftext,mac^.buflen);
move(value[1],mac^.buftext^,mac^.buflen);
mac^.defined:=true;
end;
procedure define_macros;
var
hp : pstring_item;
begin
hp:=pstring_item(initdefines.first);
while assigned(hp) do
begin
def_macro(hp^.str^);
hp:=pstring_item(hp^.next);
end;
{ set macros for version checking }
set_macro('FPC_VERSION',version_nr);
set_macro('FPC_RELEASE',release_nr);
set_macro('FPC_PATCH',patch_nr);
end;
label
done;
@ -181,12 +143,19 @@ unit parser;
but it should be reset to zero for each module }
aktprocsym:=nil;
{ first, we assume a program }
if not(assigned(current_module)) then
begin
current_module:=new(pmodule,init(filename,false));
main_module:=current_module;
end;
{ reset the unit or create a new program }
if assigned(current_module) then
begin
current_module^.sourcefiles.done;
current_module^.sourcefiles.init;
current_module^.used_units.done;
current_module^.used_units.init;
end
else
begin
current_module:=new(pmodule,init(filename,false));
main_module:=current_module;
end;
{ save scanner state }
oldmacros:=macros;
@ -244,11 +213,10 @@ unit parser;
if compile_system then
aktswitches:=aktswitches+[cs_compilesystem];
{ macros }
macros:=new(psymtable,init(macrosymtable));
macros^.name:=stringdup('Conditionals for '+filename);
define_macros;
default_macros;
{ startup scanner }
token:=yylex;
@ -266,13 +234,9 @@ unit parser;
begin
{ open assembler response }
AsmRes.Init('ppas');
{$ifdef UseBrowser}
{ open browser if set }
if cs_browser in initswitches then
Browse.CreateLog;
{$endif UseBrowser}
end;
{ load system unit always }
loadsystemunit;
registerdef:=true;
@ -433,7 +397,9 @@ done:
if cs_browser in initswitches then
begin
Comment(V_Info,'Writing Browser '+Browse.Fname);
Browse.CreateLog;
write_browser_log;
Browse.CloseLog;
end;
{$endif UseBrowser}
end;
@ -443,7 +409,11 @@ done:
end.
{
$Log$
Revision 1.26 1998-06-16 08:56:23 peter
Revision 1.27 1998-06-17 14:10:15 peter
* small os2 fixes
* fixed interdependent units with newppu (remake3 under linux works now)
Revision 1.26 1998/06/16 08:56:23 peter
+ targetcpu
* cleaner pmodules for newppu

View File

@ -161,10 +161,12 @@ unit pmodules;
if (not pu^.loaded) and (pu^.in_interface) then
begin
loaded_unit:=loadunit(pu^.name^,false);
pu^.u:=loaded_unit;
pu^.loaded:=true;
if current_module^.compiled then
exit;
{ register unit in used units }
pu^.u:=loaded_unit;
pu^.loaded:=true;
{ need to recompile the current unit ? }
if loaded_unit^.crc<>pu^.checksum then
begin
current_module^.do_compile:=true;
@ -198,16 +200,22 @@ unit pmodules;
loaded_unit:=loadunit(pu^.name^,false);
if current_module^.compiled then
exit;
{ register unit in used units }
pu^.u:=loaded_unit;
pu^.loaded:=true;
{$ifdef TEST_IMPL}
{ need to recompile the current unit ? }
if loaded_unit^.crc<>pu^.checksum then
begin
current_module^.do_compile:=true;
exit;
end;
{ setup the map entry for deref }
{ current_module^.map^[nextmapentry]:=loaded_unit^.symtable;
current_module^.map^[nextmapentry]:=loaded_unit^.symtable;
inc(nextmapentry);
if nextmapentry>maxunits then
Message(unit_f_too_much_units); }
Message(unit_f_too_much_units);
{$endif TEST_IMPL}
end;
pu:=pused_unit(pu^.next);
end;
@ -219,10 +227,49 @@ unit pmodules;
function loadunit(const s : string;compile_system:boolean) : pmodule;
var
st : punitsymtable;
old_current_ppu : pppufile;
old_current_module,hp,nextmodule : pmodule;
hs : pstring;
st : punitsymtable;
old_current_ppu : pppufile;
old_current_module,hp : pmodule;
procedure loadppufile;
begin
{ load interface section }
if not current_module^.do_compile then
load_interface;
{ only load units when we don't recompile }
if not current_module^.do_compile then
load_usedunits(compile_system);
{ recompile if set }
if current_module^.do_compile then
begin
{ we needn't the ppufile }
if assigned(current_module^.ppufile) then
begin
dispose(current_module^.ppufile,done);
current_module^.ppufile:=nil;
end;
{ recompile the unit or give a fatal error if sources not available }
if not(current_module^.sources_avail) then
Message1(unit_f_cant_compile_unit,current_module^.modulename^)
else
begin
if assigned(old_current_module^.current_inputfile) then
old_current_module^.current_inputfile^.tempclose;
compile(current_module^.mainsource^,compile_system);
if (not old_current_module^.compiled) and assigned(old_current_module^.current_inputfile) then
old_current_module^.current_inputfile^.tempreopen;
end;
end
else
begin
{ only reassemble ? }
if (current_module^.do_assemble) then
OnlyAsm(current_module^.asmfilename^);
{ add the files for the linker }
addlinkerfiles(current_module);
end;
end;
begin
old_current_module:=current_module;
old_current_ppu:=current_ppu;
@ -255,90 +302,26 @@ unit pmodules;
end;
{ the unit is not in the symtable stack }
if (not assigned(st)) then
{ ((not current_module^.in_implementation) and (hp^.in_implementation)) then }
begin
{ load the unit, it's not loaded yet }
if not assigned(hp) then
{ if the unit is loaded remove it first }
if assigned(hp) then
begin
{ generates a new unit info record }
current_module:=new(pmodule,init(s,true));
current_ppu:=current_module^.ppufile;
{ now we can register the unit }
loaded_units.insert(current_module);
{ load interface section }
if not current_module^.do_compile then
load_interface;
{ only load units when we don't recompile }
if not current_module^.do_compile then
load_usedunits(compile_system);
{ recompile if set }
if current_module^.do_compile then
begin
{ we needn't the ppufile }
if assigned(current_module^.ppufile) then
begin
dispose(current_module^.ppufile,done);
current_module^.ppufile:=nil;
end;
if not(current_module^.sources_avail) then
Message1(unit_f_cant_compile_unit,current_module^.modulename^)
else
begin
if assigned(old_current_module^.current_inputfile) then
old_current_module^.current_inputfile^.tempclose;
compile(current_module^.mainsource^,compile_system);
if (not old_current_module^.compiled) and assigned(old_current_module^.current_inputfile) then
old_current_module^.current_inputfile^.tempreopen;
end;
end
else
begin
{ only reassemble ? }
if (current_module^.do_assemble) then
OnlyAsm(current_module^.asmfilename^);
{ add the files for the linker }
addlinkerfiles(current_module);
end;
{ register the unit _once_ }
usedunits.concat(new(pused_unit,init(current_module,true)));
end
else
{ we have to compile the unit again, but it is already inserted !!}
{ we may have problem with the lost symtable !! }
begin
current_module:=hp;
{ we must preserve the unit chain }
nextmodule:=pmodule(current_module^.next);
{ we have to cleanup a little }
current_module^.special_done;
new(hs);
hs^:=current_module^.mainsource^;
current_module^.init(hs^,true);
dispose(hs);
{ we must preserve the unit chain }
current_module^.next:=nextmodule;
if assigned(current_module^.ppufile) then
begin
current_ppu:=current_module^.ppufile;
load_interface;
load_usedunits(compile_system)
end
else
begin
{$ifdef UseBrowser}
{ here we need to remove the names ! }
current_module^.sourcefiles.done;
current_module^.sourcefiles.init;
{$endif UseBrowser}
if assigned(old_current_module^.current_inputfile) then
old_current_module^.current_inputfile^.tempclose;
Message1(parser_d_compiling_second_time,current_module^.mainsource^);
compile(current_module^.mainsource^,compile_system);
if (not old_current_module^.compiled) and assigned(old_current_module^.current_inputfile) then
old_current_module^.current_inputfile^.tempreopen;
end;
current_module^.compiled:=true;
{ remove the old unit }
loaded_units.remove(hp);
dispose(hp,done);
end;
{ generates a new unit info record }
current_module:=new(pmodule,init(s,true));
current_ppu:=current_module^.ppufile;
{ now we can register the unit }
loaded_units.insert(current_module);
{ now realy load the ppu }
loadppufile;
{ set compiled flag }
current_module^.compiled:=true;
{ register the unit _once_ }
usedunits.concat(new(pused_unit,init(current_module,true)));
{ load return pointer }
hp:=current_module;
end;
{ set the old module }
@ -908,12 +891,14 @@ unit pmodules;
symtablestack:=unitst^.next;
{ number the definitions, so a deref from other units works }
numberunits;
refsymtable^.number_defs;
{ Read the implementation units }
parse_implementation_uses(unitst);
numberunits;
{ now we can change refsymtable }
refsymtable:=p;
@ -1146,7 +1131,11 @@ unit pmodules;
end.
{
$Log$
Revision 1.29 1998-06-16 08:56:25 peter
Revision 1.30 1998-06-17 14:10:16 peter
* small os2 fixes
* fixed interdependent units with newppu (remake3 under linux works now)
Revision 1.29 1998/06/16 08:56:25 peter
+ targetcpu
* cleaner pmodules for newppu

View File

@ -74,7 +74,7 @@
{$ifdef TP}
{$IFNDEF DPMI}
{$M 24576,0,655360}
{$M 24000,0,655360}
{$ELSE}
{$M 65000}
{$ENDIF DPMI}
@ -178,36 +178,36 @@ uses
{$O os2_targ}
{$O win_targ}
{$ifdef gdb}
{$O gdb}
{$O gdb}
{$endif gdb}
{$ifdef i386}
{$O opts386}
{$O cgi386}
{$O cg386add}
{$O cg386cal}
{$O cg386cnv}
{$O cg386con}
{$O cg386flw}
{$O cg386ld}
{$O cg386mat}
{$O cg386set}
{$O aopt386}
{$O cgai386}
{$O i386}
{$O radi386}
{$O rai386}
{$O ratti386}
{$O tgeni386}
{$O ag386int}
{$O ag386att}
{$O ag386nsm}
{$O asmutils}
{$O opts386}
{$O cgi386}
{$O cg386add}
{$O cg386cal}
{$O cg386cnv}
{$O cg386con}
{$O cg386flw}
{$O cg386ld}
{$O cg386mat}
{$O cg386set}
{$O aopt386}
{$O cgai386}
{$O i386}
{$O radi386}
{$O rai386}
{$O ratti386}
{$O tgeni386}
{$O ag386int}
{$O ag386att}
{$O ag386nsm}
{$O asmutils}
{$endif}
{$ifdef m68k}
{$O opts68k}
{$O cg68k}
{$O ra68k}
{$O ag68kgas}
{$O opts68k}
{$O cg68k}
{$O ra68k}
{$O ag68kgas}
{$endif}
{$endif useoverlay}
@ -227,13 +227,6 @@ var
procedure myexit;{$ifndef FPC}far;{$endif}
begin
exitproc:=oldexit;
{$ifdef UseBrowser}
if browser_file_open then
begin
close(browserfile);
browser_file_open:=false;
end;
{$endif UseBrowser}
{$ifdef tp}
if use_big then
symbolstream.done;
@ -398,7 +391,11 @@ begin
end.
{
$Log$
Revision 1.15 1998-06-16 11:32:18 peter
Revision 1.16 1998-06-17 14:10:17 peter
* small os2 fixes
* fixed interdependent units with newppu (remake3 under linux works now)
Revision 1.15 1998/06/16 11:32:18 peter
* small cosmetic fixes
Revision 1.14 1998/06/15 13:43:45 daniel

View File

@ -1642,45 +1642,14 @@
inherited done;
end;
{$ifdef GDB}
function typeglobalnumber(const s : string) : string;
var st : string;
symt : psymtable;
old_make_ref : boolean;
begin
old_make_ref:=make_ref;
make_ref:=false;
typeglobalnumber := '0';
srsym := nil;
if pos('.',s) > 0 then
begin
st := copy(s,1,pos('.',s)-1);
getsym(st,false);
st := copy(s,pos('.',s)+1,255);
if assigned(srsym) then
begin
if srsym^.typ = unitsym then
begin
symt := punitsym(srsym)^.unitsymtable;
srsym := symt^.search(st);
end else srsym := nil;
end;
end else st := s;
if srsym = nil then getsym(st,true);
if srsym^.typ<>typesym then
begin
Message(sym_e_type_id_expected);
exit;
end;
typeglobalnumber := ptypesym(srsym)^.definition^.numberstring;
make_ref:=old_make_ref;
end;
{$endif GDB}
{
$Log$
Revision 1.14 1998-06-16 08:56:34 peter
Revision 1.15 1998-06-17 14:10:18 peter
* small os2 fixes
* fixed interdependent units with newppu (remake3 under linux works now)
Revision 1.14 1998/06/16 08:56:34 peter
+ targetcpu
* cleaner pmodules for newppu

View File

@ -45,26 +45,26 @@ unit systems;
I386_ATT,I386_INTEL,I386_DIRECT
{$endif}
{$ifdef m68k}
M68K_MOT
M68K_MOT
{$endif}
);
);
ttarget = (
{$ifdef i386}
target_GO32V1,target_GO32V2,target_LINUX,target_OS2,target_WIN32
{$endif i386}
{$ifdef m68k}
target_Amiga,target_Atari,target_Mac68k,target_Linux
{$endif}
);
ttarget = (
{$ifdef i386}
target_GO32V1,target_GO32V2,target_LINUX,target_OS2,target_WIN32
{$endif i386}
{$ifdef m68k}
target_Amiga,target_Atari,target_Mac68k,target_Linux
{$endif}
);
tasm = (
{$ifdef i386}
as_o,as_o_aout,as_asw,as_nasmcoff, as_nasmelf, as_nasmobj,
as_tasm, as_masm
{$endif}
tasm = (
{$ifdef i386}
as_o,as_o_aout,as_asw,as_nasmcoff, as_nasmelf, as_nasmobj,
as_tasm, as_masm
{$endif}
{$ifdef m68k}
as_o,as_gas,as_mit,as_mot
{$endif}
@ -109,7 +109,7 @@ unit systems;
exeext,
scriptext : string[4];
Cprefix : string[2];
newline : string[2];
newline : string[2];
endian : tendian;
use_function_relative_addresses : boolean;
end;
@ -154,11 +154,13 @@ unit systems;
unitlibext,
asmext,
objext,
exeext : string[4];
exeext : string[4];
os : tos;
link : tlink;
assem : tasm;
ar : tar;
heapsize,
stacksize : longint;
end;
tasmmodeinfo=record
@ -207,7 +209,7 @@ implementation
newline : #13#10;
endian : endian_little;
use_function_relative_addresses : true
),
),
(
name : 'GO32 V2 DOS extender';
sharedlibext : '.DLL';
@ -235,171 +237,172 @@ implementation
use_function_relative_addresses : true
),
(
name : 'OS/2 via EMX';
sharedlibext : '.ao2';
staticlibext : '.ao2';
sourceext : '.pas';
pasext : '.pp';
exeext : '.exe';
scriptext : '.cmd';
Cprefix : '_';
newline : #13#10;
endian : endian_little;
use_function_relative_addresses : false
),
(
name : 'Win32';
sharedlibext : '.dll';
staticlibext : '.a';
sourceext : '.pp';
pasext : '.pas';
exeext : '.exe';
scriptext : '.bat';
Cprefix : '_';
newline : #13#10;
endian : endian_little;
use_function_relative_addresses : true
)
name : 'OS/2 via EMX';
sharedlibext : '.ao2';
staticlibext : '.ao2';
sourceext : '.pas';
pasext : '.pp';
exeext : '.exe';
scriptext : '.cmd';
Cprefix : '_';
newline : #13#10;
endian : endian_little;
use_function_relative_addresses : false
),
(
name : 'Win32';
sharedlibext : '.dll';
staticlibext : '.a';
sourceext : '.pp';
pasext : '.pas';
exeext : '.exe';
scriptext : '.bat';
Cprefix : '_';
newline : #13#10;
endian : endian_little;
use_function_relative_addresses : true
)
{$endif i386}
{$ifdef m68k}
(
name : 'Commodore Amiga';
sharedlibext : '.library';
staticlibext : '.a';
sourceext : '.pp';
pasext : '.pas';
exeext : '';
scriptext : '';
Cprefix : '';
newline : #10;
endian : en_big_endian;
use_function_relative_addresses : false
),
(
name : 'Atari ST/STE';
sharedlibext : '.dll';
staticlibext : '.a';
sourceext : '.pp';
pasext : '.pas';
exeext : '.tpp';
scriptext : '';
Cprefix : '';
newline : #10;
endian : en_big_endian;
use_function_relative_addresses : false
),
(
name : 'Macintosh m68k';
sharedlibext : '.dll';
staticlibext : '.a';
sourceext : '.pp';
pasext : '.pas';
exeext : '.tpp';
scriptext : '';
Cprefix : '';
newline : #13;
endian : en_big_endian;
use_function_relative_addresses : false
),
(
name : 'Linux-m68k';
sharedlibext : '.so';
staticlibext : '.a';
sourceext : '.pp';
pasext : '.pas';
exeext : '';
scriptext : '.sh';
Cprefix : '';
newline : #10;
endian : en_big_endian;
use_function_relative_addresses : true
)
(
name : 'Commodore Amiga';
sharedlibext : '.library';
staticlibext : '.a';
sourceext : '.pp';
pasext : '.pas';
exeext : '';
scriptext : '';
Cprefix : '';
newline : #10;
endian : en_big_endian;
use_function_relative_addresses : false
),
(
name : 'Atari ST/STE';
sharedlibext : '.dll';
staticlibext : '.a';
sourceext : '.pp';
pasext : '.pas';
exeext : '.tpp';
scriptext : '';
Cprefix : '';
newline : #10;
endian : en_big_endian;
use_function_relative_addresses : false
),
(
name : 'Macintosh m68k';
sharedlibext : '.dll';
staticlibext : '.a';
sourceext : '.pp';
pasext : '.pas';
exeext : '.tpp';
scriptext : '';
Cprefix : '';
newline : #13;
endian : en_big_endian;
use_function_relative_addresses : false
),
(
name : 'Linux-m68k';
sharedlibext : '.so';
staticlibext : '.a';
sourceext : '.pp';
pasext : '.pas';
exeext : '';
scriptext : '.sh';
Cprefix : '';
newline : #10;
endian : en_big_endian;
use_function_relative_addresses : true
)
{$endif m68k}
);
);
{****************************************************************************
Assembler Info
Assembler Info
****************************************************************************}
as_infos : array[tasm] of tasminfo = (
as_infos : array[tasm] of tasminfo = (
{$ifdef i386}
(
id : as_o;
idtxt : 'O';
asmbin : 'as';
asmcmd : '-D -o $OBJ $ASM';
externals : false;
labelprefix : '.L';
comment : '# '
)
,(
id : as_o_aout;
idtxt : 'O_AOUT';
asmbin : 'as';
asmcmd : '-D -o $OBJ $ASM';
externals : false;
labelprefix : 'L';
comment : '# '
)
,(
id : as_asw;
idtxt : 'ASW';
asmbin : 'asw';
asmcmd : '-D -o $OBJ $ASM';
externals : false;
labelprefix : '.L';
comment : '# '
)
,(
id : as_nasmcoff;
idtxt : 'NASMCOFF';
asmbin : 'nasm';
asmcmd : '-f coff -o $OBJ $ASM';
externals : true;
labelprefix : 'L';
comment : '; '
)
,(
id : as_nasmelf;
idtxt : 'NASMELF';
asmbin : 'nasm';
asmcmd : '-f elf -o $OBJ $ASM';
externals : true;
labelprefix : 'L';
comment : '; '
)
,(
id : as_nasmobj;
idtxt : 'NASMOBJ';
asmbin : 'nasm';
asmcmd : '-f obj -o $OBJ $ASM';
externals : true;
labelprefix : 'L';
comment : '; '
)
,(
id : as_tasm;
idtxt : 'TASM';
asmbin : 'tasm';
asmcmd : '/m2 $ASM $OBJ';
externals : true;
labelprefix : '.L';
comment : '; '
)
,(
id : as_tasm;
idtxt : 'MASM';
asmbin : 'masm';
asmcmd : '$ASM $OBJ';
externals : true;
labelprefix : '.L';
comment : '; '
)
(
id : as_o;
idtxt : 'O';
asmbin : 'as';
asmcmd : '-D -o $OBJ $ASM';
externals : false;
labelprefix : '.L';
comment : '# '
)
,(
id : as_o_aout;
idtxt : 'O_AOUT';
asmbin : 'as';
asmcmd : '-D -o $OBJ $ASM';
externals : false;
labelprefix : 'L';
comment : '# '
)
,(
id : as_asw;
idtxt : 'ASW';
asmbin : 'asw';
asmcmd : '-D -o $OBJ $ASM';
externals : false;
labelprefix : '.L';
comment : '# '
)
,(
id : as_nasmcoff;
idtxt : 'NASMCOFF';
asmbin : 'nasm';
asmcmd : '-f coff -o $OBJ $ASM';
externals : true;
labelprefix : 'L';
comment : '; '
)
,(
id : as_nasmelf;
idtxt : 'NASMELF';
asmbin : 'nasm';
asmcmd : '-f elf -o $OBJ $ASM';
externals : true;
labelprefix : 'L';
comment : '; '
)
,(
id : as_nasmobj;
idtxt : 'NASMOBJ';
asmbin : 'nasm';
asmcmd : '-f obj -o $OBJ $ASM';
externals : true;
labelprefix : 'L';
comment : '; '
)
,(
id : as_tasm;
idtxt : 'TASM';
asmbin : 'tasm';
asmcmd : '/m2 $ASM $OBJ';
externals : true;
labelprefix : '.L';
comment : '; '
)
,(
id : as_tasm;
idtxt : 'MASM';
asmbin : 'masm';
asmcmd : '$ASM $OBJ';
externals : true;
labelprefix : '.L';
comment : '; '
)
{$endif i386}
{$ifdef m68k}
(
id : as_o;
idtxt : 'O';
(
id : as_o;
idtxt : 'O';
asmbin : 'as';
asmcmd : '-D -o $OBJ $ASM';
externals : false;
@ -417,7 +420,7 @@ implementation
)
,(
id : as_mit;
idtxt : 'MIT';
idtxt : 'MIT';
asmbin : '';
asmcmd : '-o $OBJ $ASM';
externals : false;
@ -429,7 +432,7 @@ implementation
idtxt : 'MOT';
asmbin : '';
asmcmd : '-o $OBJ $ASM';
externals : false;
externals : false;
labelprefix : '__L';
comment : '| '
)
@ -437,44 +440,30 @@ implementation
);
{****************************************************************************
Linker Info
Linker Info
****************************************************************************}
link_infos : array[tlink] of tlinkinfo = (
link_infos : array[tlink] of tlinkinfo = (
{$ifdef i386}
(
linkbin : 'ld';
linkcmd : '$OPT -o $EXE $RES';
bindbin : '';
bindcmd : '';
stripopt : '-s';
libpathprefix : 'SEARCH_DIR(';
libpathsuffix : ')';
groupstart : 'GROUP(';
groupend : ')';
inputstart : 'INPUT(';
inputend : ')';
libprefix : '-l'
)
,(
linkbin : 'ld';
linkcmd : '-oformat coff-go32 $OPT -o $EXE @$RES';
bindbin : 'aout2exe';
bindcmd : '$EXE';
stripopt : '-s';
libpathprefix : '-L';
libpathsuffix : '';
groupstart : '-(';
groupend : '-)';
inputstart : '';
inputend : '';
libprefix : '-l'
)
,(
linkbin : 'ld';
linkcmd : '-oformat coff-go32-exe $OPT -o $EXE @$RES';
bindbin : '';
(
linkbin : 'ld';
linkcmd : '$OPT -o $EXE $RES';
bindbin : '';
bindcmd : '';
stripopt : '-s';
stripopt : '-s';
libpathprefix : 'SEARCH_DIR(';
libpathsuffix : ')';
groupstart : 'GROUP(';
groupend : ')';
inputstart : 'INPUT(';
inputend : ')';
libprefix : '-l'
)
,(
linkbin : 'ld';
linkcmd : '-oformat coff-go32 $OPT -o $EXE @$RES';
bindbin : 'aout2exe';
bindcmd : '$EXE';
stripopt : '-s';
libpathprefix : '-L';
libpathsuffix : '';
groupstart : '-(';
@ -483,43 +472,57 @@ implementation
inputend : '';
libprefix : '-l'
)
,(
linkbin : 'ldw';
linkcmd : '$OPT -o $EXE $RES';
bindbin : '';
bindcmd : '';
stripopt : '-s';
,(
linkbin : 'ld';
linkcmd : '-oformat coff-go32-exe $OPT -o $EXE @$RES';
bindbin : '';
bindcmd : '';
stripopt : '-s';
libpathprefix : '-L';
libpathsuffix : '';
groupstart : '-(';
groupend : '-)';
inputstart : '';
inputend : '';
libprefix : '-l'
)
,(
linkbin : 'ldw';
linkcmd : '$OPT -o $EXE $RES';
bindbin : '';
bindcmd : '';
stripopt : '-s';
libpathprefix : 'SEARCH_DIR(';
libpathsuffix : ')';
groupstart : 'GROUP(';
groupend : ')';
inputstart : 'INPUT(';
inputend : ')';
libprefix : '-l'
)
,(
linkbin : 'ld';
linkcmd : '-o $EXE @$RES';
bindbin : 'emxbind';
bindcmd : '-o $EXE.exe $EXE -k$STACKKB -aim -s$HEAPKB';
stripopt : '-s';
libpathprefix : '';
libpathsuffix : '';
groupstart : '-(';
groupend : '-)';
inputstart : '';
inputend : '';
libprefix : ''
)
groupend : ')';
inputstart : 'INPUT(';
inputend : ')';
libprefix : '-l'
)
,(
linkbin : 'ld'; { Os/2 }
linkcmd : '-o $EXE @$RES';
bindbin : 'emxbind';
bindcmd : '-o $EXE.exe $EXE -k$STACKKB -aim -s$HEAPKB';
stripopt : '-s';
libpathprefix : '-L';
libpathsuffix : '';
groupstart : '-(';
groupend : '-)';
inputstart : '';
inputend : '';
libprefix : ''
)
{$endif i386}
{$ifdef m68k}
(
linkbin : 'ld';
linkcmd : '$OPT -o $EXE $RES';
bindbin : '';
bindcmd : '';
(
linkbin : 'ld';
linkcmd : '$OPT -o $EXE $RES';
bindbin : '';
bindcmd : '';
stripopt : '-s';
libpathprefix : 'SEARCH_DIR(';
libpathprefix : 'SEARCH_DIR(';
libpathsuffix : ')';
groupstart : 'GROUP(';
groupend : ')';
@ -533,72 +536,76 @@ implementation
{****************************************************************************
Ar Info
****************************************************************************}
ar_infos : array[tar] of tarinfo = (
ar_infos : array[tar] of tarinfo = (
{$ifdef i386}
(
arbin : 'ar';
arcmd : 'rs $LIB $FILES'
),
arcmd : 'rs $LIB $FILES'
),
(
arbin : 'arw';
arbin : 'arw';
arcmd : 'rs $LIB $FILES'
)
{$endif i386}
{$ifdef m68k}
(
arbin : 'ar';
arbin : 'ar';
arcmd : 'rs $LIB $FILES'
)
)
{$endif m68k}
);
{****************************************************************************
Targets Info
Targets Info
****************************************************************************}
target_infos : array[ttarget] of ttargetinfo = (
target_infos : array[ttarget] of ttargetinfo = (
{$ifdef i386}
(
target : target_GO32V1;
short_name : 'GO32V1';
unit_env : 'GO32V1UNITS';
system_unit : 'SYSTEM';
smartext : '.SL';
unitext : '.PP1';
unitlibext : '.PPL';
asmext : '.S1';
objext : '.O1';
exeext : ''; { The linker produces a.out }
os : os_GO32V1;
link : link_ldgo32v1;
assem : as_o;
ar : ar_ar
),
(
(
target : target_GO32V1;
short_name : 'GO32V1';
unit_env : 'GO32V1UNITS';
system_unit : 'SYSTEM';
smartext : '.SL';
unitext : '.PP1';
unitlibext : '.PPL';
asmext : '.S1';
objext : '.O1';
exeext : ''; { The linker produces a.out }
os : os_GO32V1;
link : link_ldgo32v1;
assem : as_o;
ar : ar_ar;
heapsize : 2048*1024;
stacksize : 16384
),
(
target : target_GO32V2;
short_name : 'GO32V2';
unit_env : 'GO32V2UNITS';
system_unit : 'SYSTEM';
{$ifndef UseAnsiString}
smartext : '.SL';
unitext : '.PPU';
unitlibext : '.PPL';
asmext : '.S';
{$ifndef UseAnsiString}
smartext : '.SL';
unitext : '.PPU';
unitlibext : '.PPL';
asmext : '.S';
objext : '.O';
exeext : '.EXE';
{$else UseAnsiString}
smartext : '.SL';
unitext : '.PAU';
unitlibext : '.PPL';
asmext : '.SA';
objext : '.OA';
exeext : '.EXE';
{$endif UseAnsiString}
os : os_GO32V2;
link : link_ldgo32v2;
assem : as_o;
ar : ar_ar
),
(
{$else UseAnsiString}
smartext : '.SL';
unitext : '.PAU';
unitlibext : '.PPL';
asmext : '.SA';
objext : '.OA';
exeext : '.EXE';
{$endif UseAnsiString}
os : os_GO32V2;
link : link_ldgo32v2;
assem : as_o;
ar : ar_ar;
heapsize : 2048*1024;
stacksize : 16384
),
(
target : target_LINUX;
short_name : 'LINUX';
unit_env : 'LINUXUNITS';
@ -609,34 +616,38 @@ implementation
asmext : '.s';
objext : '.o';
exeext : '';
os : os_Linux;
link : link_ld;
assem : as_o;
ar : ar_ar
),
(
target : target_OS2;
short_name : 'OS2';
unit_env : 'OS2UNITS';
system_unit : 'SYSOS2';
smartext : '.sl';
unitext : '.ppo';
unitlibext : '.ppl';
asmext : '.so2';
objext : '.oo2';
exeext : ''; { The linker produces a.out }
os : os_OS2;
link : link_ldos2;
assem : as_o_aout;
ar : ar_ar
),
(
target : target_WIN32;
short_name : 'WIN32';
unit_env : 'WIN32UNITS';
system_unit : 'SYSWIN32';
smartext : '.sl';
unitext : '.ppw';
os : os_Linux;
link : link_ld;
assem : as_o;
ar : ar_ar;
heapsize : 2048*1024;
stacksize : 8192
),
(
target : target_OS2;
short_name : 'OS2';
unit_env : 'OS2UNITS';
system_unit : 'SYSOS2';
smartext : '.sl';
unitext : '.ppo';
unitlibext : '.ppl';
asmext : '.so2';
objext : '.oo2';
exeext : ''; { The linker produces a.out }
os : os_OS2;
link : link_ldos2;
assem : as_o_aout;
ar : ar_ar;
heapsize : 256*1024;
stacksize : 32768
),
(
target : target_WIN32;
short_name : 'WIN32';
unit_env : 'WIN32UNITS';
system_unit : 'SYSWIN32';
smartext : '.sl';
unitext : '.ppw';
unitlibext : '.ppl';
asmext : '.s';
objext : '.o';
@ -644,7 +655,9 @@ implementation
os : os_Win32;
link : link_ldw;
assem : as_asw;
ar : ar_arw
ar : ar_arw;
heapsize : 1024*1024;
stacksize : 16384
)
{$endif i386}
{$ifdef m68k}
@ -654,7 +667,7 @@ implementation
unit_env : '';
system_unit : 'sysamiga';
smartext : '.sl';
unitext : '.ppa';
unitext : '.ppa';
unitlibext : '.ppl';
asmext : '.asm';
objext : '.o';
@ -662,13 +675,15 @@ implementation
os : os_Amiga;
link : link_ld;
assem : as_o;
ar : ar_ar
),
ar : ar_ar;
heapsize : 512*1024;
stacksize : 8192
),
(
target : target_Atari;
short_name : 'ATARI';
unit_env : '';
system_unit : 'SYSATARI';
system_unit : 'SYSATARI';
smartext : '.sl';
unitext : '.ppt';
unitlibext : '.ppl';
@ -678,10 +693,12 @@ implementation
os : os_Atari;
link : link_ld;
assem : as_o;
ar : ar_ar
ar : ar_ar;
heapsize : 512*1024;
stacksize : 8192
),
(
target : target_Mac68k;
target : target_Mac68k;
short_name : 'MACOS';
unit_env : '';
system_unit : 'sysmac';
@ -694,12 +711,14 @@ implementation
os : os_Mac68k;
link : link_ld;
assem : as_o;
ar : ar_ar
ar : ar_ar;
heapsize : 512*1024;
stacksize : 8192
),
(
target : target_Linux;
short_name : 'LINUX';
unit_env : 'LINUXUNITS';
unit_env : 'LINUXUNITS';
system_unit : 'syslinux';
smartext : '.sl';
unitext : '.ppu';
@ -710,10 +729,12 @@ implementation
os : os_Linux;
link : link_ld;
assem : as_o;
ar : ar_ar
ar : ar_ar;
heapsize : 512*1024;
stacksize : 8192
)
{$endif m68k}
);
);
{****************************************************************************
AsmModeInfo
@ -721,12 +742,12 @@ implementation
asmmodeinfos : array[tasmmode] of tasmmodeinfo = (
{$ifdef i386}
(
id : I386_DIRECT;
id : I386_DIRECT;
idtxt : 'DIRECT'
),
(
id : I386_INTEL;
idtxt : 'INTEL'
idtxt : 'INTEL'
),
(
id : I386_ATT;
@ -854,9 +875,9 @@ begin
end.
{
$Log$
Revision 1.21 1998-06-16 08:56:36 peter
+ targetcpu
* cleaner pmodules for newppu
Revision 1.22 1998-06-17 14:10:21 peter
* small os2 fixes
* fixed interdependent units with newppu (remake3 under linux works now)
Revision 1.20 1998/06/15 15:38:14 pierre
* small bug in systems.pas corrected
@ -893,7 +914,7 @@ end.
* fixed dynamiclinker option which was added at the wrong place
Revision 1.12 1998/05/23 01:21:32 peter
+ aktasmmode, aktoptprocessor, aktoutputformat
+ aktasmmode, aktoptprocessor, aktoutputformat
+ smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
+ $LIBNAME to set the library name where the unit will be put in
* splitted cgi386 a bit (codeseg to large for bp7)
@ -938,7 +959,7 @@ end.
Revision 1.4 1998/04/27 15:45:20 peter
+ -Xl for smartlink
+ target_info.arext = .a
+ target_info.arext = .a
Revision 1.3 1998/04/16 10:50:45 daniel
* Fixed some things that were broken for OS/2.