瀏覽代碼

* target classic MacOS builds again

git-svn-id: trunk@39156 -
florian 7 年之前
父節點
當前提交
f03a396757
共有 7 個文件被更改,包括 543 次插入121 次删除
  1. 2 2
      Makefile
  2. 1 1
      Makefile.fpc
  3. 4 1
      compiler/Makefile
  4. 4 1
      compiler/Makefile.fpc
  5. 359 91
      rtl/macos/Makefile
  6. 29 8
      rtl/macos/Makefile.fpc
  7. 144 17
      rtl/macos/sysutils.pp

+ 2 - 2
Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2018-04-12 rev 38745]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2018-04-29 rev 38866]
 #
 default: help
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android i386-aros m68k-linux m68k-netbsd m68k-amiga m68k-atari m68k-palmos m68k-macos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-iphonesim x86_64-aros x86_64-dragonfly arm-linux arm-netbsd arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android arm-aros powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android jvm-java jvm-android i8086-embedded i8086-msdos i8086-win16 aarch64-linux aarch64-darwin wasm-wasm sparc64-linux
@@ -471,7 +471,7 @@ BUILDOPTS=FPC=$(PPNEW) FPCFPMAKE=$(FPCFPMAKENEW) RELEASE=1 'OPT=$(OPTNEW)'
 INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
 BuildOnlyBaseCPUs=jvm
 ifneq ($(wildcard utils),)
-NOUTILSTARGETS=embedded gba nds msdos win16 $(BuildOnlyBaseCPUs)
+NOUTILSTARGETS=embedded gba nds msdos win16 macos $(BuildOnlyBaseCPUs)
 ifeq ($(findstring $(OS_TARGET),$(NOUTILSTARGETS)),)
 ifdef BUILDFULLNATIVE
 UTILS=1

+ 1 - 1
Makefile.fpc

@@ -199,7 +199,7 @@ INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
 BuildOnlyBaseCPUs=jvm
 
 ifneq ($(wildcard utils),)
-NOUTILSTARGETS=embedded gba nds msdos win16 $(BuildOnlyBaseCPUs)
+NOUTILSTARGETS=embedded gba nds msdos win16 macos $(BuildOnlyBaseCPUs)
 ifeq ($(findstring $(OS_TARGET),$(NOUTILSTARGETS)),)
 ifdef BUILDFULLNATIVE
 UTILS=1

+ 4 - 1
compiler/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2018-04-12 rev 38745]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2018-04-29 rev 38866]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android i386-aros m68k-linux m68k-netbsd m68k-amiga m68k-atari m68k-palmos m68k-macos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-iphonesim x86_64-aros x86_64-dragonfly arm-linux arm-netbsd arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android arm-aros powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android jvm-java jvm-android i8086-embedded i8086-msdos i8086-win16 aarch64-linux aarch64-darwin wasm-wasm sparc64-linux
@@ -572,6 +572,9 @@ endif
 ifeq ($(OS_TARGET),win16)
 NoNativeBinaries=1
 endif
+ifeq ($(OS_TARGET),macos)
+NoNativeBinaries=1
+endif
 ifeq ($(NoNativeBinaries),1)
 override EXEEXT=$(SRCEXEEXT)
 CROSSINSTALL=1

+ 4 - 1
compiler/Makefile.fpc

@@ -348,8 +348,11 @@ endif
 ifeq ($(OS_TARGET),win16)
 NoNativeBinaries=1
 endif
+ifeq ($(OS_TARGET),macos)
+NoNativeBinaries=1
+endif
 
-# Allow install for jvm 
+# Allow install for jvm
 ifeq ($(NoNativeBinaries),1)
 override EXEEXT=$(SRCEXEEXT)
 # In those cases, installation in a cross-installation

