From 192bbc07f56cb9e96947db5b2ad5c3919221dffd Mon Sep 17 00:00:00 2001 From: ondrej Date: Wed, 30 Sep 2020 06:56:27 +0000 Subject: [PATCH 01/15] * simplify TThread.RemoveQueuedEvent - decide what to delete and not what to leave (better corresponds with the docs) git-svn-id: trunk@47011 - --- rtl/objpas/classes/classes.inc | 57 +++++++++++++++------------------- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/rtl/objpas/classes/classes.inc b/rtl/objpas/classes/classes.inc index 42a9d22f97..9a9f646373 100644 --- a/rtl/objpas/classes/classes.inc +++ b/rtl/objpas/classes/classes.inc @@ -602,42 +602,35 @@ begin lastentry := Nil; entry := ThreadQueueHead; while Assigned(entry) do begin - { first check for the thread } - if Assigned(aThread) and (entry^.Thread <> aThread) and (entry^.ThreadID <> aThread.ThreadID) then begin - lastentry := entry; - entry := entry^.Next; - Continue; - end; - { then check for the method } - if Assigned(aMethod) and + if + { only entries not added by Synchronize } + not Assigned(entry^.SyncEvent) + { check for the thread } + and (not Assigned(aThread) or (entry^.Thread = aThread) or (entry^.ThreadID = aThread.ThreadID)) + { check for the method } + and (not Assigned(aMethod) or ( - (TMethod(entry^.Method).Code <> TMethod(aMethod).Code) or - (TMethod(entry^.Method).Data <> TMethod(aMethod).Data) - ) then begin + (TMethod(entry^.Method).Code = TMethod(aMethod).Code) and + (TMethod(entry^.Method).Data = TMethod(aMethod).Data) + )) + then begin + { ok, we need to remove this entry } + tmpentry := entry; + if Assigned(lastentry) then + lastentry^.Next := entry^.Next; + entry := entry^.Next; + if ThreadQueueHead = tmpentry then + ThreadQueueHead := entry; + if ThreadQueueTail = tmpentry then + ThreadQueueTail := lastentry; + { only dispose events added by Queue } + if not Assigned(tmpentry^.SyncEvent) then + Dispose(tmpentry); + end else begin + { leave this entry } lastentry := entry; entry := entry^.Next; - Continue; end; - { skip entries added by Synchronize } - if Assigned(entry^.SyncEvent) then begin - lastentry := entry; - entry := entry^.Next; - Continue; - end; - - { ok, we need to remove this entry } - - tmpentry := entry; - if Assigned(lastentry) then - lastentry^.Next := entry^.Next; - entry := entry^.Next; - if ThreadQueueHead = tmpentry then - ThreadQueueHead := entry; - if ThreadQueueTail = tmpentry then - ThreadQueueTail := lastentry; - { only dispose events added by Queue } - if not Assigned(tmpentry^.SyncEvent) then - Dispose(tmpentry); end; {$ifdef FPC_HAS_FEATURE_THREADING} finally From 64da07da48c3206567b97cbd03872a73206afd54 Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 30 Sep 2020 12:16:21 +0000 Subject: [PATCH 02/15] Add conversion from "$" to "." for i386-watcom target and avoid iteration if no char modification is wanted in ApplyAsmSymbolRestrictions function git-svn-id: trunk@47012 - --- compiler/aasmbase.pas | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/compiler/aasmbase.pas b/compiler/aasmbase.pas index 55aeac01b9..1531c85a4b 100644 --- a/compiler/aasmbase.pas +++ b/compiler/aasmbase.pas @@ -291,15 +291,20 @@ implementation function ApplyAsmSymbolRestrictions(const s: ansistring): ansistring; var i : longint; - rchar: char; + rchar, ochar: char; crc: Cardinal; charstoremove: integer; begin Result:=s; rchar:=target_asm.dollarsign; - for i:=1 to Length(Result) do - if Result[i]='$' then - Result[i]:=rchar; + if target_asm.id=as_i386_wasm then + ochar:='.' + else + ochar:='$'; + if (ochar<>rchar) then + for i:=1 to Length(Result) do + if Result[i]=ochar then + Result[i]:=rchar; if (target_asm.labelmaxlen<>-1) and (Length(Result)>target_asm.labelmaxlen) then begin crc:=0; From c20b51a80679c899df57fa933ec3d4d32d939520 Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 30 Sep 2020 12:17:24 +0000 Subject: [PATCH 03/15] Use ApplyAsmSymbolRestrictions function and limit label sie to 247 for watcom assembler git-svn-id: trunk@47013 - --- compiler/x86/agx86int.pas | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/compiler/x86/agx86int.pas b/compiler/x86/agx86int.pas index 7f90aade94..45282feae7 100644 --- a/compiler/x86/agx86int.pas +++ b/compiler/x86/agx86int.pas @@ -304,7 +304,7 @@ implementation begin if (asminfo^.id = as_i386_tasm) then writer.AsmWrite('dword ptr '); - writer.AsmWrite(symbol.name); + writer.AsmWrite(ApplyAsmSymbolRestrictions(symbol.name)); first:=false; end; if (base<>NR_NO) then @@ -418,7 +418,7 @@ implementation begin writer.AsmWrite('offset '); if assigned(o.ref^.symbol) then - writer.AsmWrite(o.ref^.symbol.name); + writer.AsmWrite(ApplyAsmSymbolRestrictions(o.ref^.symbol.name)); if o.ref^.offset>0 then writer.AsmWrite('+'+tostr(o.ref^.offset)) else @@ -462,7 +462,7 @@ implementation end else begin - writer.AsmWrite(o.ref^.symbol.name); + writer.AsmWrite(ApplyAsmSymbolRestrictions(o.ref^.symbol.name)); if o.ref^.offset>0 then writer.AsmWrite('+'+tostr(o.ref^.offset)) else @@ -579,8 +579,8 @@ implementation ait_datablock : begin if tai_datablock(hp).is_global then - writer.AsmWriteLn(#9'PUBLIC'#9+tai_datablock(hp).sym.name); - writer.AsmWriteLn(PadTabs(tai_datablock(hp).sym.name,#0)+'DB'#9+tostr(tai_datablock(hp).size)+' DUP(?)'); + writer.AsmWriteLn(#9'PUBLIC'#9+ApplyAsmSymbolRestrictions(tai_datablock(hp).sym.name)); + writer.AsmWriteLn(PadTabs(ApplyAsmSymbolRestrictions(tai_datablock(hp).sym.name),#0)+'DB'#9+tostr(tai_datablock(hp).size)+' DUP(?)'); end; ait_const: begin @@ -606,9 +606,9 @@ implementation if assigned(tai_const(hp).sym) then begin if assigned(tai_const(hp).endsym) then - s:=tai_const(hp).endsym.name+'-'+tai_const(hp).sym.name + s:=ApplyAsmSymbolRestrictions(tai_const(hp).endsym.name)+'-'+ApplyAsmSymbolRestrictions(tai_const(hp).sym.name) else - s:=tai_const(hp).sym.name; + s:=ApplyAsmSymbolRestrictions(tai_const(hp).sym.name); if tai_const(hp).value<>0 then s:=s+tostr_with_plus(tai_const(hp).value); end @@ -780,7 +780,7 @@ implementation begin if tai_symbol(hp).has_value then internalerror(2009090802); - { wasm is case insensitive, we nned to use only uppercase version + { wasm is case insensitive, we need to use only uppercase version if both a lowercase and an uppercase version are provided } if (asminfo^.id = as_i386_wasm) then begin @@ -795,8 +795,8 @@ implementation end; end; if tai_symbol(hp).is_global then - writer.AsmWriteLn(#9'PUBLIC'#9+tai_symbol(hp).sym.name); - writer.AsmWrite(tai_symbol(hp).sym.name); + writer.AsmWriteLn(#9'PUBLIC'#9+ApplyAsmSymbolRestrictions(tai_symbol(hp).sym.name)); + writer.AsmWrite(ApplyAsmSymbolRestrictions(tai_symbol(hp).sym.name)); if assigned(hp.next) and not(tai(hp.next).typ in [ait_const,ait_realconst,ait_string]) then writer.AsmWriteLn(':'); @@ -1033,11 +1033,11 @@ implementation case asminfo^.id of as_i386_masm, as_i386_wasm : - writer.AsmWriteln(#9'EXTRN'#9+sym.name+': NEAR'); + writer.AsmWriteln(#9'EXTRN'#9+ApplyAsmSymbolRestrictions(sym.name)+': NEAR'); as_x86_64_masm : - writer.AsmWriteln(#9'EXTRN'#9+sym.name+': PROC'); + writer.AsmWriteln(#9'EXTRN'#9+ApplyAsmSymbolRestrictions(sym.name)+': PROC'); else - writer.AsmWriteln(#9'EXTRN'#9+sym.name); + writer.AsmWriteln(#9'EXTRN'#9+ApplyAsmSymbolRestrictions(sym.name)); end; end; end; @@ -1168,7 +1168,7 @@ implementation supported_targets : [system_i386_watcom]; flags : [af_needar]; labelprefix : '@@'; - labelmaxlen : -1; + labelmaxlen : 247; comment : '; '; dollarsign: '$'; ); From fa12dfa7b5fc86551e7bbbbccd64300c780a7e96 Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 30 Sep 2020 12:18:39 +0000 Subject: [PATCH 04/15] Rename pvmt internal type to lower_pvmt for i386-watcom as watcom assembler is not case sensitive git-svn-id: trunk@47014 - --- compiler/psystem.pas | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/compiler/psystem.pas b/compiler/psystem.pas index 326160cfba..3ea1718d36 100644 --- a/compiler/psystem.pas +++ b/compiler/psystem.pas @@ -256,6 +256,7 @@ implementation var hrecst : trecordsymtable; + pvmt_name : shortstring; begin symtablestack.push(systemunit); cundefinedtype:=cundefineddef.create(true); @@ -310,7 +311,11 @@ implementation cunicodestringtype:=cstringdef.createunicode(true); { length=0 for shortstring is open string (needed for readln(string) } openshortstringtype:=cstringdef.createshort(0,true); -{$ifdef x86} + if target_info.system=system_i386_watcom then + pvmt_name:='lower__pvmt' + else + pvmt_name:='pvmt'; + {$ifdef x86} create_fpu_types; {$ifndef FPC_SUPPORT_X87_TYPES_ON_WIN64} if target_info.system=system_x86_64_win64 then @@ -637,7 +642,7 @@ implementation { can't use addtype for pvmt because the rtti of the pointed type is not available. The rtti for pvmt will be written implicitly by thev tblarray below } - systemunit.insert(ctypesym.create('$pvmt',pvmttype)); + systemunit.insert(ctypesym.create('$'+pvmt_name,pvmttype)); addfield(hrecst,cfieldvarsym.create('$length',vs_value,sizesinttype,[])); addfield(hrecst,cfieldvarsym.create('$mlength',vs_value,sizesinttype,[])); addfield(hrecst,cfieldvarsym.create('$parent',vs_value,pvmttype,[])); @@ -686,6 +691,7 @@ implementation var oldcurrentmodule : tmodule; + pvmt_name : shortstring; begin {$ifndef FPC_SUPPORT_X87_TYPES_ON_WIN64} if target_info.system=system_x86_64_win64 then @@ -777,9 +783,13 @@ implementation loadtype('metadata',llvm_metadatatype); {$endif llvm} loadtype('file',cfiletype); + if target_info.system=system_i386_watcom then + pvmt_name:='lower__pvmt' + else + pvmt_name:='pvmt'; if not(target_info.system in systems_managed_vm) then begin - loadtype('pvmt',pvmttype); + loadtype(pvmt_name,pvmttype); loadtype('vtblarray',vmtarraytype); loadtype('__vtbl_ptr_type',vmttype); end; From d72170f9a33cc70bff2748a07978964d28526d38 Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 30 Sep 2020 12:20:26 +0000 Subject: [PATCH 05/15] Fix compilation for watcom RTL git-svn-id: trunk@47015 - --- .gitattributes | 1 + rtl/watcom/sysutils.pp | 12 ++++--- rtl/watcom/tthread.inc | 80 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 4 deletions(-) create mode 100644 rtl/watcom/tthread.inc diff --git a/.gitattributes b/.gitattributes index 1371f8d1b4..67431c1228 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12085,6 +12085,7 @@ rtl/watcom/sysos.inc svneol=native#text/plain rtl/watcom/sysosh.inc svneol=native#text/plain rtl/watcom/system.pp svneol=native#text/plain rtl/watcom/sysutils.pp svneol=native#text/plain +rtl/watcom/tthread.inc svneol=native#text/plain rtl/watcom/watcom.pp svneol=native#text/plain rtl/wii/Makefile svneol=native#text/plain rtl/wii/Makefile.fpc svneol=native#text/plain diff --git a/rtl/watcom/sysutils.pp b/rtl/watcom/sysutils.pp index 42e58f2f59..921b3e700f 100644 --- a/rtl/watcom/sysutils.pp +++ b/rtl/watcom/sysutils.pp @@ -226,6 +226,7 @@ end; Function FileSeek (Handle, FOffset, Origin : Longint) : Longint; var Regs: registers; + res: dword; begin Regs.Eax := $4200; Regs.Al := Origin; @@ -236,8 +237,9 @@ begin if Regs.Flags and CarryFlag <> 0 then result := -1 else begin - LongRec(result).Lo := Regs.Ax; - LongRec(result).Hi := Regs.Dx; + LongRec(res).Lo := Regs.Ax; + LongRec(res).Hi := Regs.Dx; + result:=res; end ; end; @@ -409,6 +411,7 @@ end; Function FileGetDate (Handle : Longint) : Int64; var Regs: registers; + res: dword; begin //!! for win95 an alternative function is available. Regs.Ebx := Handle; @@ -418,8 +421,9 @@ begin result := -1 else begin - LongRec(result).Lo := Regs.cx; - LongRec(result).Hi := Regs.dx; + LongRec(res).Lo := Regs.cx; + LongRec(res).Hi := Regs.dx; + result := res; end ; end; diff --git a/rtl/watcom/tthread.inc b/rtl/watcom/tthread.inc new file mode 100644 index 0000000000..065e3ae4da --- /dev/null +++ b/rtl/watcom/tthread.inc @@ -0,0 +1,80 @@ +{ + This file is part of the Free Component Library (FCL) + Copyright (c) 1999-2000 by the Free Pascal development team + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +{****************************************************************************} +{* TThread *} +{****************************************************************************} + + +procedure TThread.CallOnTerminate; + +begin +end; + + +function TThread.GetPriority: TThreadPriority; + +begin + GetPriority:=tpNormal; +end; + + +procedure TThread.SetPriority(Value: TThreadPriority); + +begin +end; + + +procedure TThread.SetSuspended(Value: Boolean); + +begin +end; + + +procedure TThread.DoTerminate; + +begin +end; + + +procedure TThread.SysCreate(CreateSuspended: Boolean; const StackSize: SizeUInt); + +begin + {IsMultiThread := TRUE; } +end; + + +procedure TThread.SysDestroy; + +begin +end; + + +procedure TThread.Resume; + +begin +end; + + +procedure TThread.Suspend; + +begin +end; + + +function TThread.WaitFor: Integer; + +begin + WaitFor:=0; +end; + + From 4ad6c98d826ca9410810e15460f91ba42add1df1 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 30 Sep 2020 13:33:16 +0000 Subject: [PATCH 06/15] * Test for bug ID #27760 git-svn-id: trunk@47016 - --- packages/fcl-passrc/tests/tcstatements.pas | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/packages/fcl-passrc/tests/tcstatements.pas b/packages/fcl-passrc/tests/tcstatements.pas index 7cbd943951..935ff1e2bc 100644 --- a/packages/fcl-passrc/tests/tcstatements.pas +++ b/packages/fcl-passrc/tests/tcstatements.pas @@ -71,6 +71,7 @@ Type procedure TestIfWithBlock; Procedure TestNestedIf; Procedure TestNestedIfElse; + Procedure TestNestedIfElseElse; Procedure TestWhile; Procedure TestWhileBlock; Procedure TestWhileNested; @@ -714,6 +715,32 @@ begin AssertEquals('begin end block',TPasImplBeginBlock,I.ElseBranch.ClassType); end; +procedure TTestStatementParser.TestNestedIfElseElse; + +// Bug ID 37760 + +Var + I,I2 : TPasImplIfElse; + +begin + DeclareVar('boolean'); + TestStatement(['if a then', + ' if b then', + ' DoA ', + ' else', + ' else', + ' DoB']); + I:=AssertStatement('If statement',TPasImplIfElse) as TPasImplIfElse; + AssertExpression('IF condition',I.ConditionExpr,pekIdent,'a'); + AssertNotNull('if branch',I.IfBranch); + AssertNotNull('Have else for outer if',I.ElseBranch); + AssertEquals('Have if in if branch',TPasImplIfElse,I.ifBranch.ClassType); + I2:=I.Ifbranch as TPasImplIfElse; + AssertExpression('IF condition',I2.ConditionExpr,pekIdent,'b'); + AssertNotNull('Have then for inner if',I2.ifBranch); + AssertNull('Empty else for inner if',I2.ElseBranch); +end; + procedure TTestStatementParser.TestWhile; Var From 2fc63a4f17b1340c5195c0acab8263b64e616d45 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 30 Sep 2020 13:36:24 +0000 Subject: [PATCH 07/15] * Additional test for 37760 git-svn-id: trunk@47017 - --- packages/fcl-passrc/tests/tcstatements.pas | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/packages/fcl-passrc/tests/tcstatements.pas b/packages/fcl-passrc/tests/tcstatements.pas index 935ff1e2bc..4f84ca83d1 100644 --- a/packages/fcl-passrc/tests/tcstatements.pas +++ b/packages/fcl-passrc/tests/tcstatements.pas @@ -72,6 +72,7 @@ Type Procedure TestNestedIf; Procedure TestNestedIfElse; Procedure TestNestedIfElseElse; + procedure TestIfIfElseElseBlock; Procedure TestWhile; Procedure TestWhileBlock; Procedure TestWhileNested; @@ -741,6 +742,30 @@ begin AssertNull('Empty else for inner if',I2.ElseBranch); end; +procedure TTestStatementParser.TestIfIfElseElseBlock; + +var + OuterIf,InnerIf: TPasImplIfElse; +begin + DeclareVar('boolean'); + DeclareVar('boolean','B'); + TestStatement(['if a then','if b then',' begin',' end','else','else',' begin',' end']); + OuterIf:=AssertStatement('If statement',TPasImplIfElse) as TPasImplIfElse; + AssertExpression('IF condition',OuterIf.ConditionExpr,pekIdent,'a'); + AssertNotNull('if branch',OuterIf.IfBranch); + AssertEquals('if else block',TPasImplIfElse,OuterIf.ifBranch.ClassType); + InnerIf:=OuterIf.IfBranch as TPasImplIfElse; + AssertExpression('IF condition',InnerIf.ConditionExpr,pekIdent,'b'); + AssertNotNull('if branch',InnerIf.IfBranch); + AssertEquals('begin end block',TPasImplBeginBlock,InnerIf.ifBranch.ClassType); + AssertNotNull('Else branch',InnerIf.ElseBranch); + AssertEquals('empty statement',TPasImplCommand,InnerIf.ElseBranch.ClassType); + AssertEquals('empty command','',TPasImplCommand(InnerIf.ElseBranch).Command); + AssertNotNull('Else branch',OuterIf.ElseBranch); + AssertEquals('begin end block',TPasImplBeginBlock,OuterIf.ElseBranch.ClassType); +end; + + procedure TTestStatementParser.TestWhile; Var From 4a6358bfc1c2433ca4a17ff95cec2844b51f7e3e Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 30 Sep 2020 13:50:43 +0000 Subject: [PATCH 08/15] * Fix NaN for watcom assembler (C000h is considered as a label, use 0xC000 instead) * Also use ApplyAsmSymbolRestrictions for label names (required for units using embedded '.' * Add ':' after a label if there is hp^.next is not assigned git-svn-id: trunk@47018 - --- compiler/x86/agx86int.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/x86/agx86int.pas b/compiler/x86/agx86int.pas index 45282feae7..a1142774f0 100644 --- a/compiler/x86/agx86int.pas +++ b/compiler/x86/agx86int.pas @@ -679,7 +679,7 @@ implementation writer.AsmWriteln(#9#9'DW'#9'0,0,0,8000h,FFFFh'); end else if (asminfo^.id = as_i386_wasm) and (IsNan(tai_realconst(hp).value.s80val)) then - writer.AsmWriteln(#9#9'DW'#9'0,0,0,C000h,7FFFh') + writer.AsmWriteln(#9#9'DW'#9'0,0,0,0xC000,0x7FFF') else writer.AsmWriteLn(#9#9'DT'#9+extended2str(tai_realconst(hp).value.s80val)); aitrealconst_s64comp: @@ -768,8 +768,8 @@ implementation begin if tai_label(hp).labsym.is_used then begin - writer.AsmWrite(tai_label(hp).labsym.name); - if assigned(hp.next) and not(tai(hp.next).typ in + writer.AsmWrite(ApplyAsmSymbolRestrictions(tai_label(hp).labsym.name)); + if not assigned(hp.next) or not(tai(hp.next).typ in [ait_const,ait_realconst,ait_string]) then writer.AsmWriteLn(':') else @@ -797,7 +797,7 @@ implementation if tai_symbol(hp).is_global then writer.AsmWriteLn(#9'PUBLIC'#9+ApplyAsmSymbolRestrictions(tai_symbol(hp).sym.name)); writer.AsmWrite(ApplyAsmSymbolRestrictions(tai_symbol(hp).sym.name)); - if assigned(hp.next) and not(tai(hp.next).typ in + if not assigned(hp.next) or not(tai(hp.next).typ in [ait_const,ait_realconst,ait_string]) then writer.AsmWriteLn(':'); end; From abe463d576e7291c30340b6b70a1b14190edfb34 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 30 Sep 2020 14:01:00 +0000 Subject: [PATCH 09/15] * Fix for bug #37760 git-svn-id: trunk@47019 - --- packages/fcl-passrc/src/pparser.pp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/fcl-passrc/src/pparser.pp b/packages/fcl-passrc/src/pparser.pp index 1c4d93e49f..f28240efaa 100644 --- a/packages/fcl-passrc/src/pparser.pp +++ b/packages/fcl-passrc/src/pparser.pp @@ -5986,7 +5986,20 @@ begin El:=nil; end; if (CurToken=tkelse) and (TPasImplIfElse(CurBlock).ElseBranch=nil) then - break; // add next statement as ElseBranch + begin + // Check if next token is an else too + NextToken; + if CurToken = tkElse then + begin + // empty ELSE statement without semicolon e.g. if condition then [...] else else + El:=TPasImplCommand(CreateElement(TPasImplCommand,'', CurBlock,CurTokenPos)); + CurBlock.AddElement(El); // this sets TPasImplIfElse(CurBlock).IfBranch:=El + El:=nil; + CloseBlock; + end; + UngetToken; + break; // add next statement as ElseBranch + end; end else if (CurBlock is TPasImplTryExcept) and (CurToken=tkelse) then begin From 8775fac416d41f9432b55043abb39769ca9091ac Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 30 Sep 2020 14:02:29 +0000 Subject: [PATCH 10/15] * Correct test git-svn-id: trunk@47020 - --- packages/fcl-passrc/tests/tcstatements.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/fcl-passrc/tests/tcstatements.pas b/packages/fcl-passrc/tests/tcstatements.pas index 4f84ca83d1..77d545969d 100644 --- a/packages/fcl-passrc/tests/tcstatements.pas +++ b/packages/fcl-passrc/tests/tcstatements.pas @@ -739,7 +739,9 @@ begin I2:=I.Ifbranch as TPasImplIfElse; AssertExpression('IF condition',I2.ConditionExpr,pekIdent,'b'); AssertNotNull('Have then for inner if',I2.ifBranch); - AssertNull('Empty else for inner if',I2.ElseBranch); + AssertnotNull('Empty else for inner if',I2.ElseBranch); + AssertEquals('Have a commend for inner if else',TPasImplCommand,I2.ElseBranch.ClassType); + AssertEquals('... an empty command','',TPasImplCommand(I2.ElseBranch).Command); end; procedure TTestStatementParser.TestIfIfElseElseBlock; From 52bc9d5d8028360daa8041134eb0f6edec0a0046 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 30 Sep 2020 15:01:35 +0000 Subject: [PATCH 11/15] * Extra test for case else/else git-svn-id: trunk@47021 - --- packages/fcl-passrc/tests/tcstatements.pas | 27 +++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/packages/fcl-passrc/tests/tcstatements.pas b/packages/fcl-passrc/tests/tcstatements.pas index 77d545969d..a316ec8b41 100644 --- a/packages/fcl-passrc/tests/tcstatements.pas +++ b/packages/fcl-passrc/tests/tcstatements.pas @@ -100,6 +100,7 @@ Type Procedure TestCaseElseBlockAssignment; Procedure TestCaseElseBlock2Assignments; Procedure TestCaseIfCaseElse; + Procedure TestCaseIfCaseElseElse; Procedure TestCaseIfElse; Procedure TestCaseElseNoSemicolon; Procedure TestCaseIfElseNoSemicolon; @@ -1301,7 +1302,7 @@ begin C:=AssertStatement('Case statement',TpasImplCaseOf) as TpasImplCaseOf; AssertNotNull('Have case expression',C.CaseExpr); AssertExpression('Case expression',C.CaseExpr,pekIdent,'a'); - AssertEquals('Two case labels',1,C.Elements.Count); + AssertEquals('One case label',1,C.Elements.Count); AssertNull('Have no else branch',C.ElseBranch); S:=TPasImplCaseStatement(C.Elements[0]); AssertEquals('2 expressions for case 1',1,S.Expressions.Count); @@ -1311,6 +1312,30 @@ begin AssertNotNull('If statement has else block',TPasImplIfElse(S.Elements[0]).ElseBranch); end; +procedure TTestStatementParser.TestCaseIfCaseElseElse; +Var + C : TPasImplCaseOf; + S : TPasImplCaseStatement; + +begin + DeclareVar('integer'); + DeclareVar('boolean','b'); + TestStatement(['case a of','1 : if b then',' begin end','else','else','DoElse',' end;']); + C:=AssertStatement('Case statement',TpasImplCaseOf) as TpasImplCaseOf; + AssertNotNull('Have case expression',C.CaseExpr); + AssertExpression('Case expression',C.CaseExpr,pekIdent,'a'); + AssertEquals('Two case labels',2,C.Elements.Count); + AssertNotNull('Have an else branch',C.ElseBranch); + S:=TPasImplCaseStatement(C.Elements[0]); + AssertEquals('2 expressions for case 1',1,S.Expressions.Count); + AssertExpression('Case With identifier 1',TPasExpr(S.Expressions[0]),pekNumber,'1'); + AssertEquals('1 case label statement',1,S.Elements.Count); + AssertEquals('If statement in case label 1',TPasImplIfElse,TPasElement(S.Elements[0]).ClassType); + AssertNotNull('If statement has else block',TPasImplIfElse(S.Elements[0]).ElseBranch); + AssertEquals('If statement has a commend as else block',TPasImplCommand,TPasImplIfElse(S.Elements[0]).ElseBranch.ClassType); + AssertEquals('But ... an empty command','',TPasImplCommand(TPasImplIfElse(S.Elements[0]).ElseBranch).Command); +end; + procedure TTestStatementParser.TestCaseElseNoSemicolon; Var C : TPasImplCaseOf; From 875bb32e0be3e0557ba3d2a1b1bafc12d3c5e197 Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 30 Sep 2020 15:22:13 +0000 Subject: [PATCH 12/15] Add character, fpwidestring, unicodedata and unicodenumtable units to watcom RTL git-svn-id: trunk@47022 - --- rtl/watcom/Makefile | 251 +++++++++++++++++++++++----------------- rtl/watcom/Makefile.fpc | 13 +++ 2 files changed, 161 insertions(+), 103 deletions(-) diff --git a/rtl/watcom/Makefile b/rtl/watcom/Makefile index a9bfc17f28..2897a4f9c4 100644 --- a/rtl/watcom/Makefile +++ b/rtl/watcom/Makefile @@ -2,7 +2,7 @@ # Don't edit, this file is generated by FPCMake Version 2.0.0 # default: all -MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android i386-aros m68k-linux m68k-netbsd m68k-amiga m68k-atari m68k-palmos m68k-macosclassic m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macosclassic powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-haiku x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-iphonesim x86_64-android x86_64-aros x86_64-dragonfly arm-linux arm-netbsd arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android arm-aros arm-freertos arm-ios powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android mips64el-linux jvm-java jvm-android i8086-embedded i8086-msdos i8086-win16 aarch64-linux aarch64-darwin aarch64-win64 aarch64-android aarch64-ios wasm-wasm sparc64-linux riscv32-linux riscv32-embedded riscv64-linux riscv64-embedded xtensa-linux xtensa-embedded xtensa-freertos z80-embedded z80-zxspectrum z80-msxdos +MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android i386-aros m68k-linux m68k-netbsd m68k-amiga m68k-atari m68k-palmos m68k-macosclassic m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macosclassic powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-haiku x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-iphonesim x86_64-android x86_64-aros x86_64-dragonfly arm-linux arm-netbsd arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android arm-aros arm-freertos arm-ios powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android mips64el-linux jvm-java jvm-android i8086-embedded i8086-msdos i8086-win16 aarch64-linux aarch64-darwin aarch64-win64 aarch64-android aarch64-ios wasm-wasm sparc64-linux riscv32-linux riscv32-embedded riscv64-linux riscv64-embedded xtensa-linux xtensa-embedded xtensa-freertos z80-embedded z80-zxspectrum z80-msxdos z80-amstradcpc BSDs = freebsd netbsd openbsd darwin dragonfly UNIXs = linux $(BSDs) solaris qnx haiku aix LIMIT83fs = go32v2 os2 emx watcom msdos win16 atari @@ -366,310 +366,313 @@ override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM endif override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM ifeq ($(FULL_TARGET),i386-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-win32) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-os2) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-beos) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-netware) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-emx) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-wince) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-iphonesim) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-android) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-aros) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),m68k-macosclassic) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc-macosclassic) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc-wii) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc-aix) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-haiku) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-netbsd) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-openbsd) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-iphonesim) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-android) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-aros) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),x86_64-dragonfly) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-netbsd) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-wince) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-gba) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-nds) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-android) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-aros) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-freertos) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),arm-ios) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),powerpc64-aix) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),mips-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),mipsel-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),mipsel-android) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),mips64el-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),jvm-java) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),jvm-android) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i8086-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i8086-msdos) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i8086-win16) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),aarch64-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),aarch64-darwin) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),aarch64-win64) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),aarch64-android) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),aarch64-ios) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),wasm-wasm) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),sparc64-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),riscv32-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),riscv32-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),riscv64-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),riscv64-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),xtensa-linux) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),xtensa-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),xtensa-freertos) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),z80-embedded) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),z80-zxspectrum) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),z80-msxdos) -override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl math typinfo mmx sortbase classes sysutils +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils +endif +ifeq ($(FULL_TARGET),z80-amstradcpc) +override TARGET_UNITS+=system uuchar objpas macpas iso7185 extpas strings watcom dos cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl character fpwidestring unicodedata unicodenumtable math typinfo mmx sortbase classes sysutils endif ifeq ($(FULL_TARGET),i386-linux) override TARGET_IMPLICITUNITS+=exeinfo cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 cp437 cp646 cp737 cp775 cp850 cp852 cp855 cp856 cp857 cp860 cp861 cp862 cp863 cp864 cp865 cp866 cp869 cp874 cp3021 cp8859_1 cp8859_2 cp8859_3 cp8859_4 cp8859_5 cp8859_6 cp8859_7 cp8859_8 cp8859_9 cp8859_10 cp8859_11 cp8859_13 cp8859_14 cp8859_15 cp8859_16 cpkoi8_r cpkoi8_u @@ -977,6 +980,9 @@ endif ifeq ($(FULL_TARGET),z80-msxdos) override TARGET_IMPLICITUNITS+=exeinfo cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 cp437 cp646 cp737 cp775 cp850 cp852 cp855 cp856 cp857 cp860 cp861 cp862 cp863 cp864 cp865 cp866 cp869 cp874 cp3021 cp8859_1 cp8859_2 cp8859_3 cp8859_4 cp8859_5 cp8859_6 cp8859_7 cp8859_8 cp8859_9 cp8859_10 cp8859_11 cp8859_13 cp8859_14 cp8859_15 cp8859_16 cpkoi8_r cpkoi8_u endif +ifeq ($(FULL_TARGET),z80-amstradcpc) +override TARGET_IMPLICITUNITS+=exeinfo cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 cp437 cp646 cp737 cp775 cp850 cp852 cp855 cp856 cp857 cp860 cp861 cp862 cp863 cp864 cp865 cp866 cp869 cp874 cp3021 cp8859_1 cp8859_2 cp8859_3 cp8859_4 cp8859_5 cp8859_6 cp8859_7 cp8859_8 cp8859_9 cp8859_10 cp8859_11 cp8859_13 cp8859_14 cp8859_15 cp8859_16 cpkoi8_r cpkoi8_u +endif ifeq ($(FULL_TARGET),i386-linux) override TARGET_LOADERS+=prt0 endif @@ -1283,6 +1289,9 @@ endif ifeq ($(FULL_TARGET),z80-msxdos) override TARGET_LOADERS+=prt0 endif +ifeq ($(FULL_TARGET),z80-amstradcpc) +override TARGET_LOADERS+=prt0 +endif ifeq ($(FULL_TARGET),i386-linux) override TARGET_RSTS+=math typinfo classes sysconst endif @@ -1589,6 +1598,9 @@ endif ifeq ($(FULL_TARGET),z80-msxdos) override TARGET_RSTS+=math typinfo classes sysconst endif +ifeq ($(FULL_TARGET),z80-amstradcpc) +override TARGET_RSTS+=math typinfo classes sysconst +endif override INSTALL_FPCPACKAGE=y ifeq ($(FULL_TARGET),i386-linux) override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) @@ -1896,6 +1908,9 @@ endif ifeq ($(FULL_TARGET),z80-msxdos) override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) endif +ifeq ($(FULL_TARGET),z80-amstradcpc) +override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) +endif ifeq ($(FULL_TARGET),i386-linux) override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) endif @@ -2202,6 +2217,9 @@ endif ifeq ($(FULL_TARGET),z80-msxdos) override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) endif +ifeq ($(FULL_TARGET),z80-amstradcpc) +override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) +endif ifdef REQUIRE_UNITSDIR override UNITSDIR+=$(REQUIRE_UNITSDIR) endif @@ -2428,15 +2446,34 @@ ifneq ($(findstring sparc64,$(shell uname -a)),) ifeq ($(BINUTILSPREFIX),) GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`) else +ifneq ($(findstring $(FPCFPMAKE_CPU_OPT),mips mipsel),) +CROSSGCCOPT=-mabi=32 +else CROSSGCCOPT=-m32 endif endif endif endif +endif ifdef FPCFPMAKE FPCFPMAKE_CPU_TARGET=$(shell $(FPCFPMAKE) -iTP) ifeq ($(CPU_TARGET),$(FPCFPMAKE_CPU_TARGET)) FPCMAKEGCCLIBDIR:=$(GCCLIBDIR) +else +ifneq ($(findstring $(FPCFPMAKE_CPU_TARGET),aarch64 powerpc64 riscv64 sparc64 x86_64),) +FPCMAKE_CROSSGCCOPT=-m64 +else +ifneq ($(findstring $(FPCFPMAKE_CPU_OPT),mips64 mips64el),) +FPCMAKE_CROSSGCCOPT=-mabi=64 +else +ifneq ($(findstring $(FPCFPMAKE_CPU_OPT),mips mipsel),) +FPCMAKE_CROSSGCCOPT=-mabi=32 +else +FPCMAKE_CROSSGCCOPT=-m32 +endif +endif +endif +FPCMAKEGCCLIBDIR:=$(shell dirname `gcc $(FPCMAKE_CROSSGCCOPT) -print-libgcc-file-name`) endif endif ifndef FPCMAKEGCCLIBDIR @@ -3568,6 +3605,14 @@ charset$(PPUEXT) : $(INC)/charset.pp system$(PPUEXT) cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT) $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) system$(PPUEXT) +fpwidestring$(PPUEXT): $(OBJPASDIR)/fpwidestring.pp charset$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(OBJPASDIR)/fpwidestring.pp +character$(PPUEXT): $(OBJPASDIR)/character.pas sysutils$(PPUEXT) objpas$(PPUEXT) rtlconst$(PPUEXT) unicodedata$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(OBJPASDIR)/character.pas +unicodenumtable$(PPUEXT) : $(OBJPASDIR)/unicodenumtable.pas system$(PPUEXT) + $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/unicodenumtable.pas +unicodedata$(PPUEXT) : $(OBJPASDIR)/unicodedata.pas unicodenumtable$(PPUEXT) system$(PPUEXT) + $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/unicodedata.pas sortbase$(PPUEXT) : $(INC)/sortbase.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) $(COMPILER) $< msmouse$(PPUEXT) : msmouse.pp system$(PPUEXT) diff --git a/rtl/watcom/Makefile.fpc b/rtl/watcom/Makefile.fpc index 616bbfac78..410d78f359 100644 --- a/rtl/watcom/Makefile.fpc +++ b/rtl/watcom/Makefile.fpc @@ -10,6 +10,7 @@ loaders=prt0 #exceptn fpu units=system uuchar objpas macpas iso7185 extpas strings watcom dos \ cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl \ + character fpwidestring unicodedata unicodenumtable \ math typinfo mmx sortbase \ classes sysutils implicitunits=exeinfo \ @@ -213,6 +214,18 @@ cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT) ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) system$(PPUEXT) +fpwidestring$(PPUEXT): $(OBJPASDIR)/fpwidestring.pp charset$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(OBJPASDIR)/fpwidestring.pp + +character$(PPUEXT): $(OBJPASDIR)/character.pas sysutils$(PPUEXT) objpas$(PPUEXT) rtlconst$(PPUEXT) unicodedata$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(OBJPASDIR)/character.pas + +unicodenumtable$(PPUEXT) : $(OBJPASDIR)/unicodenumtable.pas system$(PPUEXT) + $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/unicodenumtable.pas + +unicodedata$(PPUEXT) : $(OBJPASDIR)/unicodedata.pas unicodenumtable$(PPUEXT) system$(PPUEXT) + $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/unicodedata.pas + sortbase$(PPUEXT) : $(INC)/sortbase.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) $(COMPILER) $< From 58bca9cce18f26cd9c7c4a7dadae39995621a53b Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 30 Sep 2020 15:38:39 +0000 Subject: [PATCH 13/15] Various Watcom changes to enable compilation of packages and utils git-svn-id: trunk@47023 - --- packages/chm/fpmake.pp | 2 +- packages/libgd/src/gd.pas | 11 +++++++++++ packages/rtl-generics/fpmake.pp | 2 +- packages/rtl-objpas/fpmake.pp | 4 ++-- packages/rtl-unicode/fpmake.pp | 2 +- utils/fpcreslipo/fpmake.pp | 2 +- utils/fpdoc/fpmake.pp | 2 +- 7 files changed, 18 insertions(+), 7 deletions(-) diff --git a/packages/chm/fpmake.pp b/packages/chm/fpmake.pp index 25c65e3672..be98f9534b 100644 --- a/packages/chm/fpmake.pp +++ b/packages/chm/fpmake.pp @@ -25,7 +25,7 @@ begin P.Email := ''; P.Description := 'Standalone CHM reader and writer library'; P.NeedLibC:= false; - P.OSes := P.OSes - [embedded,nativent,msdos,win16,macosclassic,palmos,atari,zxspectrum,msxdos,amstradcpc]; + P.OSes := P.OSes - [embedded,nativent,msdos,win16,macosclassic,palmos,atari,zxspectrum,msxdos,amstradcpc,watcom]; if Defaults.CPU=jvm then P.OSes := P.OSes - [java,android]; diff --git a/packages/libgd/src/gd.pas b/packages/libgd/src/gd.pas index 98df1523c6..8d0baa0088 100644 --- a/packages/libgd/src/gd.pas +++ b/packages/libgd/src/gd.pas @@ -16,6 +16,9 @@ unit gd; {$IFDEF GO32V2} {$UNDEF FPC_TARGET_SUPPORTS_DYNLIBS} {$ENDIF GO32V2} +{$IFDEF WATCOM} + {$UNDEF FPC_TARGET_SUPPORTS_DYNLIBS} +{$ENDIF WATCOM} {$IFDEF AMIGA} {$UNDEF FPC_TARGET_SUPPORTS_DYNLIBS} {$ENDIF AMIGA} @@ -76,6 +79,14 @@ uses {$linklib c} {$UNDEF LOAD_DYNAMICALLY} {$ENDIF GO32V2} +{$IFDEF WATCOM} + {$DEFINE EXTDECL := cdecl} + {$DEFINE gdlib := } + {$DEFINE clib := } + {$linklib gd} + {$linklib c} + {$UNDEF LOAD_DYNAMICALLY} +{$ENDIF WATCOM} {$IFDEF OS2} (* Force static linking under OS/2 for now to avoid *) (* dependency on dll for a one particular libc version. *) diff --git a/packages/rtl-generics/fpmake.pp b/packages/rtl-generics/fpmake.pp index e8a57f364d..4bcf9e9c77 100644 --- a/packages/rtl-generics/fpmake.pp +++ b/packages/rtl-generics/fpmake.pp @@ -23,7 +23,7 @@ begin P.Email := ''; P.Description := 'Generic collection library.'; P.NeedLibC:= false; - P.OSes := AllOSes-[embedded,win16,macosclassic,palmos,zxspectrum,msxdos,amstradcpc]; + P.OSes := AllOSes-[embedded,win16,macosclassic,palmos,zxspectrum,msxdos,amstradcpc,watcom]; if Defaults.CPU=jvm then P.OSes := P.OSes - [java,android]; diff --git a/packages/rtl-objpas/fpmake.pp b/packages/rtl-objpas/fpmake.pp index 50cc855051..4fd5c77a0d 100644 --- a/packages/rtl-objpas/fpmake.pp +++ b/packages/rtl-objpas/fpmake.pp @@ -18,9 +18,9 @@ Const StrUtilsOSes = [atari,emx,gba,go32v2,msdos,nds,netware,wince,nativent,os2,netwlibc,symbian,watcom,wii,win32,win64,freertos]+UnixLikes+AllAmigaLikeOSes; VarUtilsOSes = [atari,emx,gba,go32v2,msdos,nds,netware,wince,nativent,os2,netwlibc,symbian,watcom,wii,win32,win64,freertos]+UnixLikes+AllAmigaLikeOSes; ConvUtilsOSes = [nativent,netware,netwlibc,win32,win64,wince]+AllAmigaLikeOSes+UnixLikes-[BeOS]; - ConvUtilOSes = [atari,Go32v2,msdos,os2,emx,freertos]; + ConvUtilOSes = [atari,Go32v2,msdos,os2,emx,freertos,watcom]; DateUtilsOSes = [gba,nativent,nds,netware,netwlibc,symbian,wii,win32,win64,wince,freertos]+UnixLikes+AllAmigaLikeOSes; - DateUtilOSes = [atari,Go32v2,msdos,os2,emx,freertos]; + DateUtilOSes = [atari,Go32v2,msdos,os2,emx,freertos,watcom]; StdConvsOSes = [NativeNT,Win32,win64,os2,msdos,go32v2,freertos]+UnixLikes-[BeOS]; FmtBCDOSes = [atari,emx,gba,go32v2,msdos,nativent,nds,netware,netwlibc,os2,symbian,watcom,wii,win32,win64,wince,freertos]+UnixLikes+AllAmigaLikeOSes; VariantsOSes = [atari,emx,gba,go32v2,msdos,nativent,nds,netware,netwlibc,os2,symbian,watcom,wii,win32,win64,wince,freertos]+UnixLikes+AllAmigaLikeOSes; diff --git a/packages/rtl-unicode/fpmake.pp b/packages/rtl-unicode/fpmake.pp index 003d3a3bc2..3290665914 100644 --- a/packages/rtl-unicode/fpmake.pp +++ b/packages/rtl-unicode/fpmake.pp @@ -12,7 +12,7 @@ Const // in workable state atm. UnixLikes = AllUnixOSes -[QNX]; - CollationOSes = [aix,android,darwin,emx,freebsd,go32v2,linux,netbsd,openbsd,os2,solaris,win32,win64,dragonfly,haiku,freertos]; + CollationOSes = [aix,android,darwin,emx,freebsd,go32v2,linux,netbsd,openbsd,os2,solaris,win32,win64,dragonfly,haiku,freertos,watcom]; CPUnits = [aix,amiga,aros,android,beos,darwin,iphonesim,ios,emx,gba,nds,freebsd,go32v2,haiku,linux,morphos,netbsd,netware,netwlibc,openbsd,os2,solaris,watcom,wii,win32,win64,wince,dragonfly,freertos]; utf8bidiOSes = [netware,netwlibc]; freebidiOSes = [netware,netwlibc]; diff --git a/utils/fpcreslipo/fpmake.pp b/utils/fpcreslipo/fpmake.pp index 6518ea668e..7ef885ae58 100644 --- a/utils/fpcreslipo/fpmake.pp +++ b/utils/fpcreslipo/fpmake.pp @@ -17,7 +17,7 @@ begin P:=AddPackage('utils-fpcreslipo'); P.ShortName:='fprl'; P.Description:='Free Pascal External Resource Thinner'; - P.OSes:=AllOSes-[embedded,msdos,win16,macosclassic,palmos,zxspectrum,msxdos,amstradcpc]; + P.OSes:=AllOSes-[embedded,msdos,win16,macosclassic,palmos,zxspectrum,msxdos,amstradcpc,watcom]; if Defaults.CPU=jvm then P.OSes := P.OSes - [java,android]; diff --git a/utils/fpdoc/fpmake.pp b/utils/fpdoc/fpmake.pp index d0948513a6..c8e0da5374 100644 --- a/utils/fpdoc/fpmake.pp +++ b/utils/fpdoc/fpmake.pp @@ -25,7 +25,7 @@ begin P.Description := 'Free Pascal documentation generation utility.'; P.NeedLibC:= false; - P.OSes:=AllOSes-[embedded,msdos,win16,go32v2,nativent,macosclassic,palmos,atari,zxspectrum,msxdos,amstradcpc]; + P.OSes:=AllOSes-[embedded,msdos,win16,go32v2,nativent,macosclassic,palmos,atari,zxspectrum,msxdos,amstradcpc,watcom]; if Defaults.CPU=jvm then P.OSes := P.OSes - [java,android]; From 284aca734872cdc6c60e9d5c3b94047907ec81fe Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 30 Sep 2020 19:20:14 +0000 Subject: [PATCH 14/15] + x86: FstpFld2Fst optimization (re-enabled for safe cases) git-svn-id: trunk@47024 - --- compiler/x86/aoptx86.pas | 27 ++++++++++++++++-------- tests/tbs/tb0519.pp | 1 + tests/test/tthlp4.pp | 2 ++ tests/test/units/sysutils/tfloattostr.pp | 2 ++ tests/webtbs/tw25121.pp | 2 ++ 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/compiler/x86/aoptx86.pas b/compiler/x86/aoptx86.pas index 52956ed9e6..9b2d929686 100644 --- a/compiler/x86/aoptx86.pas +++ b/compiler/x86/aoptx86.pas @@ -3820,8 +3820,8 @@ unit aoptx86; (taicpu(hp1).opsize = taicpu(p).opsize) and RefsEqual(taicpu(p).oper[0]^.ref^, taicpu(hp1).oper[0]^.ref^) then begin - { replacing fstp f;fld f by fst f is only valid for extended because of rounding } - if (taicpu(p).opsize=S_FX) and + { replacing fstp f;fld f by fst f is only valid for extended because of rounding or if fastmath is on } + if ((taicpu(p).opsize=S_FX) or (cs_opt_fastmath in current_settings.optimizerswitches)) and GetNextInstruction(hp1, hp2) and (hp2.typ = ait_instruction) and IsExitCode(hp2) and @@ -3835,18 +3835,27 @@ unit aoptx86; RemoveLastDeallocForFuncRes(p); Result := true; end - (* can't be done because the store operation rounds else - { fst can't store an extended value! } - if (taicpu(p).opsize <> S_FX) and - (taicpu(p).opsize <> S_IQ) then + { we can do this only in fast math mode as fstp is rounding ... + ... still disabled as it breaks the compiler and/or rtl } + if ({ (cs_opt_fastmath in current_settings.optimizerswitches) or } + { ... or if another fstp equal to the first one follows } + (GetNextInstruction(hp1,hp2) and + (hp2.typ = ait_instruction) and + (taicpu(p).opcode=taicpu(hp2).opcode) and + (taicpu(p).opsize=taicpu(hp2).opsize)) + ) and + { fst can't store an extended/comp value } + (taicpu(p).opsize <> S_FX) and + (taicpu(p).opsize <> S_IQ) then begin if (taicpu(p).opcode = A_FSTP) then taicpu(p).opcode := A_FST - else taicpu(p).opcode := A_FIST; + else + taicpu(p).opcode := A_FIST; + DebugMsg(SPeepholeOptimization + 'FstpFld2Fst',p); RemoveInstruction(hp1); - end - *) + end; end; end; diff --git a/tests/tbs/tb0519.pp b/tests/tbs/tb0519.pp index 42890e24d2..ce03472487 100644 --- a/tests/tbs/tb0519.pp +++ b/tests/tbs/tb0519.pp @@ -1,3 +1,4 @@ +{ %OPT=-Oonofastmath } var e: extended; d: double; diff --git a/tests/test/tthlp4.pp b/tests/test/tthlp4.pp index b1f80bd512..0621524625 100644 --- a/tests/test/tthlp4.pp +++ b/tests/test/tthlp4.pp @@ -1,3 +1,5 @@ +{ %OPT=-Oonofastmath } + { this tests that the correct helper is used for constants } program tthlp4; diff --git a/tests/test/units/sysutils/tfloattostr.pp b/tests/test/units/sysutils/tfloattostr.pp index 2d2b7c5cdc..fe4192f012 100644 --- a/tests/test/units/sysutils/tfloattostr.pp +++ b/tests/test/units/sysutils/tfloattostr.pp @@ -1,3 +1,5 @@ +{ %OPT=-Oonofastmath } + { Test for FloatToStr and CurrToStr functions. } uses sysutils; diff --git a/tests/webtbs/tw25121.pp b/tests/webtbs/tw25121.pp index 59dee8d1e9..f2ebf4e2a3 100644 --- a/tests/webtbs/tw25121.pp +++ b/tests/webtbs/tw25121.pp @@ -1,3 +1,5 @@ +{ %OPT=-Oonofastmath } + begin if not(single(144115188075855877) = single(144115188075855872)) then halt(1); From 1e4dc56155d14f7531da51fad19b8986bb669b1d Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 30 Sep 2020 21:18:33 +0000 Subject: [PATCH 15/15] * inlinable frame handling dummies for avr * inline frame handler if possible git-svn-id: trunk@47025 - --- rtl/avr/avr.inc | 21 +++++++++++++++------ rtl/inc/system.inc | 2 +- rtl/inc/systemh.inc | 8 ++++---- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/rtl/avr/avr.inc b/rtl/avr/avr.inc index 8f8aac1e21..cd07669688 100644 --- a/rtl/avr/avr.inc +++ b/rtl/avr/avr.inc @@ -93,21 +93,30 @@ end; {$IFNDEF INTERNAL_BACKTRACE} {$define FPC_SYSTEM_HAS_GET_FRAME} -function get_frame:pointer;assembler;nostackframe; - asm +{ this is never going to work on avr properly this way, so inline and return nil so the compiler + can optimize it } +function get_frame:pointer;inline; + begin + result:=nil; end; {$ENDIF not INTERNAL_BACKTRACE} {$define FPC_SYSTEM_HAS_GET_CALLER_ADDR} -function get_caller_addr(framebp:pointer;addr:pointer=nil):pointer;assembler;nostackframe; - asm +{ this is never going to work on avr properly this way, so inline and return nil so the compiler + can optimize it } +function get_caller_addr(framebp:pointer;addr:pointer=nil):pointer;inline; + begin + result:=nil; end; {$define FPC_SYSTEM_HAS_GET_CALLER_FRAME} -function get_caller_frame(framebp:pointer;addr:pointer=nil):pointer;assembler;nostackframe; - asm +{ this is never going to work on avr properly this way, so inline and return nil so the compiler + can optimize it } +function get_caller_frame(framebp:pointer;addr:pointer=nil):pointer;inline; + begin + result:=nil; end; diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc index 3723bb54d2..8d62520a80 100644 --- a/rtl/inc/system.inc +++ b/rtl/inc/system.inc @@ -860,7 +860,7 @@ end; { This provides a dummy implementation of get_pc_addr function, for CPU's that don't need the instruction address to walk the stack. } -function get_pc_addr : codepointer; +function get_pc_addr : codepointer;inline; begin get_pc_addr:=nil; end; diff --git a/rtl/inc/systemh.inc b/rtl/inc/systemh.inc index 0ae5f9b6c4..3a8b3a29ca 100644 --- a/rtl/inc/systemh.inc +++ b/rtl/inc/systemh.inc @@ -1473,15 +1473,15 @@ function get_caller_frame(framebp:pointer;addr:pointer=nil):pointer;[INTERNPROC: function get_frame:pointer;{$ifdef SYSTEMINLINE}inline;{$endif} {$ENDIF} -Function Get_pc_addr : CodePointer; +Function Get_pc_addr : CodePointer;{$ifdef SYSTEMINLINE}inline;{$endif} { Writes at most 'count' caller stack frames to pre-allocated buffer pointed to by 'frames', skipping 'skipframes' initial frames. Returns number of frames written. } function CaptureBacktrace(skipframes,count:sizeint;frames:PCodePointer):sizeint; -function get_caller_addr(framebp:pointer;addr:codepointer=nil):codepointer; -function get_caller_frame(framebp:pointer;addr:codepointer=nil):pointer; -procedure get_caller_stackinfo(var framebp : pointer; var addr : codepointer); +function get_caller_addr(framebp:pointer;addr:codepointer=nil):codepointer;{$ifdef SYSTEMINLINE}inline;{$endif} +function get_caller_frame(framebp:pointer;addr:codepointer=nil):pointer;{$ifdef SYSTEMINLINE}inline;{$endif} +procedure get_caller_stackinfo(var framebp : pointer; var addr : codepointer);{$ifdef SYSTEMINLINE}inline;{$endif} Function IOResult:Word; Function SPtr:Pointer;[internconst:fpc_in_const_ptr];