Przeglądaj źródła

* synchronized with trunk

git-svn-id: branches/wasm@47026 -
nickysn 4 lat temu
rodzic
commit
22f082c18f

+ 1 - 0
.gitattributes

@@ -12125,6 +12125,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

+ 9 - 4
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;

+ 13 - 3
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
@@ -641,7 +646,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,[]));
@@ -690,6 +695,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
@@ -781,9 +787,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;

+ 18 - 18
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
@@ -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
@@ -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,9 +795,9 @@ 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);
-               if assigned(hp.next) and not(tai(hp.next).typ in
+                 writer.AsmWriteLn(#9'PUBLIC'#9+ApplyAsmSymbolRestrictions(tai_symbol(hp).sym.name));
+               writer.AsmWrite(ApplyAsmSymbolRestrictions(tai_symbol(hp).sym.name));
+               if not assigned(hp.next) or not(tai(hp.next).typ in
                   [ait_const,ait_realconst,ait_string]) then
                  writer.AsmWriteLn(':');
              end;
@@ -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: '$';
           );

+ 18 - 9
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;
 

+ 1 - 1
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];
 

+ 14 - 1
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

+ 80 - 1
packages/fcl-passrc/tests/tcstatements.pas

@@ -71,6 +71,8 @@ Type
     procedure TestIfWithBlock;
     Procedure TestNestedIf;
     Procedure TestNestedIfElse;
+    Procedure TestNestedIfElseElse;
+    procedure TestIfIfElseElseBlock;
     Procedure TestWhile;
     Procedure TestWhileBlock;
     Procedure TestWhileNested;
@@ -98,6 +100,7 @@ Type
     Procedure TestCaseElseBlockAssignment;
     Procedure TestCaseElseBlock2Assignments;
     Procedure TestCaseIfCaseElse;
+    Procedure TestCaseIfCaseElseElse;
     Procedure TestCaseIfElse;
     Procedure TestCaseElseNoSemicolon;
     Procedure TestCaseIfElseNoSemicolon;
@@ -714,6 +717,58 @@ 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);
+  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;
+
+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
@@ -1247,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);
@@ -1257,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;

+ 11 - 0
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. *)

+ 1 - 1
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];
 

+ 2 - 2
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;

+ 1 - 1
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];

+ 15 - 6
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;
 
 

+ 1 - 1
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;

+ 4 - 4
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];

+ 24 - 31
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
-        lastentry := entry;
+            (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;
-        Continue;
-      end;
-      { skip entries added by Synchronize }
-      if Assigned(entry^.SyncEvent) then begin
+        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;
-
-      { 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

+ 111 - 103
rtl/watcom/Makefile

@@ -366,313 +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 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-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
@@ -3605,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)

+ 13 - 0
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) $<
 

+ 8 - 4
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;
 

+ 80 - 0
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;
+
+

+ 1 - 0
tests/tbs/tb0519.pp

@@ -1,3 +1,4 @@
+{ %OPT=-Oonofastmath }
 var
   e: extended;
   d: double;

+ 2 - 0
tests/test/tthlp4.pp

@@ -1,3 +1,5 @@
+{ %OPT=-Oonofastmath }
+
 { this tests that the correct helper is used for constants }
 
 program tthlp4;

+ 2 - 0
tests/test/units/sysutils/tfloattostr.pp

@@ -1,3 +1,5 @@
+{ %OPT=-Oonofastmath }
+
 { Test for FloatToStr and CurrToStr functions. }
 
 uses sysutils;

+ 2 - 0
tests/webtbs/tw25121.pp

@@ -1,3 +1,5 @@
+{ %OPT=-Oonofastmath }
+
 begin
   if not(single(144115188075855877) = single(144115188075855872)) then
     halt(1);

+ 1 - 1
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];
 

+ 1 - 1
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];