+ 359 - 91
rtl/macos/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2018-04-12 rev 38745]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2018-04-29 rev 38866]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android i386-aros m68k-linux m68k-netbsd m68k-amiga m68k-atari m68k-palmos m68k-macos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-iphonesim x86_64-aros x86_64-dragonfly arm-linux arm-netbsd arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android arm-aros powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android jvm-java jvm-android i8086-embedded i8086-msdos i8086-win16 aarch64-linux aarch64-darwin wasm-wasm sparc64-linux
@@ -351,259 +351,259 @@ endif
 OBJPASDIR=$(RTL)/objpas
 GRAPHDIR=$(INC)/graph
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-nativent)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-android)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-aros)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),m68k-macos)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc-aix)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),x86_64-netbsd)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),x86_64-openbsd)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),x86_64-iphonesim)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),x86_64-aros)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),x86_64-dragonfly)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),arm-netbsd)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),arm-android)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),arm-aros)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),powerpc64-aix)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),mips-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),mipsel-embedded)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),mipsel-android)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),jvm-java)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),jvm-android)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i8086-embedded)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i8086-msdos)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i8086-win16)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),aarch64-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),aarch64-darwin)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),wasm-wasm)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),sparc64-linux)
-override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes
+override TARGET_UNITS+=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils unixutil dos extpas cmem charset cpall ctypes sysconst softfpu macpas
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_IMPLICITUNITS+=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
@@ -860,6 +860,261 @@ endif
 ifeq ($(FULL_TARGET),sparc64-linux)
 override TARGET_IMPLICITUNITS+=cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 cp437 cp646 cp737 cp775 cp850 cp852 cp855 cp856 cp857 cp860 cp861 cp862 cp863 cp864 cp865 cp866 cp869 cp874 cp3021 cp8859_1 cp8859_2 cp8859_3 cp8859_4 cp8859_5 cp8859_6 cp8859_7 cp8859_8 cp8859_9 cp8859_10 cp8859_11 cp8859_13 cp8859_14 cp8859_15 cp8859_16 cpkoi8_r cpkoi8_u
 endif
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-haiku)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-android)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i386-aros)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),m68k-macos)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc-aix)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),x86_64-netbsd)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),x86_64-openbsd)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),x86_64-iphonesim)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),x86_64-aros)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),x86_64-dragonfly)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),arm-netbsd)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),arm-darwin)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),arm-android)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),arm-aros)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),powerpc64-aix)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),avr-embedded)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),armeb-linux)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),armeb-embedded)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),mips-linux)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),mipsel-embedded)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),mipsel-android)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),jvm-java)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),jvm-android)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i8086-embedded)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i8086-msdos)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),i8086-win16)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),aarch64-linux)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),aarch64-darwin)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),wasm-wasm)
+override TARGET_RSTS+=sysconst
+endif
+ifeq ($(FULL_TARGET),sparc64-linux)
+override TARGET_RSTS+=sysconst
+endif
 override INSTALL_FPCPACKAGE=y
 ifeq ($(FULL_TARGET),i386-linux)
 override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
@@ -2581,27 +2836,40 @@ system$(PPUEXT) : system.pp $(SYSDEPS)
 strings$(PPUEXT) : $(INC)/strings.pp system$(PPUEXT)
 	$(COMPILER) $(INC)/strings.pp $(REDIR)
 uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
+	$(COMPILER) $(INC)/uuchar.pp
 objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp system$(PPUEXT)
 	$(COPY) $(OBJPASDIR)/objpas.pp .
 	$(COMPILER) objpas $(REDIR)
 	$(DEL) objpas.pp
-sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp objpas$(PPUEXT) system$(PPUEXT) sysconst$(PPUEXT)
-	$(COPY) $(OBJPASDIR)/sysutils.pp .
-	$(COMPILER) sysutils $(REDIR)
+sysutils$(PPUEXT) : sysutils.pp objpas$(PPUEXT) system$(PPUEXT) sysconst$(PPUEXT) macostp$(PPUEXT) macutils$(PPUEXT)
+	$(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
+sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) softfpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) 
+	$(COMPILER) $(OBJPASDIR)/sysconst.pp
+softfpu$(PPUEXT) : $(INC)/softfpu.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
+	$(COMPILER) $(INC)/softfpu.pp
+rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(OBJPASDIR)/rtlconsts.pp
 macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
 	$(COMPILER) $(INC)/macpas.pp $(REDIR)
 dos$(PPUEXT) : $(DOSDEPS) unixutil$(PPUEXT) system$(PPUEXT)
 	$(COMPILER) dos $(REDIR)
