Browse Source

* build more units for wince.
* exitcode was fixed.
* stderr handle was fixed.
* support for heaptrc was added.

git-svn-id: trunk@1315 -

yury 20 years ago
parent
commit
15893c0a05
4 changed files with 69 additions and 54 deletions
  1. 52 40
      rtl/wince/Makefile
  2. 6 8
      rtl/wince/Makefile.fpc
  3. 0 1
      rtl/wince/arm/wprt0.as
  4. 11 5
      rtl/wince/system.pp

+ 52 - 40
rtl/wince/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2005/09/08]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2005/10/07]
 #
 default: all
-MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-wince
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-wince powerpc64-linux
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -249,112 +249,115 @@ GRAPHDIR=$(INC)/graph
 include $(WININC)/makefile.inc
 WINDOWS_SOURCE_FILES=$(addprefix $(WININC)/,$(addsuffix .inc,$(WINDOWS_FILES)))
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils charset getopts
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_UNITS+=$(SYSTEMUNIT) ctypes objpas macpas strings lineinfo heaptrc windows messages dos objects rtlconsts sysconst sysutils typinfo types classes strutils convutils math dateutils matrix ucomplex charset getopts
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_LOADERS+=wprt0 #wdllprt0
@@ -464,6 +467,9 @@ endif
 ifeq ($(FULL_TARGET),arm-wince)
 override TARGET_LOADERS+=wprt0 #wdllprt0
 endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_LOADERS+=wprt0 #wdllprt0
+endif
 override INSTALL_FPCPACKAGE=y
 ifeq ($(FULL_TARGET),i386-linux)
 override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(RTL)/win
@@ -573,6 +579,9 @@ endif
 ifeq ($(FULL_TARGET),arm-wince)
 override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(RTL)/win
 endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(RTL)/win
+endif
 ifeq ($(FULL_TARGET),i386-linux)
 override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
 endif
@@ -681,6 +690,9 @@ endif
 ifeq ($(FULL_TARGET),arm-wince)
 override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
 endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
+endif
 ifdef REQUIRE_UNITSDIR
 override UNITSDIR+=$(REQUIRE_UNITSDIR)
 endif
@@ -1891,12 +1903,12 @@ include $(INC)/makefile.inc
 SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
 include $(PROCINC)/makefile.cpu
 SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
-SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
+SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS) winres.inc
 wprt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as
 	$(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)wprt0$(OEXT) $(CPU_TARGET)/$(PRT0).as
 $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS)
 	$(COMPILER) -Us -Sg $(SYSTEMUNIT).pp
-objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT) softfpu$(PPUEXT)
+objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
 	$(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
 strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
 		   $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\

+ 6 - 8
rtl/wince/Makefile.fpc

@@ -8,19 +8,17 @@ main=rtl
 [target]
 loaders= wprt0 #wdllprt0
 units=$(SYSTEMUNIT) ctypes objpas macpas strings \
-      lineinfo \
-# heaptrc matrix \
+      lineinfo heaptrc \
       windows messages \
 # winsock initc cmem dynlibs signals \
       dos objects \
 # crt graph \
       rtlconsts sysconst sysutils \
       typinfo types classes \
-# math dateutils
-      strutils convutils \
-#     varutils variants \
+      strutils convutils math dateutils \
+#      varutils variants \
+      matrix ucomplex \
       charset getopts
-# cpu mmx ucomplex \
 #     wincrt winmouse winevent sockets printer \
 #     video mouse keyboard \
 #     winsysut fpmkunit
@@ -87,7 +85,7 @@ include $(PROCINC)/makefile.cpu
 SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 
 # Put system unit dependencies together.
-SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
+SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS) winres.inc
 
 
 #
@@ -106,7 +104,7 @@ wprt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as
 $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS)
         $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp
 
-objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT) softfpu$(PPUEXT)
+objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
         $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
 
 strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\

+ 0 - 1
rtl/wince/arm/wprt0.as

@@ -30,7 +30,6 @@ do_start:
 
 .globl asm_exit
 asm_exit:
-  mov r0,#0
   bl exitthread
   
 _PISCONSOLE:

+ 11 - 5
rtl/wince/system.pp

@@ -60,7 +60,7 @@ var
   hprevinst,
   MainInstance,
   DLLreason,DLLparam:longint;
-  WinCEStackTop : Dword;
+  Win32StackTop : Dword; // Used by heaptrc unit
 
 type
   TDLL_Process_Entry_Hook = function (dllparam : longint) : longbool;
@@ -540,7 +540,7 @@ begin
   { Setup cmdline variable }
   arg:=PChar(GetCommandLine);
   count:=WideToAnsiBuf(PWideChar(arg), -1, nil, 0);
-  GetMem(cmdline, arglen + count + 3);
+  cmdline:=SysGetMem(arglen + count + 3);
   cmdline^:='"';
   move(pc^, (cmdline + 1)^, arglen);
   (cmdline + arglen + 1)^:='"';
@@ -727,7 +727,7 @@ procedure asm_exit(Exitcode : longint);external name 'asm_exit';
 
 Procedure system_exit;
 begin
-  FreeMem(cmdline);
+  SysFreeMem(cmdline);
   { don't call ExitProcess inside
     the DLL exit code !!
     This crashes Win95 at least PM }
@@ -1369,7 +1369,13 @@ begin
 {$ifdef CPUARM}
   asm
     mov fp,#0
+    ldr r12,.LPWin32StackTop
+    str sp,[r12]
     bl PASCALMAIN;
+    b .Lend
+.LPWin32StackTop:
+    .long Win32StackTop
+.Lend:
   end;
 {$endif CPUARM}
 
@@ -1383,7 +1389,7 @@ begin
     pushl %ebp
     xorl %ebp,%ebp
     movl %esp,%eax
-    movl %eax,WinCEStackTop
+    movl %eax,Win32StackTop
     movw %ss,%bp
     movl %ebp,_SS
     call SysResetFPU
@@ -1574,7 +1580,7 @@ begin
   else begin
     StdInputHandle:=_fileno(_getstdfilex(0));
     StdOutputHandle:=_fileno(_getstdfilex(1));
-    StdErrorHandle:=_fileno(_getstdfilex(3));
+    StdErrorHandle:=_fileno(_getstdfilex(2));
 
     OpenStdIO(Input,fmInput,StdInputHandle);
     OpenStdIO(Output,fmOutput,StdOutputHandle);