+iso7185$(PPUEXT) : $(INC)/iso7185.pp heaptrc$(PPUEXT)
+	$(COMPILER) $(INC)/iso7185.pp
+extpas$(PPUEXT) : $(INC)/extpas.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/extpas.pp
 getopts$(PPUEXT) : $(INC)/getopts.pp strings$(PPUEXT) system$(PPUEXT)
 	$(COMPILER) $(INC)/getopts.pp $(REDIR)
 heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
 	$(COMPILER) $(INC)/heaptrc.pp $(REDIR)
 unixutil$(PPUEXT) : ../unix/unixutil.pp
 	$(COMPILER) ../unix/unixutil.pp $(REDIR)
-charset$(PPUEXT) : $(INC)/charset.pp system$(PPUEXT)
+charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
+	$(COMPILER) $(INC)/charset.pp
 cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
 	$(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
-cmem$(PPUEXT) : $(INC)/cmem.pp system$(PPUEXT)
+cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/cmem.pp
 ctypes$(PPUEXT) :  $(INC)/ctypes.pp system$(PPUEXT)
+	$(COMPILER) $(INC)/ctypes.pp
 math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 	$(COMPILER) $(OBJPASDIR)/math.pp

+ 29 - 8
rtl/macos/Makefile.fpc

@@ -8,12 +8,14 @@ main=rtl
 [target]
 loaders=
 units=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils \
-      unixutil dos extpas cmem charset cpall ctypes
+      unixutil dos extpas cmem charset cpall ctypes sysconst \
+	  softfpu macpas
+#	   sysutils 
 #     macpas \
 #      exec  \
 #      printer \
 #      lineinfo lnfodwrf  graph \
-#      sysutils math typinfo
+#      math typinfo
 # rsts=math
 # implicitunits=exeinfo \
 implicitunits=cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
@@ -22,6 +24,9 @@ implicitunits=cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
       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
 
+rsts=sysconst
+# math typinfo sysconst rtlconsts
+  
 [require]
 nortl=y
 
@@ -108,17 +113,24 @@ strings$(PPUEXT) : $(INC)/strings.pp system$(PPUEXT)
 #
 
 uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
+	$(COMPILER) $(INC)/uuchar.pp
 
 objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp system$(PPUEXT)
 	$(COPY) $(OBJPASDIR)/objpas.pp .
 	$(COMPILER) objpas $(REDIR)
 	$(DEL) objpas.pp
 
-sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp objpas$(PPUEXT) system$(PPUEXT) sysconst$(PPUEXT)
-	$(COPY) $(OBJPASDIR)/sysutils.pp .
-	$(COMPILER) sysutils $(REDIR)
-#$(DEL) sysutils.pp
+sysutils$(PPUEXT) : sysutils.pp objpas$(PPUEXT) system$(PPUEXT) sysconst$(PPUEXT) macostp$(PPUEXT) macutils$(PPUEXT)
+	$(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
+	
+sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) softfpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) 
+        $(COMPILER) $(OBJPASDIR)/sysconst.pp
+		
+softfpu$(PPUEXT) : $(INC)/softfpu.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
+	$(COMPILER) $(INC)/softfpu.pp
 
+rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+        $(COMPILER) $(OBJPASDIR)/rtlconsts.pp
 #
 # Mac Pascal Model
 #
@@ -147,6 +159,12 @@ dos$(PPUEXT) : $(DOSDEPS) unixutil$(PPUEXT) system$(PPUEXT)
 # Other system-independent RTL Units
 #
 
+iso7185$(PPUEXT) : $(INC)/iso7185.pp heaptrc$(PPUEXT)
+        $(COMPILER) $(INC)/iso7185.pp
+
+extpas$(PPUEXT) : $(INC)/extpas.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+        $(COMPILER) $(INC)/extpas.pp
+
 getopts$(PPUEXT) : $(INC)/getopts.pp strings$(PPUEXT) system$(PPUEXT)
         $(COMPILER) $(INC)/getopts.pp $(REDIR)
 
@@ -156,14 +174,17 @@ heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
 unixutil$(PPUEXT) : ../unix/unixutil.pp
         $(COMPILER) ../unix/unixutil.pp $(REDIR)
 
-charset$(PPUEXT) : $(INC)/charset.pp system$(PPUEXT)
+charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
+	$(COMPILER) $(INC)/charset.pp
 
 cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
         $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
 
-cmem$(PPUEXT) : $(INC)/cmem.pp system$(PPUEXT)
+cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/cmem.pp
 
 ctypes$(PPUEXT) :  $(INC)/ctypes.pp system$(PPUEXT)
+	$(COMPILER) $(INC)/ctypes.pp
 
 math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
         $(COMPILER) $(OBJPASDIR)/math.pp

+ 144 - 17
rtl/macos/sysutils.pp

@@ -27,6 +27,9 @@ interface
 {$modeswitch typehelpers}
 {$modeswitch advancedrecords}
 
+{OS has only 1 byte version for ExecuteProcess}
+{$define executeprocuni}
+
 uses
   MacOSTP;
 
@@ -57,7 +60,7 @@ type
 implementation
 
 uses
-  Dos, Sysconst; // For some included files.
+  Dos, Sysconst, macutils; // For some included files.
 
 {$DEFINE FPC_FEXPAND_VOLUMES}
 {$DEFINE FPC_FEXPAND_NO_DEFAULT_PATHS}
@@ -304,7 +307,8 @@ procedure DoFind (var F: TSearchRec; var retname: RawByteString; firstTime: Bool
     s: Str255;
 
 begin
-  with Rslt, findData, paramBlock do
+(* TODO fix
+   with Rslt, findData, paramBlock do
     begin
       ioVRefNum := searchFSSpec.vRefNum;
       if firstTime then
@@ -345,6 +349,7 @@ begin
             end;
         end;
     end;
+*)
 end;
 
 
@@ -353,6 +358,7 @@ Function InternalFindFirst (Const Path : RawByteString; Attr : Longint; out Rslt
     s: Str255;
 
 begin
+(* TODO fix
   if path = '' then
     begin
       Result := 3;
@@ -402,16 +408,19 @@ begin
             DoFind(Rslt, name, true);
           end;
       end;
+*)
 end;
 
 
 Function InternalFindNext (var Rslt : TAbstractSearchRec; var Name : RawByteString) : Longint;
 
 begin
+(* TODO fix
   if F.exactMatch then
     Result := 18
   else
     Result:=DoFind (Rslt, Name, false);
+*)
 end;
 
 
@@ -568,15 +577,6 @@ Begin
   *)
 End;
 
-{****************************************************************************
-                              Misc Functions
-****************************************************************************}
-
-procedure Beep;
-begin
-//TODO fix
-end;
-
 
 {****************************************************************************
                               Locale Functions
@@ -655,11 +655,121 @@ begin
   Result:='';
 end;
 
-function ExecuteProcess(Const Path: AnsiString; Const ComLine: AnsiString;Flags:TExecuteFlags=[]):integer;
+{ Create a DoScript AppleEvent that targets the given application with text as the direct object. }
+function CreateDoScriptEvent (applCreator: OSType; scriptText: PChar; var theEvent: AppleEvent): OSErr;
+
+  var
+   err: OSErr;
+   targetAddress: AEDesc;
+   s: signedByte;
+
+begin
+  err := AECreateDesc(FourCharCodeToLongword(typeApplSignature), @applCreator, sizeof(applCreator), targetAddress);
+  if err = noErr then
+    begin
+      err := AECreateAppleEvent(FourCharCodeToLongword('misc'), FourCharCodeToLongword('dosc'),
+          targetAddress, kAutoGenerateReturnID, kAnyTransactionID, theEvent);
+
+      if err = noErr then
+          { Add script text as the direct object parameter. }
+          err := AEPutParamPtr(theEvent, FourCharCodeToLongword('----'),
+                    FourCharCodeToLongword('TEXT'), scriptText, Length(scriptText));
+
+      if err <> noErr then
+        AEDisposeDesc(theEvent);
+      AEDisposeDesc(targetAddress);
+    end;
+
+  CreateDoScriptEvent := err;
+end;
+
+Procedure Fpc_WriteBuffer(var f:Text;const b;len:longint);[external name 'FPC_WRITEBUFFER'];
+{declared in text.inc}
+
+procedure WriteAEDescTypeCharToFile(desc: AEDesc; var f: Text);
+
+begin
+  if desc.descriptorType = FourCharCodeToLongword(typeChar) then
+    begin
+      HLock(desc.dataHandle);
+      Fpc_WriteBuffer(f, PChar(desc.dataHandle^)^, GetHandleSize(desc.dataHandle));
+      Flush(f);
+      HUnLock(desc.dataHandle);
+    end;
+end;
+
+function ExecuteToolserverScript(scriptText: PChar; var statusCode: Longint): OSErr;
+
+  var
+    err: OSErr;
+    err2: OSErr;  {Non serious error}
+    theEvent: AppleEvent;
+    reply: AppleEvent;
+    aresult: AEDesc;
+    applFileSpec: FSSpec;
+    p: SignedByte;
+
+  const
+    applCreator = 'MPSX'; {Toolserver}
+
+begin
+  statusCode:= 3; //3 according to MPW.
+  err:= CreateDoScriptEvent (FourCharCodeToLongword(applCreator), scriptText, theEvent);
+  if err = noErr then
+    begin
+      err := AESend(theEvent, reply, kAEWaitReply, kAENormalPriority, kAEDefaultTimeOut, nil, nil);
+
+      if err = connectionInvalid then  { Toolserver not available }
+        begin
+          err := FindApplication(FourCharCodeToLongword(applCreator), applFileSpec);
+          if err = noErr then
+            err := LaunchFSSpec(false, applFileSpec);
+          if err = noErr then
+            err := AESend(theEvent, reply, kAEWaitReply, kAENormalPriority, kAEDefaultTimeOut, nil, nil);
+        end;
+
+      if err = noErr then
+        begin
+          err:= AEGetParamDesc(reply, FourCharCodeToLongword('stat'),
+                    FourCharCodeToLongword(typeLongInteger), aresult);
+
+          if err = noErr then
+            if aresult.descriptorType = FourCharCodeToLongword(typeLongInteger) then
+              statusCode:= LongintPtr(aresult.dataHandle^)^;
+
+          {If there is no output below, we get a non zero error code}
+
+          err2:= AEGetParamDesc(reply, FourCharCodeToLongword('----'),
+                    FourCharCodeToLongword(typeChar), aresult);
+          if err2 = noErr then
+             WriteAEDescTypeCharToFile(aresult, stdout);
+
+          err2:= AEGetParamDesc(reply, FourCharCodeToLongword('diag'),
+                    FourCharCodeToLongword(typeChar), aresult);
+          if err2 = noErr then
+            WriteAEDescTypeCharToFile(aresult, stderr);
+
+          AEDisposeDesc(reply);
+
+          {$IFDEF TARGET_API_MAC_CARBON }
+          {$ERROR FIXME AEDesc data is not allowed to be directly accessed}
+          {$ENDIF}
+        end;
+
+      AEDisposeDesc(theEvent);
+    end;
+
+  ExecuteToolserverScript:= err;
+end;
+
+
+function ExecuteProcess (const Path: RawByteString; const ComLine: RawByteString;Flags:TExecuteFlags=[]):
+                                                                       integer;
 var
   s: AnsiString;
-  wdpath: AnsiString;
+  wdpath: RawByteString;
   laststatuscode : longint;
+  E: EOSError;
 Begin
   {Make ToolServers working directory in sync with our working directory}
   PathArgToFullPath(':', wdpath);
@@ -675,9 +785,12 @@ Begin
     Result := 900
   else
     Result := MacOSErr2RTEerr(Result);
-  if Result <> 0
-  then
-    raise EOSErr;
+  if Result <> 0 then
+    begin
+      E := EOSError.CreateFmt (SExecuteProcessFailed, [Comline, DosError]);
+      E.ErrorCode := DosError;
+      raise E;
+    end;
   //TODO Better dos error codes
   if laststatuscode <> 0 then
     begin
@@ -690,10 +803,24 @@ Begin
     Result := 0;
 End;
 
-function ExecuteProcess(Const Path: AnsiString; Const ComLine: Array Of AnsiString;Flags:TExecuteFlags=[]):integer;
+
+function ExecuteProcess (const Path: RawByteString;
+                                  const ComLine: array of RawByteString;Flags:TExecuteFlags=[]): integer;
+var
+  CommandLine: RawByteString;
+  I: integer;
+
 begin
+  Commandline := '';
+  for I := 0 to High (ComLine) do
+   if Pos (' ', ComLine [I]) <> 0 then
+    CommandLine := CommandLine + ' ' + '"' + ToSingleByteFileSystemEncodedFileName(ComLine [I]) + '"'
+   else
+    CommandLine := CommandLine + ' ' + ToSingleByteFileSystemEncodedFileName(Comline [I]);
+  ExecuteProcess := ExecuteProcess (Path, CommandLine);
 end;
 
+
 procedure Sleep(milliseconds: Cardinal);
 begin
 end;