Jelajahi Sumber

* Merged 2.3 branch changes:
+ darwin/ppc64 support
+ val/str/read(ln)/write(ln) support for enums
+ simple cse at the node tree level
+ if-node simplify support
+ simple ssa support for memory locations
+ support for optional overflow/rangecheck boolean parameters for
operators
* a lot of unification of the ppc32/ppc64 code generators


........
r6380 | jonas | 2007-02-08 21:25:36 +0100 (Thu, 08 Feb 2007) | 4 lines
Changed paths:
M /branches/fpc_2_3/compiler/ncgld.pas
M /branches/fpc_2_3/compiler/tgobj.pas
A /branches/fpc_2_3/tests/webtbs/tw8283.pp

+ support for replacing the memory location of a temp (including
local variables) with that of another temp to avoid unnecessary
copies (mantis #8283)

........
r6381 | jonas | 2007-02-08 22:53:36 +0100 (Thu, 08 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/nflw.pas
A /branches/fpc_2_3/tests/webtbs/tw8282.pp

+ simplify support for ifn (based on patch by Florian)

........
r6386 | peter | 2007-02-09 13:48:53 +0100 (Fri, 09 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/htypechk.pas
M /branches/fpc_2_3/compiler/ncal.pas
M /branches/fpc_2_3/compiler/symconst.pas

* overflow,rangecheck optional parameters for operators, patch from 8281

........
r6391 | jonas | 2007-02-09 23:52:13 +0100 (Fri, 09 Feb 2007) | 4 lines
Changed paths:
M /branches/fpc_2_3/compiler/powerpc/agppcgas.pas
M /branches/fpc_2_3/compiler/powerpc64/cpunode.pas
D /branches/fpc_2_3/compiler/powerpc64/nppcinl.pas
M /branches/fpc_2_3/compiler/ppcgen/ngppcinl.pas

* merged fsqrt(s) support to common powerpc unit, activate for ppc32
if -Op970 is used (still default for ppc64, since default cpu there
is already ppc970)

........
r6394 | jonas | 2007-02-10 18:58:47 +0100 (Sat, 10 Feb 2007) | 4 lines
Changed paths:
M /branches/fpc_2_3/compiler/powerpc/cgcpu.pas
M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

* adapted a_jmp_name for darwin/ppc64
* merged g_intf_wrapper for ppc32 and ppc64, and added darwin/ppc64
support to it

........
r6396 | jonas | 2007-02-10 20:16:06 +0100 (Sat, 10 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/cgobj.pas

+ darwin/ppc64 support for g_indirect_sym_load

........
r6397 | jonas | 2007-02-10 20:22:49 +0100 (Sat, 10 Feb 2007) | 4 lines
Changed paths:
M /branches/fpc_2_3/compiler/powerpc/cgcpu.pas
M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

+ darwin/ppc64 support to ppc64's fixref
* moved ppc32 a_load_store to cgppc and use it for darwin/ppc64 as
well (its relocatable symbols are only 32 bits large)

........
r6399 | jonas | 2007-02-10 22:02:37 +0100 (Sat, 10 Feb 2007) | 4 lines
Changed paths:
M /branches/fpc_2_3/compiler/systems.pas

+ system_x86_64_darwin identifier
+ set default source system for system_x86_64_darwin and
system_powerpc64_darwin

........
r6404 | jonas | 2007-02-10 23:01:23 +0100 (Sat, 10 Feb 2007) | 5 lines
Changed paths:
M /branches/fpc_2_3/compiler/aasmdata.pas
M /branches/fpc_2_3/compiler/aggas.pas
M /branches/fpc_2_3/compiler/cgobj.pas
M /branches/fpc_2_3/compiler/cgutils.pas
M /branches/fpc_2_3/compiler/cresstr.pas
M /branches/fpc_2_3/compiler/dbgdwarf.pas
M /branches/fpc_2_3/compiler/dbgstabs.pas
M /branches/fpc_2_3/compiler/ncgutil.pas
M /branches/fpc_2_3/compiler/ogelf.pas
M /branches/fpc_2_3/compiler/pdecvar.pas
M /branches/fpc_2_3/compiler/pmodules.pas
M /branches/fpc_2_3/compiler/symdef.pas
M /branches/fpc_2_3/compiler/systems.pas

+ system_x86_64_darwin identifier
+ systems_darwin set which collects all darwin variants
+ added support for darwin/ppc64 and darwin/x86_64 where needed in
the generic code

........
r6406 | jonas | 2007-02-10 23:24:32 +0100 (Sat, 10 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/cgobj.pas

* ifdef cpu64 -> ifdef cpu64bit

........
r6409 | jonas | 2007-02-11 00:34:04 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/pdecvar.pas

* fixed ppc64 compilation

........
r6413 | jonas | 2007-02-11 12:41:27 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/rtl/bsd/system.pp
M /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc
M /branches/fpc_2_3/rtl/darwin/signal.inc

+ darwin/ppc64 support for signal routines

........
r6415 | jonas | 2007-02-11 13:54:53 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/systems/i_linux.pas

* set abi of linux/ppc64 to abi_powerpc_sysv

........
r6416 | jonas | 2007-02-11 13:55:51 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/powerpc64/cputarg.pas
M /branches/fpc_2_3/compiler/systems/i_bsd.pas
M /branches/fpc_2_3/compiler/systems/t_bsd.pas

+ darwin/ppc64 source and target information

........
r6418 | jonas | 2007-02-11 14:19:55 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/rtl/powerpc64/math.inc

* darwin/ppc64 compilation fixes

........
r6419 | jonas | 2007-02-11 14:22:22 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/powerpc/cgcpu.pas
M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

* darwin/ppc64 needs the 32 bit version of a_loadaddr_ref_reg

........
r6420 | jonas | 2007-02-11 14:22:55 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/utils/fpcm/fpcmmain.pp

+ darwin/ppc64 support

........
r6426 | jonas | 2007-02-11 16:13:19 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/powerpc64/rappcgas.pas

* fixed refaddr parsing for darwin/ppc64

........
r6427 | jonas | 2007-02-11 16:14:21 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/powerpc/agppcgas.pas
M /branches/fpc_2_3/compiler/powerpc64/agppcgas.pas
A /branches/fpc_2_3/compiler/ppcgen/agppcutl.pas

* moved ppc32/ppc64 assembler writer helpers to a common unit

........
r6430 | jonas | 2007-02-11 17:53:23 +0100 (Sun, 11 Feb 2007) | 4 lines
Changed paths:
D /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc
D /branches/fpc_2_3/rtl/darwin/powerpc/sighnd.inc
A /branches/fpc_2_3/rtl/darwin/powerpc64
A /branches/fpc_2_3/rtl/darwin/powerpc64/sig_cpu.inc
A /branches/fpc_2_3/rtl/darwin/powerpc64/sighnd.inc
A /branches/fpc_2_3/rtl/darwin/ppcgen
A /branches/fpc_2_3/rtl/darwin/ppcgen/ppchnd.inc (from /branches/fpc_2_3/rtl/darwin/powerpc/sighnd.inc:6422)
A /branches/fpc_2_3/rtl/darwin/ppcgen/sig_ppc.inc (from /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc:6422)
M /branches/fpc_2_3/rtl/darwin/signal.inc

* fixed ppc/ppc64 signal include handling (both real files are in
ppcgen, dummies in powerpc and powerpc64 which include those files)
(1st step because pre-commit filter can't handle replaced files)

........
r6431 | jonas | 2007-02-11 17:53:47 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
A /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc
A /branches/fpc_2_3/rtl/darwin/powerpc/sighnd.inc

* second step of signal include patch

........
r6432 | jonas | 2007-02-11 19:00:12 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/systems/t_bsd.pas

* changed darwin checks to use systems_darwin constant

........
r6433 | jonas | 2007-02-11 19:05:38 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas

* handle non-multiple-of-4 offsets with 64 bit loads/stores for
darwin/ppc64

........
r6434 | jonas | 2007-02-11 19:05:56 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
D /branches/fpc_2_3/compiler/powerpc/agppcgas.pas
D /branches/fpc_2_3/compiler/powerpc64/agppcgas.pas
A /branches/fpc_2_3/compiler/ppcgen/agppcgas.pas (from /branches/fpc_2_3/compiler/ppcgen/agppcutl.pas:6427)
D /branches/fpc_2_3/compiler/ppcgen/agppcutl.pas

* completely merged ppc assembler writers

........
r6435 | jonas | 2007-02-11 19:06:40 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/rtl/darwin/console.pp
M /branches/fpc_2_3/rtl/darwin/termiosproc.inc

* fixed 64 bit compilation

........
r6436 | jonas | 2007-02-11 19:09:28 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
M /branches/fpc_2_3/packages/extra/Makefile.fpc

* universal interfaces aren't 64 bit ready yet -> only compile for
darwin/ppc and darwin/i386

........
r6438 | jonas | 2007-02-11 19:22:34 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64
A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/ctest.o
A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/tcext3.o
A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/tcext4.o
A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/tcext5.o

+ compiled for darwin/ppc64

........
r6439 | jonas | 2007-02-11 20:24:42 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

* patch from Thomas to fix linux/ppc64

........
r6440 | jonas | 2007-02-11 20:25:15 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/systems.pas

* fixed setting source OS for darwin/ppc64

........
r6444 | florian | 2007-02-11 22:24:20 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/globtype.pas
M /branches/fpc_2_3/compiler/nopt.pas
M /branches/fpc_2_3/compiler/nutils.pas
M /branches/fpc_2_3/compiler/optcse.pas
M /branches/fpc_2_3/compiler/psub.pas

+ first node cse implementation

........
r6445 | jonas | 2007-02-11 22:30:07 +0100 (Sun, 11 Feb 2007) | 6 lines
Changed paths:
M /branches/fpc_2_3/compiler/cresstr.pas

* hack to work around strange darwin/ppc64 linker bug: it seems to
have problems if you put a global symbol at the end of a section
without any data following (at least in case of the resource strings
section) -> add dummy byte at the end for darwin/ppc64 (otherwise
it messes up the address of the first symbol stub entry)

........
r6449 | jonas | 2007-02-11 23:23:44 +0100 (Sun, 11 Feb 2007) | 4 lines
Changed paths:
M /branches/fpc_2_3/compiler/systems/i_bsd.pas

* cpupowerpc is defined for both ppc32 and ppc64 ->
changed to cpupowerpc32 to avoid defining source
wrongly on ppc64

........
r6450 | jonas | 2007-02-11 23:26:34 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
M /branches/fpc_2_3/compiler/ppcgen/ngppcset.pas

* disable jump tables for darwin/ppc64 for now, don't work
yet for some reason

........
r6451 | florian | 2007-02-11 23:54:37 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
M /branches/fpc_2_3/compiler/ncal.pas
M /branches/fpc_2_3/compiler/nutils.pas
M /branches/fpc_2_3/compiler/optcse.pas

* improved cse
* better complexity calculation for subscript nodes with classes or interfaces

........
r6456 | jonas | 2007-02-12 19:33:22 +0100 (Mon, 12 Feb 2007) | 4 lines
Changed paths:
M /branches/fpc_2_3/compiler/nutils.pas

+ support for notn,shln,shrn,equaln,unequaln,gtn,gten,ltn,lten in
node_cplexity()
* mark muln,divn,modn as more complex

........
r6469 | jonas | 2007-02-13 15:56:01 +0100 (Tue, 13 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/optcse.pas

* fixed when cross-compiling a 64 bit compiler from a 32 bit platform

........
r6471 | jonas | 2007-02-13 16:17:16 +0100 (Tue, 13 Feb 2007) | 3 lines
Changed paths:
M /branches/fpc_2_3/compiler/powerpc64/cputarg.pas

* include stabs support (can work on darwin/ppc64, but doesn't work
yet)

........
r6473 | jonas | 2007-02-13 16:45:48 +0100 (Tue, 13 Feb 2007) | 3 lines
Changed paths:
M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
M /branches/fpc_2_3/compiler/powerpc64/cpupara.pas

* R2 is a volatile and usable register under darwin/ppc64
* R13 is a reserved non-volatile register under darwin/ppc64 (tls)

........
r6479 | jonas | 2007-02-13 20:40:50 +0100 (Tue, 13 Feb 2007) | 3 lines
Changed paths:
M /branches/fpc_2_3/compiler/systems/i_bsd.pas

* maxCrecordalign seems to have to be 8 rather 4, in spite of what
the ABI docs say (although they are contradictory to some extent)

........
r6487 | jonas | 2007-02-14 15:57:40 +0100 (Wed, 14 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/tests/webtbs/tw8153a.pp

* fixed for darwin/ppc64

........
r6488 | jonas | 2007-02-14 15:58:56 +0100 (Wed, 14 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/tests/webtbs/tw7851a.pp

* fixed for darwin/ppc64

........
r6494 | jonas | 2007-02-15 19:36:55 +0100 (Thu, 15 Feb 2007) | 3 lines
Changed paths:
M /branches/fpc_2_3/compiler/systems/i_bsd.pas

* set default debug info for darwin/ppc64 to dwarf2 since
it works better than stabs currently

........
r6500 | jonas | 2007-02-15 21:38:16 +0100 (Thu, 15 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/version.pas

* updated version to 2.3.0

........
r6505 | jonas | 2007-02-15 22:39:28 +0100 (Thu, 15 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/version.pas

* changed version to 2.3.1

........
r6511 | jonas | 2007-02-16 15:17:24 +0100 (Fri, 16 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/powerpc64/itcpugas.pas

* system_powerpc_darwin -> system_powerpc64_darwin

........
r6546 | daniel | 2007-02-18 15:48:54 +0100 (Sun, 18 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/ncginl.pas
M /branches/fpc_2_3/compiler/ncgld.pas
M /branches/fpc_2_3/compiler/ncgrtti.pas
M /branches/fpc_2_3/compiler/ncnv.pas
M /branches/fpc_2_3/compiler/ninl.pas
M /branches/fpc_2_3/compiler/nld.pas
M /branches/fpc_2_3/compiler/nutils.pas
M /branches/fpc_2_3/compiler/pinline.pas
M /branches/fpc_2_3/rtl/inc/astrings.inc
M /branches/fpc_2_3/rtl/inc/compproc.inc
M /branches/fpc_2_3/rtl/inc/sstrings.inc
M /branches/fpc_2_3/rtl/inc/text.inc
M /branches/fpc_2_3/rtl/inc/wstrings.inc

+ Val/str/read/write support for enumeration types.

........
r6547 | daniel | 2007-02-18 17:01:20 +0100 (Sun, 18 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/rtl/inc/sstrings.inc

* Fix val code that I broke.

........
r6571 | daniel | 2007-02-20 09:27:44 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/rtl/inc/astrings.inc
M /branches/fpc_2_3/rtl/inc/sstrings.inc
M /branches/fpc_2_3/rtl/inc/text.inc
M /branches/fpc_2_3/rtl/inc/wstrings.inc

* o2s -> ord2str, s2o -> str2ord

........
r6572 | daniel | 2007-02-20 09:33:30 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/ncgld.pas
M /branches/fpc_2_3/compiler/ncgrtti.pas
M /branches/fpc_2_3/compiler/ninl.pas
M /branches/fpc_2_3/compiler/nld.pas

* o2s -> ord2str, s2o -> str2ord

........
r6574 | daniel | 2007-02-20 12:07:58 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/rtl/inc/compproc.inc

* o2s -> ord2str, s2o -> str2ord

........
r6578 | daniel | 2007-02-20 22:18:49 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/rtl/inc/text.inc

* Change longint to valsint.

........
r6579 | daniel | 2007-02-20 22:29:09 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/ninl.pas

* Handle ordinal currency types.

........
r6580 | jonas | 2007-02-20 22:29:11 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/ncgrtti.pas

* fixed compilation for cpurequiresproperalignment

........
r6581 | jonas | 2007-02-20 22:30:21 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/ninl.pas

* fixed typo

........
r6582 | daniel | 2007-02-20 22:36:19 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/ninl.pas

* Set is_real to true.

........
r6590 | jonas | 2007-02-21 20:23:54 +0100 (Wed, 21 Feb 2007) | 2 lines
Changed paths:
M /branches/fpc_2_3/compiler/systems/i_bsd.pas

* set tf_dwarf_only_local_labels for darwin/ppc64

git-svn-id: trunk@6720 -

Jonas Maebe 18 tahun lalu
induk
melakukan
c13ff3729b
100 mengubah file dengan 3375 tambahan dan 1781 penghapusan
  1. 11 3
      .gitattributes
  2. 14 2
      Makefile
  3. 27 3
      compiler/Makefile
  4. 1 1
      compiler/aasmdata.pas
  5. 14 10
      compiler/aggas.pas
  6. 7 1
      compiler/cgobj.pas
  7. 1 1
      compiler/cgutils.pas
  8. 7 2
      compiler/cresstr.pas
  9. 1 1
      compiler/dbgdwarf.pas
  10. 1 1
      compiler/dbgstabs.pas
  11. 2 2
      compiler/globtype.pas
  12. 35 2
      compiler/htypechk.pas
  13. 20 0
      compiler/ncal.pas
  14. 24 9
      compiler/ncginl.pas
  15. 147 22
      compiler/ncgld.pas
  16. 245 2
      compiler/ncgrtti.pas
  17. 2 2
      compiler/ncgutil.pas
  18. 3 3
      compiler/ncnv.pas
  19. 40 25
      compiler/nflw.pas
  20. 539 440
      compiler/ninl.pas
  21. 7 3
      compiler/nld.pas
  22. 0 1
      compiler/nopt.pas
  23. 15 5
      compiler/nutils.pas
  24. 1 1
      compiler/ogelf.pas
  25. 166 2
      compiler/optcse.pas
  26. 11 11
      compiler/pdecvar.pas
  27. 4 4
      compiler/pinline.pas
  28. 2 2
      compiler/pmodules.pas
  29. 0 256
      compiler/powerpc/cgcpu.pas
  30. 0 346
      compiler/powerpc64/agppcgas.pas
  31. 93 123
      compiler/powerpc64/cgcpu.pas
  32. 1 1
      compiler/powerpc64/cpunode.pas
  33. 3 1
      compiler/powerpc64/cpupara.pas
  34. 8 1
      compiler/powerpc64/cputarg.pas
  35. 1 1
      compiler/powerpc64/itcpugas.pas
  36. 0 79
      compiler/powerpc64/nppcinl.pas
  37. 12 0
      compiler/powerpc64/rappcgas.pas
  38. 136 92
      compiler/ppcgen/agppcgas.pas
  39. 283 1
      compiler/ppcgen/cgppc.pas
  40. 48 11
      compiler/ppcgen/ngppcinl.pas
  41. 1 1
      compiler/ppcgen/ngppcset.pas
  42. 5 1
      compiler/psub.pas
  43. 3 1
      compiler/symconst.pas
  44. 1 1
      compiler/symdef.pas
  45. 22 2
      compiler/systems.pas
  46. 70 2
      compiler/systems/i_bsd.pas
  47. 1 1
      compiler/systems/i_linux.pas
  48. 20 9
      compiler/systems/t_bsd.pas
  49. 23 1
      compiler/tgobj.pas
  50. 18 3
      compiler/utils/Makefile
  51. 1 1
      compiler/version.pas
  52. 21 3
      fv/Makefile
  53. 10 3
      fv/test/Makefile
  54. 21 3
      ide/Makefile
  55. 18 3
      ide/compiler/Makefile
  56. 9 3
      ide/fakegdb/Makefile
  57. 14 3
      installer/Makefile
  58. 191 4
      packages/Makefile
  59. 135 4
      packages/base/Makefile
  60. 15 3
      packages/base/dbus/Makefile
  61. 10 3
      packages/base/dbus/example/Makefile
  62. 10 4
      packages/base/fpmake/Makefile
  63. 18 3
      packages/base/gdbint/Makefile
  64. 18 3
      packages/base/graph/Makefile
  65. 12 3
      packages/base/hash/Makefile
  66. 17 3
      packages/base/httpd/Makefile
  67. 13 3
      packages/base/httpd/examples/Makefile
  68. 9 3
      packages/base/httpd/httpd-1.3/Makefile
  69. 9 3
      packages/base/httpd/httpd-2.0/Makefile
  70. 9 3
      packages/base/httpd/httpd-2.2/Makefile
  71. 12 3
      packages/base/ibase/Makefile
  72. 15 3
      packages/base/imagemagick/Makefile
  73. 12 3
      packages/base/libasync/Makefile
  74. 9 3
      packages/base/libc/Makefile
  75. 12 3
      packages/base/mysql/Makefile
  76. 12 3
      packages/base/netdb/Makefile
  77. 12 3
      packages/base/odbc/Makefile
  78. 15 3
      packages/base/oracle/Makefile
  79. 266 138
      packages/base/oracle/example/Makefile
  80. 15 3
      packages/base/pasjpeg/Makefile
  81. 13 3
      packages/base/paszlib/Makefile
  82. 12 3
      packages/base/postgres/Makefile
  83. 9 3
      packages/base/pthreads/Makefile
  84. 15 3
      packages/base/regexpr/Makefile
  85. 81 4
      packages/base/sqlite/Makefile
  86. 5 2
      packages/base/winunits/Makefile
  87. 34 7
      packages/extra/Makefile
  88. 3 1
      packages/extra/Makefile.fpc
  89. 9 3
      packages/extra/a52/Makefile
  90. 16 3
      packages/extra/amunits/Makefile
  91. 18 3
      packages/extra/amunits/units/Makefile
  92. 18 3
      packages/extra/amunits/utilunits/Makefile
  93. 9 3
      packages/extra/bfd/Makefile
  94. 17 2
      packages/extra/cairo/Makefile
  95. 12 3
      packages/extra/cdrom/Makefile
  96. 9 3
      packages/extra/dts/Makefile
  97. 9 3
      packages/extra/fftw/Makefile
  98. 19 3
      packages/extra/forms/Makefile
  99. 11 3
      packages/extra/forms/demo/Makefile
  100. 20 2
      packages/extra/fpgtk/Makefile

+ 11 - 3
.gitattributes

@@ -297,7 +297,6 @@ compiler/pexports.pas svneol=native#text/plain
 compiler/pexpr.pas svneol=native#text/plain
 compiler/pinline.pas svneol=native#text/plain
 compiler/pmodules.pas svneol=native#text/plain
-compiler/powerpc/agppcgas.pas svneol=native#text/plain
 compiler/powerpc/agppcmpw.pas svneol=native#text/plain
 compiler/powerpc/aoptcpu.pas svneol=native#text/plain
 compiler/powerpc/aoptcpub.pas svneol=native#text/plain
@@ -332,7 +331,6 @@ compiler/powerpc/rppcsri.inc svneol=native#text/plain
 compiler/powerpc/rppcstab.inc svneol=native#text/plain
 compiler/powerpc/rppcstd.inc svneol=native#text/plain
 compiler/powerpc/rppcsup.inc svneol=native#text/plain
-compiler/powerpc64/agppcgas.pas svneol=native#text/plain
 compiler/powerpc64/aoptcpu.pas svneol=native#text/plain
 compiler/powerpc64/aoptcpub.pas svneol=native#text/plain
 compiler/powerpc64/aoptcpuc.pas svneol=native#text/plain
@@ -348,7 +346,6 @@ compiler/powerpc64/itcpugas.pas svneol=native#text/plain
 compiler/powerpc64/nppcadd.pas svneol=native#text/plain
 compiler/powerpc64/nppccal.pas svneol=native#text/plain
 compiler/powerpc64/nppccnv.pas svneol=native#text/plain
-compiler/powerpc64/nppcinl.pas -text
 compiler/powerpc64/nppcld.pas svneol=native#text/plain
 compiler/powerpc64/nppcmat.pas svneol=native#text/plain
 compiler/powerpc64/ppcins.dat -text
@@ -378,6 +375,7 @@ compiler/ppc.dof -text
 compiler/ppc68k.lpi svneol=native#text/plain
 compiler/ppcarm.lpi svneol=native#text/plain
 compiler/ppcgen/aasmcpu.pas svneol=native#text/plain
+compiler/ppcgen/agppcgas.pas svneol=native#text/plain
 compiler/ppcgen/cgppc.pas svneol=native#text/plain
 compiler/ppcgen/ngppcadd.pas svneol=native#text/plain
 compiler/ppcgen/ngppccnv.pas svneol=native#text/plain
@@ -4364,6 +4362,10 @@ rtl/darwin/i386/sighnd.inc -text
 rtl/darwin/pmutext.inc svneol=native#text/plain
 rtl/darwin/powerpc/sig_cpu.inc svneol=native#text/plain
 rtl/darwin/powerpc/sighnd.inc svneol=native#text/plain
+rtl/darwin/powerpc64/sig_cpu.inc svneol=native#text/plain
+rtl/darwin/powerpc64/sighnd.inc svneol=native#text/plain
+rtl/darwin/ppcgen/ppchnd.inc svneol=native#text/plain
+rtl/darwin/ppcgen/sig_ppc.inc svneol=native#text/plain
 rtl/darwin/pthread.inc svneol=native#text/plain
 rtl/darwin/ptypes.inc svneol=native#text/plain
 rtl/darwin/signal.inc svneol=native#text/plain
@@ -6268,6 +6270,10 @@ tests/test/cg/obj/darwin/powerpc/ctest.o -text
 tests/test/cg/obj/darwin/powerpc/tcext3.o -text
 tests/test/cg/obj/darwin/powerpc/tcext4.o -text
 tests/test/cg/obj/darwin/powerpc/tcext5.o -text
+tests/test/cg/obj/darwin/powerpc64/ctest.o -text
+tests/test/cg/obj/darwin/powerpc64/tcext3.o -text
+tests/test/cg/obj/darwin/powerpc64/tcext4.o -text
+tests/test/cg/obj/darwin/powerpc64/tcext5.o -text
 tests/test/cg/obj/freebsd/i386/ctest.o -text
 tests/test/cg/obj/freebsd/i386/tcext3.o -text
 tests/test/cg/obj/freebsd/i386/tcext4.o -text
@@ -8050,6 +8056,8 @@ tests/webtbs/tw8232.pp svneol=native#text/plain
 tests/webtbs/tw8258.pp svneol=native#text/plain
 tests/webtbs/tw8258a.pp svneol=native#text/plain
 tests/webtbs/tw8264.pp svneol=native#text/plain
+tests/webtbs/tw8282.pp svneol=native#text/plain
+tests/webtbs/tw8283.pp svneol=native#text/plain
 tests/webtbs/tw8304.pp svneol=native#text/plain
 tests/webtbs/tw8312.pp svneol=native#text/plain
 tests/webtbs/tw8321.pp svneol=native#text/plain

+ 14 - 2
Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/02/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 default: help
-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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -492,6 +492,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=compiler rtl utils fv packages ide installer
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=compiler rtl utils fv packages ide installer
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_DIRS+=compiler rtl utils fv packages ide installer
 endif
@@ -2171,6 +2174,15 @@ TARGET_DIRS_PACKAGES=1
 TARGET_DIRS_IDE=1
 TARGET_DIRS_INSTALLER=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_COMPILER=1
+TARGET_DIRS_RTL=1
+TARGET_DIRS_UTILS=1
+TARGET_DIRS_FV=1
+TARGET_DIRS_PACKAGES=1
+TARGET_DIRS_IDE=1
+TARGET_DIRS_INSTALLER=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_DIRS_COMPILER=1
 TARGET_DIRS_RTL=1

+ 27 - 3
compiler/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/02/10]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=compiler
 override PACKAGE_VERSION=2.0.0
 unexport FPC_VERSION FPC_COMPILERINFO
@@ -502,6 +502,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=utils
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=utils
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_DIRS+=utils
 endif
@@ -655,6 +658,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=pp
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=pp
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=pp
 endif
@@ -809,6 +815,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=$(PPC_TARGET)
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=$(PPC_TARGET)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=$(PPC_TARGET)
 endif
@@ -962,6 +971,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 endif
@@ -1115,6 +1127,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_TARGETDIR+=.
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_TARGETDIR+=.
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_TARGETDIR+=.
 endif
@@ -1268,6 +1283,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 endif
@@ -2169,6 +2187,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -2916,6 +2937,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_DIRS_UTILS=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_UTILS=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_DIRS_UTILS=1
 endif

+ 1 - 1
compiler/aasmdata.pas

@@ -282,7 +282,7 @@ implementation
         for hal:=low(TAsmListType) to high(TAsmListType) do
           AsmLists[hal]:=TAsmList.create;
         { PIC data }
-        if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+        if (target_info.system in systems_darwin) then
           AsmLists[al_picdata].concat(tai_directive.create(asd_non_lazy_symbol_pointer,''));
         { CFI }
         FAsmCFI:=CAsmCFI.Create;

+ 14 - 10
compiler/aggas.pas

@@ -284,7 +284,7 @@ implementation
         secname : string;
       begin
         if (cs_create_pic in current_settings.moduleswitches) and
-           not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+           not(target_info.system in systems_darwin) then
           secname:=secnames_pic[atype]
         else
           secname:=secnames[atype];
@@ -306,7 +306,7 @@ implementation
         { For bss we need to set some flags that are target dependent,
           it is easier to disable it for smartlinking. It doesn't take up
           filespace }
-        if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) and
+        if not(target_info.system in systems_darwin) and
            use_smartlink_section and
            (aname<>'') and
            (atype <> sec_toc) and
@@ -338,7 +338,9 @@ implementation
          system_m68k_amiga,  { amiga has old GNU AS (2.14), which blews up from .section (KB) }
          system_m68k_linux: ;
          system_powerpc_darwin,
-         system_i386_darwin:
+         system_i386_darwin,
+         system_powerpc64_darwin,
+         system_x86_64_darwin:
            begin
              if (atype = sec_stub) then
                AsmWrite('.section ');
@@ -358,10 +360,12 @@ implementation
                 { there are processor-independent shortcuts available    }
                 { for this, namely .symbol_stub and .picsymbol_stub, but }
                 { they don't work and gcc doesn't use them either...     }
-                system_powerpc_darwin:
+                system_powerpc_darwin,
+                system_powerpc64_darwin:
                   AsmWriteln('__TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16');
                 system_i386_darwin:
                   AsmWriteln('__IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5');
+                { darwin/x86-64 uses RIP-based GOT addressing }
                 else
                   internalerror(2006031101);
               end;
@@ -547,7 +551,7 @@ implementation
              begin
                if tai_align_abstract(hp).aligntype>1 then
                  begin
-                   if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+                   if not(target_info.system in systems_darwin) then
                      begin
                        AsmWrite(#9'.balign '+tostr(tai_align_abstract(hp).aligntype));
                        if tai_align_abstract(hp).use_op then
@@ -585,7 +589,7 @@ implementation
 
            ait_datablock :
              begin
-               if target_info.system in [system_powerpc_darwin,system_i386_darwin] then
+               if (target_info.system in systems_darwin) then
                  begin
                    {On Mac OS X you can't have common symbols in a shared
                     library, since those are in the TEXT section and the text section is
@@ -678,7 +682,7 @@ implementation
                  aitconst_rva_symbol,
                  aitconst_indirect_symbol :
                    begin
-                     if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) and
+                     if (target_info.system in systems_darwin) and
                         (tai_const(hp).consttype in [aitconst_uleb128bit,aitconst_sleb128bit]) then
                        begin
                          AsmWrite(ait_const2str[aitconst_8bit]);
@@ -699,7 +703,7 @@ implementation
                              begin
                                if assigned(tai_const(hp).endsym) then
                                  begin
-                                   if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+                                   if (target_info.system in systems_darwin) then
                                      begin
                                        s := NextSetLabel;
                                        t := #9'.set '+s+','+tai_const(hp).endsym.name+'-'+tai_const(hp).sym.name;
@@ -1076,7 +1080,7 @@ implementation
       Result doesn't work properly yet due to a bug in Apple's linker
 
       if (cs_create_smart in current_settings.moduleswitches) and
-         (target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+         (target_info.system in systems_darwin) then
         AsmWriteLn(#9'.subsections_via_symbols');
 }
 
@@ -1094,7 +1098,7 @@ implementation
 
     function TAppleGNUAssembler.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
       begin
-        if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+        if (target_info.system in systems_darwin) then
           case atype of
             sec_bss:
               { all bss (lcomm) symbols are automatically put in the right }

+ 7 - 1
compiler/cgobj.pas

@@ -3243,7 +3243,9 @@ implementation
         result := NR_NO;
         case target_info.system of
           system_powerpc_darwin,
-          system_i386_darwin:
+          system_i386_darwin,
+          system_powerpc64_darwin,
+          system_x86_64_darwin:
             begin
               l:=current_asmdata.getasmsymbol('L'+symname+'$non_lazy_ptr');
               if not(assigned(l)) then
@@ -3251,7 +3253,11 @@ implementation
                   l:=current_asmdata.DefineAsmSymbol('L'+symname+'$non_lazy_ptr',AB_COMMON,AT_DATA);
                   current_asmdata.asmlists[al_picdata].concat(tai_symbol.create(l,0));
                   current_asmdata.asmlists[al_picdata].concat(tai_const.create_indirect_sym(current_asmdata.RefAsmSymbol(symname)));
+{$ifdef cpu64bit}
+                  current_asmdata.asmlists[al_picdata].concat(tai_const.create_64bit(0));
+{$else cpu64bit}
                   current_asmdata.asmlists[al_picdata].concat(tai_const.create_32bit(0));
+{$endif cpu64bit}
                 end;
               result := cg.getaddressregister(list);
               reference_reset_symbol(ref,l,0);

+ 1 - 1
compiler/cgutils.pas

@@ -214,7 +214,7 @@ uses
     function use_fixed_stack: boolean;
       begin
 {$ifdef i386}
-        result := (target_info.system = system_i386_darwin);
+        result := (target_info.system in [system_i386_darwin,system_x86_64_darwin]);
 {$else i386}
 {$ifdef cputargethasfixedstack}
         result := true;

+ 7 - 2
compiler/cresstr.pas

@@ -133,7 +133,7 @@ uses
           s : pchar;
           referencelab: TAsmLabel;
         begin
-          if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+          if (target_info.system in systems_darwin) then
             begin
               current_asmdata.getdatalabel(referencelab);
               current_asmdata.asmlists[al_const].concat(tai_label.create(referencelab));
@@ -143,7 +143,7 @@ uses
           current_asmdata.asmlists[al_const].concat(tai_const.create_aint(-1));
           current_asmdata.asmlists[al_const].concat(tai_const.create_aint(len));
           current_asmdata.asmlists[al_const].concat(tai_label.create(result));
-          if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+          if (target_info.system in systems_darwin) then
              current_asmdata.asmlists[al_const].concat(tai_directive.create(asd_reference,referencelab.name));
           getmem(s,len+1);
           move(p^,s^,len);
@@ -215,6 +215,11 @@ uses
         new_section(current_asmdata.asmlists[al_resourcestrings],sec_data,make_mangledname('RESSTR',current_module.localsymtable,'3_END'),sizeof(aint));
         current_asmdata.AsmLists[al_resourcestrings].concat(tai_symbol.createname_global(
           make_mangledname('RESSTR',current_module.localsymtable,'END'),AT_DATA,0));
+        { the darwin/ppc64 assembler or linker seems to have trouble       }
+        { if a section ends with a global label without any data after it. }
+        { So for safety, just put a dummy value here.                      }
+        if (target_info.system = system_powerpc64_darwin) then   
+          current_asmdata.asmlists[al_resourcestrings].concat(Tai_const.create_8bit(0));
       end;
 
 

+ 1 - 1
compiler/dbgdwarf.pas

@@ -2510,7 +2510,7 @@ implementation
                     if (prevlabel = nil) or
                        { darwin's assembler cannot create an uleb128 of the difference }
                        { between to symbols                                            }
-                       (target_info.system in [system_powerpc_darwin,system_powerpc64_darwin,system_i386_darwin]) then
+                       (target_info.system in systems_darwin) then
                       begin
                         asmline.concat(tai_const.create_8bit(DW_LNS_extended_op));
 {$ifdef cpu64bit}

+ 1 - 1
compiler/dbgstabs.pas

@@ -1573,7 +1573,7 @@ implementation
           exit;
         list.concat(Tai_section.create(sec_fpc,'links',0));
         { make sure the debuginfo doesn't get stripped out }
-        if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+        if (target_info.system in systems_darwin) then
           begin
             dbgtable:=tai_symbol.createname('DEBUGINFOTABLE',AT_DATA,0);
             list.concat(tai_directive.create(asd_no_dead_strip,dbgtable.sym.name));

+ 2 - 2
compiler/globtype.pas

@@ -153,7 +153,7 @@ interface
        toptimizerswitch = (cs_opt_none,
          cs_opt_level1,cs_opt_level2,cs_opt_level3,
          cs_opt_regvar,cs_opt_uncertain,cs_opt_size,cs_opt_stackframe,
-         cs_opt_peephole,cs_opt_asmcse,cs_opt_loopunroll,cs_opt_tailrecursion
+         cs_opt_peephole,cs_opt_asmcse,cs_opt_loopunroll,cs_opt_tailrecursion,cs_opt_nodecse
        );
        toptimizerswitches = set of toptimizerswitch;
 
@@ -161,7 +161,7 @@ interface
        OptimizerSwitchStr : array[toptimizerswitch] of string[10] = ('',
          'LEVEL1','LEVEL2','LEVEL3',
          'REGVAR','UNCERTAIN','SIZE','STACKFRAME',
-         'PEEPHOLE','ASMCSE','LOOPUNROLL','TAILREC'
+         'PEEPHOLE','ASMCSE','LOOPUNROLL','TAILREC','CSE'
        );
 
        { switches being applied to all CPUs at the given level }

+ 35 - 2
compiler/htypechk.pas

@@ -157,11 +157,12 @@ interface
 implementation
 
     uses
+       sysutils,
        globtype,systems,
        cutils,cclasses,verbose,
        symtable,
        defutil,defcmp,
-       nbas,ncnv,nld,nmem,ncal,nmat,ninl,nutils,
+       nbas,ncnv,nld,nmem,ncal,nmat,ninl,nutils,ncon,
        cgbase,procinfo
        ;
 
@@ -358,9 +359,41 @@ implementation
         eq : tequaltype;
         conv : tconverttype;
         pd : tprocdef;
+        oldcount,
+        count: longint;
+        parasym : tparavarsym;
       begin
         result:=false;
-        case pf.parast.SymList.count of
+        count := pf.parast.SymList.count;
+
+        oldcount:=count;
+        while count > 0 do
+          begin
+            parasym:=tparavarsym(pf.parast.SymList[count-1]);
+            if is_boolean(parasym.vardef) then
+              begin
+                if parasym.name='RANGECHECK' then
+                  begin
+                    Include(parasym.varoptions, vo_is_hidden_para);
+                    Include(parasym.varoptions, vo_is_range_check);
+                    Dec(count);
+                  end
+                else if parasym.name='OVERFLOWCHECK' then
+                  begin
+                    Include(parasym.varoptions, vo_is_hidden_para);
+                    Include(parasym.varoptions, vo_is_overflow_check);
+                    Dec(count);
+                  end
+                else
+                  break;
+              end
+            else
+              break;
+          end;
+        if count<>oldcount then
+          pf.calcparas;
+
+        case count of
           1 : begin
                 ld:=tparavarsym(pf.parast.SymList[0]).vardef;
                 { assignment is a special case }

+ 20 - 0
compiler/ncal.pas

@@ -159,6 +159,7 @@ interface
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           function dogetcopy : tnode;override;
           procedure insertintolist(l : tnodelist);override;
+          function  pass_1 : tnode;override;
           procedure get_paratype;
           procedure insert_typeconv(do_count : boolean);
           procedure det_registers;
@@ -743,9 +744,18 @@ implementation
          result:=n;
       end;
 
+
     procedure tcallparanode.insertintolist(l : tnodelist);
+      begin
+      end;
+
 
+    function tcallparanode.pass_1 : tnode;
       begin
+        firstpass(left);
+        if assigned(right) then
+          firstpass(right);
+        result:=nil;
       end;
 
 
@@ -1749,6 +1759,16 @@ implementation
                    if not(assigned(procdefinition.owner.defowner)) then
                      internalerror(200309287);
                    hiddentree:=cloadparentfpnode.create(tprocdef(procdefinition.owner.defowner));
+                 end
+              else
+               if vo_is_range_check in currpara.varoptions then
+                 begin
+                   hiddentree:=cordconstnode.create(Ord(cs_check_range in current_settings.localswitches),booltype,false);
+                 end
+              else
+               if vo_is_overflow_check in currpara.varoptions then
+                 begin
+                   hiddentree:=cordconstnode.create(Ord(cs_check_overflow in current_settings.localswitches),booltype,false);
                  end;
               { add the hidden parameter }
               if not assigned(hiddentree) then

+ 24 - 9
compiler/ncginl.pas

@@ -715,22 +715,37 @@ implementation
     procedure Tcginlinenode.second_get_caller_frame;
 
     var frame_ref:Treference;
+        frame_reg:Tregister;
+        use_frame_pointer:boolean;
 
     begin
-      if current_procinfo.framepointer=NR_STACK_POINTER_REG then
+      if left<>nil then
+        begin
+          secondpass(left);
+          if left.location.loc=LOC_CONSTANT then
+            use_frame_pointer:=true
+          else
+            begin
+              location_force_reg(current_asmdata.currasmlist,left.location,OS_ADDR,false);
+              frame_reg:=left.location.register;
+              use_frame_pointer:=false;
+            end
+        end
+      else
+        begin
+          use_frame_pointer:=current_procinfo.framepointer=NR_STACK_POINTER_REG;
+          frame_reg:=current_procinfo.framepointer;
+        end;
+
+      if use_frame_pointer then
         begin
           location_reset(location,LOC_CREGISTER,OS_ADDR);
           location.register:=NR_FRAME_POINTER_REG;
-{          location_reset(location,LOC_REGISTER,OS_ADDR);
-          location.register:=cg.getaddressregister(current_asmdata.currasmlist);
-          cg.a_load_reg_reg(current_asmdata.currasmlist,OS_ADDR,OS_ADDR,NR_FRAME_POINTER_REG,location.register);}
         end
       else
         begin
-          location_reset(location,LOC_REGISTER,OS_ADDR);
-          location.register:=cg.getaddressregister(current_asmdata.currasmlist);
-          reference_reset_base(frame_ref,current_procinfo.framepointer,0);
-          cg.a_load_ref_reg(current_asmdata.currasmlist,OS_ADDR,OS_ADDR,frame_ref,location.register);
+          location_reset(location,LOC_REFERENCE,OS_ADDR);
+          location.reference.base:=frame_reg;
         end;
     end;
 
@@ -743,7 +758,7 @@ implementation
         begin
           location_reset(location,LOC_REGISTER,OS_ADDR);
           location.register:=cg.getaddressregister(current_asmdata.currasmlist);
-          reference_reset_base(frame_ref,NR_STACK_POINTER_REG,0);
+          reference_reset_base(frame_ref,NR_STACK_POINTER_REG,{current_procinfo.calc_stackframe_size}tg.lasttemp);
           cg.a_load_ref_reg(current_asmdata.currasmlist,OS_ADDR,OS_ADDR,frame_ref,location.register);
         end
       else

+ 147 - 22
compiler/ncgld.pas

@@ -27,12 +27,13 @@ unit ncgld;
 interface
 
     uses
-      node,nld;
+      node,nld,cgutils;
 
     type
        tcgloadnode = class(tloadnode)
           procedure pass_generate_code;override;
           procedure generate_picvaraccess;virtual;
+          procedure changereflocation(const ref: treference);
        end;
 
        tcgassignmentnode = class(tassignmentnode)
@@ -54,6 +55,7 @@ implementation
       cutils,
       systems,
       verbose,globtype,globals,
+      nutils,
       symconst,symtype,symdef,symsym,defutil,paramgr,
       ncnv,ncon,nmem,nbas,ncgrtti,
       aasmbase,aasmtai,aasmdata,aasmcpu,
@@ -61,9 +63,119 @@ implementation
       procinfo,
       cpubase,parabase,
       tgobj,ncgutil,
-      cgutils,cgobj,
+      cgobj,
       ncgbas,ncgflw;
 
+{*****************************************************************************
+                   SSA (for memory temps) support
+*****************************************************************************}
+
+    type
+      preplacerefrec = ^treplacerefrec;
+      treplacerefrec = record
+        old, new: preference;
+        ressym: tsym;
+      end;
+
+    function doreplaceref(var n: tnode; para: pointer): foreachnoderesult;
+      var
+        rr: preplacerefrec absolute para;
+      begin
+        result := fen_false;
+        case n.nodetype of
+          loadn:
+            begin
+                 { regular variable }
+              if (tabstractvarsym(tloadnode(n).symtableentry).varoptions * [vo_is_dll_var, vo_is_thread_var] = []) and
+                 not assigned(tloadnode(n).left) and
+                 { not function result, or no exit in function }
+                 (((tloadnode(n).symtableentry <> rr^.ressym) and
+                   not(vo_is_funcret in tabstractvarsym(tloadnode(n).symtableentry).varoptions)) or
+                  not(fc_exit in flowcontrol)) and
+                 { stored in memory... }
+                 (tabstractnormalvarsym(tloadnode(n).symtableentry).localloc.loc in [LOC_REFERENCE]) and
+                 { ... at the place we are looking for }
+                 references_equal(tabstractnormalvarsym(tloadnode(n).symtableentry).localloc.reference,rr^.old^) then
+                begin
+                  { relocate variable }
+                  tcgloadnode(n).changereflocation(rr^.new^);
+                  result := fen_norecurse_true;
+                end;
+            end;
+          temprefn:
+            begin
+              if (ttemprefnode(n).tempinfo^.valid) and
+                 { memory temp... }
+                 (ttemprefnode(n).tempinfo^.location.loc in [LOC_REFERENCE]) and
+                 { ... at the place we are looking for }
+                 references_equal(ttemprefnode(n).tempinfo^.location.reference,rr^.old^) then
+                begin
+                  { relocate the temp }
+                  tcgtemprefnode(n).changelocation(rr^.new^);
+                  result := fen_norecurse_true;
+                end;
+            end;
+          { optimize the searching a bit }
+          derefn,addrn,
+          calln,inlinen,casen,
+          addn,subn,muln,
+          andn,orn,xorn,
+          ltn,lten,gtn,gten,equaln,unequaln,
+          slashn,divn,shrn,shln,notn,
+          inn,
+          asn,isn:
+            result := fen_norecurse_false;
+        end;
+      end;
+
+
+    function maybechangetemp(list: TAsmList; var n: tnode; const newref: treference): boolean;
+      var
+        rr: treplacerefrec;
+      begin
+        result := false;
+
+           { only do for -O2 or higher (breaks debugging since }
+           { variables move to different memory locations)     }
+        if not(cs_opt_level2 in current_settings.optimizerswitches) or
+           { must be a copy to a memory location ... }
+           (n.location.loc <> LOC_REFERENCE) or
+           { not inside a control flow statement and no goto's in sight }
+           ([fc_inflowcontrol,fc_gotolabel] * flowcontrol <> []) or
+           { source and destination are temps (= not global variables) }
+           not tg.istemp(n.location.reference) or
+           not tg.istemp(newref) or
+           { and both point to the start of a temp, and the source is a }
+           { non-persistent temp (otherwise we need some kind of copy-  }
+           { on-write support in case later on both are still used)     }
+           (tg.gettypeoftemp(newref) <> tt_normal) or
+           not (tg.gettypeoftemp(n.location.reference) in [tt_normal,tt_persistent]) or
+           { and both have the same size }
+           (tg.sizeoftemp(current_asmdata.CurrAsmList,newref) <> tg.sizeoftemp(current_asmdata.CurrAsmList,n.location.reference)) then
+          exit;
+
+        { find the source of the old reference (loadnode or tempnode) }
+        { and replace it with the new reference                       }
+        rr.old := @n.location.reference;
+        rr.new := @newref;
+        rr.ressym := nil;
+
+        if (current_procinfo.procdef.funcretloc[calleeside].loc<>LOC_VOID) and
+           assigned(current_procinfo.procdef.funcretsym) and
+           (tabstractvarsym(current_procinfo.procdef.funcretsym).refs <> 0) then
+          if (current_procinfo.procdef.proctypeoption=potype_constructor) then
+            rr.ressym:=tsym(current_procinfo.procdef.parast.Find('self'))
+         else
+            rr.ressym:=current_procinfo.procdef.funcretsym;
+
+        { if source not found, don't do anything }
+        if not foreachnodestatic(n,@doreplaceref,@rr) then
+          exit;
+
+        n.location.reference := newref;
+        result:=true;
+      end;
+
 {*****************************************************************************
                              SecondLoad
 *****************************************************************************}
@@ -77,6 +189,24 @@ implementation
       end;
 
 
+    procedure tcgloadnode.changereflocation(const ref: treference);
+      var
+        oldtemptype: ttemptype;
+      begin
+        if (location.loc<>LOC_REFERENCE) then
+          internalerror(2007020812);
+        if not tg.istemp(location.reference) then
+          internalerror(2007020813);
+        oldtemptype:=tg.gettypeoftemp(location.reference);
+        if (oldtemptype = tt_persistent) then
+          tg.ChangeTempType(current_asmdata.CurrAsmList,location.reference,tt_normal);
+        tg.ungettemp(current_asmdata.CurrAsmList,location.reference);
+        location.reference:=ref;
+        tg.ChangeTempType(current_asmdata.CurrAsmList,location.reference,oldtemptype);
+        tabstractnormalvarsym(symtableentry).localloc:=location;
+      end;
+
+
     procedure tcgloadnode.pass_generate_code;
       var
         hregister : tregister;
@@ -451,26 +581,7 @@ implementation
 
         releaseright:=true;
 
-        { optimize temp to temp copies }
-{$ifdef old_append_str}
-        if (left.nodetype = temprefn) and
-           { we may store certain temps in registers in the future, then this }
-           { optimization will have to be adapted                             }
-           (left.location.loc = LOC_REFERENCE) and
-           (right.location.loc = LOC_REFERENCE) and
-           tg.istemp(right.location.reference) and
-           (tg.sizeoftemp(current_asmdata.CurrAsmList,right.location.reference) = tg.sizeoftemp(current_asmdata.CurrAsmList,left.location.reference)) then
-          begin
-            { in theory, we should also make sure the left temp type is   }
-            { already more or less of the same kind (ie. we must not      }
-            { assign an ansistring to a normaltemp). In practice, the     }
-            { assignment node will have already taken care of this for us }
-            tcgtemprefnode(left).changelocation(right.location.reference);
-          end
         { shortstring assignments are handled separately }
-        else
-{$endif old_append_str}
-
         if is_shortstring(left.resultdef) then
           begin
             {
@@ -526,6 +637,13 @@ implementation
             else
               internalerror(200204249);
           end
+       { try to reuse memory locations instead of copying }
+           { copy to a memory location ... }
+        else if (right.location.loc = LOC_REFERENCE) and
+           maybechangetemp(current_asmdata.CurrAsmList,left,right.location.reference) then
+          begin
+            { if it worked, we're done }
+          end
         else
           begin
             { SSA support }
@@ -941,7 +1059,14 @@ implementation
     procedure tcgrttinode.pass_generate_code;
       begin
         location_reset(location,LOC_CREFERENCE,OS_NO);
-        location.reference.symbol:=RTTIWriter.get_rtti_label(rttidef,rttitype);
+        case rttidatatype of
+          rdt_normal:
+            location.reference.symbol:=RTTIWriter.get_rtti_label(rttidef,rttitype);
+          rdt_ord2str:
+            location.reference.symbol:=RTTIWriter.get_rtti_label_ord2str(rttidef,rttitype);
+          rdt_str2ord:
+            location.reference.symbol:=RTTIWriter.get_rtti_label_str2ord(rttidef,rttitype);
+        end;
       end;
 
 

+ 245 - 2
compiler/ncgrtti.pas

@@ -39,6 +39,7 @@ interface
         function  fields_count(st:tsymtable;rt:trttitype):longint;
         procedure fields_write_rtti(st:tsymtable;rt:trttitype);
         procedure fields_write_rtti_data(st:tsymtable;rt:trttitype);
+        procedure write_rtti_extrasyms(def:Tdef;rt:Trttitype;mainrtti:Tasmsymbol);
         procedure published_write_rtti(st:tsymtable;rt:trttitype);
         function  published_properties_count(st:tsymtable):longint;
         procedure published_properties_write_rtti_data(propnamelist:TFPHashObjectList;st:tsymtable);
@@ -50,6 +51,8 @@ interface
       public
         procedure write_rtti(def:tdef;rt:trttitype);
         function  get_rtti_label(def:tdef;rt:trttitype):tasmsymbol;
+        function  get_rtti_label_ord2str(def:tdef;rt:trttitype):tasmsymbol;
+        function  get_rtti_label_str2ord(def:tdef;rt:trttitype):tasmsymbol;
       end;
 
     var
@@ -389,7 +392,7 @@ implementation
           current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(tkEnumeration));
           write_rtti_name(def);
 {$ifdef cpurequiresproperalignment}
-          current_asmdata.asmlists[al_rtti].concat(cai_align.Create(sizeof(TConstPtrUInt)));
+          current_asmdata.asmlists[al_rtti].concat(Cai_align.Create(sizeof(TConstPtrUInt)));
 {$endif cpurequiresproperalignment}
           case longint(def.size) of
             1 :
@@ -400,7 +403,7 @@ implementation
               current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(otULong));
           end;
 {$ifdef cpurequiresproperalignment}
-          current_asmdata.asmlists[al_rtti].concat(cai_align.Create(sizeof(TConstPtrUInt)));
+          current_asmdata.asmlists[al_rtti].concat(Cai_align.Create(sizeof(TConstPtrUInt)));
 {$endif cpurequiresproperalignment}
           current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_32bit(def.min));
           current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_32bit(def.max));
@@ -821,6 +824,235 @@ implementation
         end;
       end;
 
+    procedure TRTTIWriter.write_rtti_extrasyms(def:Tdef;rt:Trttitype;mainrtti:Tasmsymbol);
+
+        procedure enumdef_rtti_ord2stringindex(def:Tenumdef);
+
+        var rttilab:Tasmsymbol;
+            t:Tenumsym;
+            syms:^Tenumsym;
+            offsets:^longint;
+            sym_count,sym_alloc:longint;
+            h,i,p,o,st:longint;
+            mode:(lookup,search); {Modify with care, ordinal value of enum is written.}
+            r:single;             {Must be real type because of integer overflow risk.}
+
+        begin
+          {Random access needed, put in array.}
+          getmem(syms,64*sizeof(Tenumsym));
+          getmem(offsets,64*sizeof(longint));
+          sym_count:=0;
+          sym_alloc:=64;
+          st:=0;
+          t:=Tenumsym(def.firstenum);
+          while assigned(t) do
+            begin
+              if sym_count>=sym_alloc then
+                begin
+                  reallocmem(syms,2*sym_alloc*sizeof(Tenumsym));
+                  reallocmem(offsets,2*sym_alloc*sizeof(longint));
+                  sym_alloc:=sym_alloc*2;
+                end;
+              syms[sym_count]:=t;
+              offsets[sym_count]:=st;
+              inc(sym_count);
+              st:=st+length(t.realname)+1;
+              t:=t.nextenum;
+            end;
+          {Sort the syms by enum value}
+          if sym_count>=2 then
+            begin
+              p:=1;
+              while 2*p<sym_count do
+                p:=2*p;
+              while p<>0 do
+                begin
+                  for h:=p to sym_count-1 do
+                    begin
+                      i:=h;
+                      t:=syms[i];
+                      o:=offsets[i];
+                      repeat
+                        if syms[i-p].value<=t.value then
+                          break;
+                        syms[i]:=syms[i-p];
+                        offsets[i]:=offsets[i-p];
+                        dec(i,p);
+                      until i<p;
+                      syms[i]:=t;
+                      offsets[i]:=o;
+                    end;
+                  p:=p shr 1;
+                end;
+            end;
+          {Decide wether a lookup array is size efficient.}
+          mode:=lookup;
+          if sym_count>0 then
+            begin
+              i:=1;
+              r:=0;
+              h:=syms[0].value; {Next expected enum value is min.}
+              while i<sym_count do
+                begin
+                  {Calculate size of hole between values. Avoid integer overflows.}
+                  r:=r+(single(syms[i].value)-single(h))-1;
+                  h:=syms[i].value;
+                  inc(i);
+                end;
+              if r>sym_count then
+                mode:=search; {Don't waste more than 50% space.}
+            end;
+          {Calculate start of string table.}
+          st:=1;
+          if assigned(def.typesym) then
+            inc(st,length(def.typesym.realname)+1)
+          else
+            inc(st);
+          {$ifdef cpurequiresproperalignment}
+          align(st,sizeof(Tconstptruint));
+          {$endif}
+          inc(st);
+          {$ifdef cpurequiresproperalignment}
+          align(st,sizeof(Tconstptruint));
+          {$endif}
+          inc(st,8+sizeof(aint));
+          { write rtti data }
+          with current_asmdata do
+            begin
+              rttilab:=defineasmsymbol(Tstoreddef(def).rtti_mangledname(rt)+'_o2s',AB_GLOBAL,AT_DATA);
+              maybe_new_object_file(asmlists[al_rtti]);
+              new_section(asmlists[al_rtti],sec_rodata,rttilab.name,const_align(sizeof(aint)));
+              asmlists[al_rtti].concat(Tai_symbol.create_global(rttilab,0));
+              asmlists[al_rtti].concat(Tai_const.create_32bit(longint(mode)));
+              if mode=lookup then
+                begin
+                  o:=syms[0].value;  {Start with min value.}
+                  for i:=0 to sym_count-1 do
+                    begin
+                      while o<syms[i].value do
+                        begin
+                          asmlists[al_rtti].concat(Tai_const.create_aint(0));
+                          inc(o);
+                        end;
+                      inc(o);
+                      asmlists[al_rtti].concat(Tai_const.create_sym_offset(mainrtti,st+offsets[i]));
+                    end;
+                end
+              else
+                begin
+                  asmlists[al_rtti].concat(Tai_const.create_32bit(sym_count));
+                  for i:=0 to sym_count-1 do
+                    begin
+                      asmlists[al_rtti].concat(Tai_const.create_32bit(syms[i].value));
+                      asmlists[al_rtti].concat(Tai_const.create_sym_offset(mainrtti,st+offsets[i]));
+                    end;
+                end;
+              asmlists[al_rtti].concat(Tai_symbol_end.create(rttilab));
+            end;
+          dispose(syms);
+          dispose(offsets);
+        end;
+
+        procedure enumdef_rtti_string2ordindex(def:Tenumdef);
+
+        var rttilab:Tasmsymbol;
+            t:Tenumsym;
+            syms:^Tenumsym;
+            offsets:^longint;
+            sym_count,sym_alloc:longint;
+            h,i,p,o,st:longint;
+
+        begin
+          {Random access needed, put in array.}
+          getmem(syms,64*sizeof(Tenumsym));
+          getmem(offsets,64*sizeof(longint));
+          sym_count:=0;
+          sym_alloc:=64;
+          st:=0;
+          t:=Tenumsym(def.firstenum);
+          while assigned(t) do
+            begin
+              if sym_count>=sym_alloc then
+                begin
+                  reallocmem(syms,2*sym_alloc*sizeof(Tenumsym));
+                  reallocmem(offsets,2*sym_alloc*sizeof(longint));
+                  sym_alloc:=sym_alloc*2;
+                end;
+              syms[sym_count]:=t;
+              offsets[sym_count]:=st;
+              inc(sym_count);
+              st:=st+length(t.realname)+1;
+              t:=t.nextenum;
+            end;
+          {Sort the syms by enum name}
+          if sym_count>=2 then
+            begin
+              p:=1;
+              while 2*p<sym_count do
+                p:=2*p;
+              while p<>0 do
+                begin
+                  for h:=p to sym_count-1 do
+                    begin
+                      i:=h;
+                      t:=syms[i];
+                      o:=offsets[i];
+                      repeat
+                        if syms[i-p].name<=t.name then
+                          break;
+                        syms[i]:=syms[i-p];
+                        offsets[i]:=offsets[i-p];
+                        dec(i,p);
+                      until i<p;
+                      syms[i]:=t;
+                      offsets[i]:=o;
+                    end;
+                  p:=p shr 1;
+                end;
+            end;
+          {Calculate start of string table.}
+          st:=1;
+          if assigned(def.typesym) then
+            inc(st,length(def.typesym.realname)+1)
+          else
+            inc(st);
+          {$ifdef cpurequiresproperalignment}
+          align(st,sizeof(Tconstptruint));
+          {$endif}
+          inc(st);
+          {$ifdef cpurequiresproperalignment}
+          align(st,sizeof(Tconstptruint));
+          {$endif}
+          inc(st,8+sizeof(aint));
+          { write rtti data }
+          with current_asmdata do
+            begin
+              rttilab:=defineasmsymbol(Tstoreddef(def).rtti_mangledname(rt)+'_s2o',AB_GLOBAL,AT_DATA);
+              maybe_new_object_file(asmlists[al_rtti]);
+              new_section(asmlists[al_rtti],sec_rodata,rttilab.name,const_align(sizeof(aint)));
+              asmlists[al_rtti].concat(Tai_symbol.create_global(rttilab,0));
+              asmlists[al_rtti].concat(Tai_const.create_32bit(sym_count));
+              for i:=0 to sym_count-1 do
+                begin
+                  asmlists[al_rtti].concat(Tai_const.create_32bit(syms[i].value));
+                  asmlists[al_rtti].concat(Tai_const.create_sym_offset(mainrtti,st+offsets[i]));
+                end;
+              asmlists[al_rtti].concat(Tai_symbol_end.create(rttilab));
+            end;
+          dispose(syms);
+          dispose(offsets);
+        end;
+
+    begin
+      case def.typ of
+        enumdef:
+          if rt=fullrtti then
+            begin
+              enumdef_rtti_ord2stringindex(Tenumdef(def));
+              enumdef_rtti_string2ordindex(Tenumdef(def));
+            end;
+      end;
+    end;
 
     procedure TRTTIWriter.write_child_rtti_data(def:tdef;rt:trttitype);
       begin
@@ -873,6 +1105,7 @@ implementation
         current_asmdata.asmlists[al_rtti].concat(Tai_symbol.Create_global(rttilab,0));
         write_rtti_data(def,rt);
         current_asmdata.asmlists[al_rtti].concat(Tai_symbol_end.Create(rttilab));
+        write_rtti_extrasyms(def,rt,rttilab);
       end;
 
 
@@ -881,5 +1114,15 @@ implementation
         result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt));
       end;
 
+    function TRTTIWriter.get_rtti_label_ord2str(def:tdef;rt:trttitype):tasmsymbol;
+      begin
+        result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt)+'_o2s');
+      end;
+
+    function TRTTIWriter.get_rtti_label_str2ord(def:tdef;rt:trttitype):tasmsymbol;
+      begin
+        result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt)+'_s2o');
+      end;
+
 end.
 

+ 2 - 2
compiler/ncgutil.pas

@@ -1965,7 +1965,7 @@ implementation
         current_procinfo.procdef.procendtai:=tai(list.last);
 
         { finalisation marker for Mac OS X }
-        if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) and
+        if (target_info.system in systems_darwin) and
            (current_module.islibrary) and
            (((current_module.flags and uf_finalize)<>0) or
             (current_procinfo.procdef.proctypeoption = potype_proginit)) then
@@ -1980,7 +1980,7 @@ implementation
 
         if (current_procinfo.procdef.proctypeoption=potype_proginit) then
           begin
-           if (target_info.system in [system_powerpc_darwin,system_i386_darwin,system_powerpc_macos]) and
+           if (target_info.system in (systems_darwin+[system_powerpc_macos])) and
               not(current_module.islibrary) then
              begin
               list.concat(tai_section.create(sec_code,'',4));

+ 3 - 3
compiler/ncnv.pas

@@ -1207,7 +1207,7 @@ implementation
       begin
         result := ccallnode.createinternres(
           'fpc_variant_to_dynarray',
-          ccallparanode.create(caddrnode.create_internal(crttinode.create(tstoreddef(resultdef),initrtti)),
+          ccallparanode.create(caddrnode.create_internal(crttinode.create(tstoreddef(resultdef),initrtti,rdt_normal)),
             ccallparanode.create(left,nil)
           ),resultdef);
         typecheckpass(result);
@@ -1219,7 +1219,7 @@ implementation
       begin
         result := ccallnode.createinternres(
           'fpc_dynarray_to_variant',
-          ccallparanode.create(caddrnode.create_internal(crttinode.create(tstoreddef(left.resultdef),initrtti)),
+          ccallparanode.create(caddrnode.create_internal(crttinode.create(tstoreddef(left.resultdef),initrtti,rdt_normal)),
             ccallparanode.create(ctypeconvnode.create_explicit(left,voidpointertype),nil)
           ),resultdef);
         typecheckpass(result);
@@ -1312,7 +1312,7 @@ implementation
                ccallparanode.create(cordconstnode.create
                   (1,s32inttype,true),
                ccallparanode.create(caddrnode.create_internal
-                  (crttinode.create(tstoreddef(resultdef),initrtti)),
+                  (crttinode.create(tstoreddef(resultdef),initrtti,rdt_normal)),
                ccallparanode.create(
                  ctypeconvnode.create_internal(
                    ctemprefnode.create(temp),voidpointertype),

+ 40 - 25
compiler/nflw.pas

@@ -84,6 +84,9 @@ interface
           constructor create(l,r,_t1 : tnode);virtual;reintroduce;
           function pass_typecheck:tnode;override;
           function pass_1 : tnode;override;
+          function simplify : tnode;override;
+         private
+          function internalsimplify(warn: boolean) : tnode;
        end;
        tifnodeclass = class of tifnode;
 
@@ -658,6 +661,42 @@ implementation
       end;
 
 
+    function tifnode.internalsimplify(warn: boolean) : tnode;
+      begin
+        result:=nil;
+        { optimize constant expressions }
+        if left.nodetype=ordconstn then
+          begin
+             if tordconstnode(left).value=1 then
+               begin
+                  if assigned(right) then
+                    result:=right
+                  else
+                    result:=cnothingnode.create;
+                  right:=nil;
+                  if warn and assigned(t1) then
+                    CGMessagePos(t1.fileinfo,cg_w_unreachable_code);
+               end
+             else
+               begin
+                  if assigned(t1) then
+                    result:=t1
+                  else
+                    result:=cnothingnode.create;
+                  t1:=nil;
+                  if warn and assigned(right) then
+                    CGMessagePos(right.fileinfo,cg_w_unreachable_code);
+               end;
+          end;
+      end;
+
+
+    function tifnode.simplify : tnode;
+      begin
+        result:=internalsimplify(false);
+      end;
+
+
     function tifnode.pass_typecheck:tnode;
       begin
          result:=nil;
@@ -685,31 +724,7 @@ implementation
              else
                Message1(type_e_boolean_expr_expected,left.resultdef.typename);
            end;
-
-         { optimize constant expressions }
-         if left.nodetype=ordconstn then
-           begin
-              if tordconstnode(left).value=1 then
-                begin
-                   if assigned(right) then
-                     result:=right
-                   else
-                     result:=cnothingnode.create;
-                   right:=nil;
-                   if assigned(t1) then
-                     CGMessagePos(t1.fileinfo,cg_w_unreachable_code);
-                end
-              else
-                begin
-                   if assigned(t1) then
-                     result:=t1
-                   else
-                     result:=cnothingnode.create;
-                   t1:=nil;
-                   if assigned(right) then
-                     CGMessagePos(right.fileinfo,cg_w_unreachable_code);
-                end;
-           end;
+         result:=internalsimplify(true);
       end;
 
 

File diff ditekan karena terlalu besar
+ 539 - 440
compiler/ninl.pas


+ 7 - 3
compiler/nld.pas

@@ -33,6 +33,8 @@ interface
        symconst,symbase,symtype,symsym,symdef;
 
     type
+       Trttidatatype=(rdt_normal,rdt_ord2str,rdt_str2ord);
+
        tloadnode = class(tunarynode)
        protected
           procdef : tprocdef;
@@ -116,7 +118,8 @@ interface
           rttitype : trttitype;
           rttidef : tstoreddef;
           rttidefderef : tderef;
-          constructor create(def:tstoreddef;rt:trttitype);virtual;
+          rttidatatype : Trttidatatype;
+          constructor create(def:tstoreddef;rt:trttitype;dt:Trttidatatype);virtual;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure buildderefimpl;override;
@@ -595,7 +598,7 @@ implementation
            (right.nodetype=niln) then
          begin
            hp:=ccallparanode.create(caddrnode.create_internal
-                   (crttinode.create(tstoreddef(left.resultdef),initrtti)),
+                   (crttinode.create(tstoreddef(left.resultdef),initrtti,rdt_normal)),
                ccallparanode.create(ctypeconvnode.create_internal(left,voidpointertype),nil));
            result := ccallnode.createintern('fpc_dynarray_clear',hp);
            left:=nil;
@@ -1162,11 +1165,12 @@ implementation
 *****************************************************************************}
 
 
-    constructor trttinode.create(def:tstoreddef;rt:trttitype);
+    constructor trttinode.create(def:tstoreddef;rt:trttitype;dt:Trttidatatype);
       begin
          inherited create(rttin);
          rttidef:=def;
          rttitype:=rt;
+         rttidatatype:=dt;
       end;
 
 

+ 0 - 1
compiler/nopt.pas

@@ -359,7 +359,6 @@ begin
     end;
 end;
 
-
 begin
   caddsstringcharoptnode := taddsstringcharoptnode;
   caddsstringcsstringoptnode := taddsstringcsstringoptnode;

+ 15 - 5
compiler/nutils.pas

@@ -47,7 +47,6 @@ interface
 
     tforeachprocmethod = (pm_preprocess,pm_postprocess);
 
-
     foreachnodefunction = function(var n: tnode; arg: pointer): foreachnoderesult of object;
     staticforeachnodefunction = function(var n: tnode; arg: pointer): foreachnoderesult;
 
@@ -499,7 +498,7 @@ implementation
                   ccallparanode.create(
                       caddrnode.create_internal(
                           crttinode.create(
-                              tstoreddef(p.resultdef),initrtti)),
+                              tstoreddef(p.resultdef),initrtti,rdt_normal)),
                   ccallparanode.create(
                       caddrnode.create_internal(p),
                   nil)));
@@ -542,7 +541,7 @@ implementation
                 ccallparanode.create(
                     caddrnode.create_internal(
                         crttinode.create(
-                            tstoreddef(p.resultdef),initrtti)),
+                            tstoreddef(p.resultdef),initrtti,rdt_normal)),
                 ccallparanode.create(
                     caddrnode.create_internal(p),
                 nil)));
@@ -583,9 +582,17 @@ implementation
                     result := NODE_COMPLEXITY_INF;
                   exit;
                 end;
-              subscriptn,
+              subscriptn:
+                begin
+                  if is_class_or_interface(tunarynode(p).left.resultdef) then
+                    inc(result);
+                  if (result = NODE_COMPLEXITY_INF) then
+                    exit;
+                  p := tunarynode(p).left;
+                end;
               blockn:
                 p := tunarynode(p).left;
+              notn,
               derefn :
                 begin
                   inc(result);
@@ -613,11 +620,14 @@ implementation
                     end;
                   p := tbinarynode(p).right;
                 end;
-              { better: make muln/divn/modn more expensive }
               addn,subn,orn,andn,xorn,muln,divn,modn,symdifn,
+              shln,shrn,
+              equaln,unequaln,gtn,gten,ltn,lten,
               assignn:
                 begin
                   inc(result,node_complexity(tbinarynode(p).left)+1);
+                  if (p.nodetype in [muln,divn,modn]) then
+                    inc(result,5);
                   if (result >= NODE_COMPLEXITY_INF) then
                     begin
                       result := NODE_COMPLEXITY_INF;

+ 1 - 1
compiler/ogelf.pas

@@ -607,7 +607,7 @@ implementation
         secname : string;
       begin
         if (cs_create_pic in current_settings.moduleswitches) and
-           not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+           not(target_info.system in systems_darwin) then
           secname:=secnames_pic[atype]
         else
           secname:=secnames[atype];

+ 166 - 2
compiler/optcse.pas

@@ -23,14 +23,177 @@ unit optcse;
 
 {$i fpcdefs.inc}
 
+{ $define csedebug}
+
   interface
 
-    procedure docse(rootnode : tnode);
+    uses
+      node;
+
+    function do_optcse(var rootnode : tnode) : tnode;
 
   implementation
 
-    procedure docse(rootnode : tnode);
+    uses
+      globtype,
+      cclasses,
+      nutils,
+      nbas,nld,
+      pass_1,
+      symtype,symdef;
+
+    const
+      cseinvariant : set of tnodetype = [loadn,addn,muln,subn,divn,slashn,modn,andn,orn,xorn,notn,vecn,
+        derefn,equaln,unequaln,ltn,gtn,lten,gten,typeconvn,subscriptn];
+
+    function searchsubdomain(var n:tnode; arg: pointer) : foreachnoderesult;
+      begin
+        if not(n.nodetype in cseinvariant) then
+          begin
+            pboolean(arg)^:=false;
+            result:=fen_norecurse_true;
+          end
+        else
+          result:=fen_true;
+      end;
+
+    type
+      tlists = record
+        nodelist : tfplist;
+        locationlist : tfplist;
+      end;
+
+      plists = ^tlists;
+      pnode = ^tnode;
+
+
+    function collectnodes(var n:tnode; arg: pointer) : foreachnoderesult;
+      begin
+        { node worth to add? }
+        if (node_complexity(n)>1) and (tstoreddef(n.resultdef).is_intregable or tstoreddef(n.resultdef).is_fpuregable) then
+          begin
+            plists(arg)^.nodelist.Add(n);
+            plists(arg)^.locationlist.Add(@n);
+            result:=fen_false;
+          end
+        else
+          result:=fen_norecurse_false;
+      end;
+
+
+    function searchcsedomain(var n: tnode; arg: pointer) : foreachnoderesult;
+      var
+        csedomain : boolean;
+        lists : tlists;
+        templist : tfplist;
+        i,j : longint;
+        def : tstoreddef;
+        nodes : tblocknode;
+        creates,
+        statements : tstatementnode;
+        hp : ttempcreatenode;
+      begin
+        result:=fen_false;
+        if n.nodetype in cseinvariant then
+          begin
+            csedomain:=true;
+            foreachnodestatic(pm_postprocess,n,@searchsubdomain,@csedomain);
+            { found a cse domain }
+            if csedomain then
+              begin
+                statements:=nil;
+                result:=fen_norecurse_true;
+{$ifdef csedebug}
+                writeln('============ cse domain ==================');
+                printnode(output,n);
+{$endif csedebug}
+
+                lists.nodelist:=tfplist.create;
+                lists.locationlist:=tfplist.create;
+                foreachnodestatic(pm_postprocess,n,@collectnodes,@lists);
+
+                templist:=tfplist.create;
+                templist.count:=lists.nodelist.count;
+
+                { this is poorly coded, just comparing every node with all other nodes }
+                for i:=0 to lists.nodelist.count-1 do
+                  for j:=i+1 to lists.nodelist.count-1 do
+                    begin
+                      if tnode(lists.nodelist[i]).isequal(tnode(lists.nodelist[j])) then
+                        begin
+                          if not(assigned(statements)) then
+                            begin
+                              nodes:=internalstatements(statements);
+                              addstatement(statements,internalstatements(creates));
+                            end;
+{$ifdef csedebug}
+                          writeln('    ====     ');
+                          printnode(output,tnode(lists.nodelist[i]));
+                          writeln('    equals   ');
+                          printnode(output,tnode(lists.nodelist[j]));
+                          writeln('    ====     ');
+{$endif csedebug}
+
+                          def:=tstoreddef(tnode(lists.nodelist[i]).resultdef);
+                          if assigned(templist[i])  then
+                            begin
+                              templist[j]:=templist[i];
+                              pnode(lists.locationlist[j])^.free;
+                              pnode(lists.locationlist[j])^:=ctemprefnode.create(ttempcreatenode(templist[j]));
+                              do_firstpass(pnode(lists.locationlist[j])^);
+                            end
+                          else
+                            begin
+                              templist[i]:=ctempcreatenode.create(def,def.size,tt_persistent,
+                                def.is_intregable or def.is_fpuregable);
+                              addstatement(creates,tnode(templist[i]));
+
+                              { properties can't be passed by var }
+                              hp:=ttempcreatenode(templist[i]);
+                              do_firstpass(tnode(hp));
+
+                              addstatement(statements,cassignmentnode.create(ctemprefnode.create(ttempcreatenode(templist[i])),
+                                tnode(lists.nodelist[i])));
+                              pnode(lists.locationlist[i])^:=ctemprefnode.create(ttempcreatenode(templist[i]));
+                              do_firstpass(pnode(lists.locationlist[i])^);
+
+                              templist[j]:=templist[i];
+
+                              pnode(lists.locationlist[j])^.free;
+                              pnode(lists.locationlist[j])^:=ctemprefnode.create(ttempcreatenode(templist[j]));
+                              do_firstpass(pnode(lists.locationlist[j])^);
+{$ifdef csedebug}
+                              printnode(output,statements);
+{$endif csedebug}
+                            end;
+                        end;
+                    end;
+                if assigned(statements) then
+                  begin
+                    addstatement(statements,n);
+                    n:=nodes;
+                    do_firstpass(n);
+{$ifdef csedebug}
+                    printnode(output,nodes);
+{$endif csedebug}
+                  end;
+{$ifdef csedebug}
+                writeln('nodes: ',lists.nodelist.count);
+                writeln('==========================================');
+{$endif csedebug}
+                lists.nodelist.free;
+                lists.locationlist.free;
+                templist.free;
+              end
+          end;
+      end;
+
+
+    function do_optcse(var rootnode : tnode) : tnode;
       begin
+        foreachnodestatic(pm_postprocess,rootnode,@searchcsedomain,nil);
+        result:=nil;
+(*
         { create a linear list of nodes }
 
         { create hash values }
@@ -74,6 +237,7 @@ unit optcse;
                   delete the temp. }
               end;
           end;
+*)
       end;
 
 end.

+ 11 - 11
compiler/pdecvar.pas

@@ -919,7 +919,7 @@ implementation
           if is_cdecl or
              (
               is_dll and
-              (target_info.system in [system_powerpc_darwin,system_i386_darwin])
+              (target_info.system in systems_darwin)
              ) then
             C_Name := target_info.Cprefix+C_Name;
 
@@ -1143,15 +1143,15 @@ implementation
          uniondef : trecorddef;
          hintsymoptions : tsymoptions;
          semicoloneaten: boolean;
-{$ifdef powerpc}
+{$if defined(powerpc) or defined(powerpc64)}
          tempdef: tdef;
          is_first_field: boolean;
-{$endif powerpc}
+{$endif powerpc or powerpc64}
       begin
          recst:=tabstractrecordsymtable(symtablestack.top);
-{$ifdef powerpc}
+{$if defined(powerpc) or defined(powerpc64)}
          is_first_field := true;
-{$endif powerpc}
+{$endif powerpc or powerpc64}
          old_current_object_option:=current_object_option;
          { all variables are public if not in a object declaration }
          if not(vd_object in options) then
@@ -1191,7 +1191,7 @@ implementation
              if maybe_parse_proc_directives(hdef) then
                semicoloneaten:=true;
 
-{$ifdef powerpc}
+{$if defined(powerpc) or defined(powerpc64)}
              { from gcc/gcc/config/rs6000/rs6000.h:
               /* APPLE LOCAL begin Macintosh alignment 2002-1-22 ff */
               /* Return the alignment of a struct based on the Macintosh PowerPC
@@ -1202,7 +1202,7 @@ implementation
                  (32-bit) alignment, in which case the alignment is determined by
                  the alignment of the first field.  */
              }
-             if (target_info.system in [system_powerpc_darwin, system_powerpc_macos]) and
+             if (target_info.system in [system_powerpc_darwin, system_powerpc_macos, system_powerpc64_darwin]) and
                 is_first_field and
                 (symtablestack.top.symtabletype = recordsymtable) and
                 (trecordsymtable(symtablestack.top).usefieldalignment = -1) then
@@ -1220,7 +1220,7 @@ implementation
                    trecordsymtable(symtablestack.top).padalignment := maxpadalign;
                  is_first_field := false;
                end;
-{$endif powerpc}
+{$endif powerpc or powerpc64}
 
              { types that use init/final are not allowed in variant parts, but
                classes are allowed }
@@ -1388,14 +1388,14 @@ implementation
               unionsymtable.datasize:=maxsize;
               unionsymtable.fieldalignment:=maxalignment;
               unionsymtable.addalignmentpadding;
-{$ifdef powerpc}
+{$if defined(powerpc) or defined(powerpc64)}
               { parent inherits the alignment padding if the variant is the first "field" of the parent record/variant }
-              if (target_info.system in [system_powerpc_darwin, system_powerpc_macos]) and
+              if (target_info.system in [system_powerpc_darwin, system_powerpc_macos, system_powerpc64_darwin]) and
                  is_first_field and
                  (recst.usefieldalignment = -1) and
                  (maxpadalign > recst.padalignment) then
                 recst.padalignment:=maxpadalign;
-{$endif powerpc}
+{$endif powerpc or powerpc64}
               { Align the offset where the union symtable is added }
               if (recst.usefieldalignment=-1) then
                 usedalign:=used_align(unionsymtable.recordalignment,current_settings.alignment.recordalignmin,current_settings.alignment.maxCrecordalign)

+ 4 - 4
compiler/pinline.pas

@@ -391,7 +391,7 @@ implementation
             if tpointerdef(p1.resultdef).pointeddef.needs_inittable then
              begin
                para := ccallparanode.create(caddrnode.create_internal(crttinode.create
-                          (tstoreddef(tpointerdef(p1.resultdef).pointeddef),initrtti)),
+                          (tstoreddef(tpointerdef(p1.resultdef).pointeddef),initrtti,rdt_normal)),
                        ccallparanode.create(ctemprefnode.create
                           (temp),nil));
                addstatement(newstatement,ccallnode.createintern('fpc_initialize',para));
@@ -563,7 +563,7 @@ implementation
                    ccallparanode.create(cordconstnode.create
                       (counter,s32inttype,true),
                    ccallparanode.create(caddrnode.create_internal
-                      (crttinode.create(tstoreddef(destppn.resultdef),initrtti)),
+                      (crttinode.create(tstoreddef(destppn.resultdef),initrtti,rdt_normal)),
                    ccallparanode.create(ctypeconvnode.create_internal(destppn,voidpointertype),nil))));
             addstatement(newstatement,ccallnode.createintern('fpc_dynarray_setlength',npara));
             addstatement(newstatement,ctempdeletenode.create(temp));
@@ -657,7 +657,7 @@ implementation
                   ccallparanode.create(ctypeconvnode.create
                      (ppn.left,s32inttype),
                   ccallparanode.create(caddrnode.create_internal
-                     (crttinode.create(tstoreddef(destppn.left.resultdef),initrtti)),
+                     (crttinode.create(tstoreddef(destppn.left.resultdef),initrtti,rdt_normal)),
                   ccallparanode.create(caddrnode.create_internal
                      (destppn.left),nil))));
            newblock:=ccallnode.createintern('fpc_finalize_array',npara);
@@ -750,7 +750,7 @@ implementation
             npara:=ccallparanode.create(highppn,
                    ccallparanode.create(lowppn,
                    ccallparanode.create(caddrnode.create_internal
-                      (crttinode.create(tstoreddef(ppn.left.resultdef),initrtti)),
+                      (crttinode.create(tstoreddef(ppn.left.resultdef),initrtti,rdt_normal)),
                    ccallparanode.create
                       (ctypeconvnode.create_internal(ppn.left,voidpointertype),nil))));
             copynode:=ccallnode.createinternres('fpc_dynarray_copy',npara,ppn.left.resultdef);

+ 2 - 2
compiler/pmodules.pas

@@ -1312,12 +1312,12 @@ implementation
           begin
             main_procinfo:=create_main_proc(make_mangledname('',current_module.localsymtable,mainaliasname),potype_proginit,current_module.localsymtable);
             { Win32 startup code needs a single name }
-            if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+            if not(target_info.system in systems_darwin) then
               main_procinfo.procdef.aliasnames.insert('PASCALMAIN')
             else
               main_procinfo.procdef.aliasnames.insert(target_info.Cprefix+'PASCALMAIN')
           end
-         else if (target_info.system in [system_i386_netware,system_i386_netwlibc,system_powerpc_macos,system_powerpc_darwin,system_i386_darwin]) then
+         else if (target_info.system in ([system_i386_netware,system_i386_netwlibc,system_powerpc_macos]+systems_darwin)) then
            begin
              main_procinfo:=create_main_proc('PASCALMAIN',potype_proginit,current_module.localsymtable);
            end

+ 0 - 256
compiler/powerpc/cgcpu.pas

@@ -81,16 +81,12 @@ unit cgcpu;
         procedure g_save_standard_registers(list:TAsmList); override;
         procedure g_restore_standard_registers(list:TAsmList); override;
 
-        procedure a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);override;
-
         procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);override;
 
         { find out whether a is of the form 11..00..11b or 00..11...00. If }
         { that's the case, we can use rlwinm to do an AND operation        }
         function get_rlwi_const(a: aint; var l1, l2: longint): boolean;
 
-        procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
-
       protected
        procedure a_load_regconst_subsetreg_intern(list : TAsmList; fromsize, subsetsize: tcgsize; fromreg: tregister; const sreg: tsubsetregister; slopt: tsubsetloadopt); override;
       private
@@ -116,10 +112,6 @@ unit cgcpu;
         { instruction                                                      }
         function issimpleref(const ref: treference): boolean;
 
-        { contains the common code of a_load_reg_ref and a_load_ref_reg }
-        procedure a_load_store(list:TAsmList;op: tasmop;reg:tregister;
-                    ref: treference); override;
-
         function save_regs(list : TAsmList):longint;
         procedure restore_regs(list : TAsmList);
      end;
@@ -1511,88 +1503,6 @@ const
       end;
 
 
-     procedure tcgppc.a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);
-
-       var
-         ref2, tmpref: treference;
-
-       begin
-         ref2 := ref;
-         fixref(list,ref2);
-         if assigned(ref2.symbol) then
-           begin
-             if target_info.system = system_powerpc_macos then
-               begin
-                 if macos_direct_globals then
-                   begin
-                     reference_reset(tmpref);
-                     tmpref.offset := ref2.offset;
-                     tmpref.symbol := ref2.symbol;
-                     tmpref.base := NR_NO;
-                     list.concat(taicpu.op_reg_reg_ref(A_ADDI,r,NR_RTOC,tmpref));
-                   end
-                 else
-                   begin
-                     reference_reset(tmpref);
-                     tmpref.symbol := ref2.symbol;
-                     tmpref.offset := 0;
-                     tmpref.base := NR_RTOC;
-                     list.concat(taicpu.op_reg_ref(A_LWZ,r,tmpref));
-
-                     if ref2.offset <> 0 then
-                       begin
-                         reference_reset(tmpref);
-                         tmpref.offset := ref2.offset;
-                         tmpref.base:= r;
-                         list.concat(taicpu.op_reg_ref(A_LA,r,tmpref));
-                       end;
-                   end;
-
-                 if ref2.base <> NR_NO then
-                   list.concat(taicpu.op_reg_reg_reg(A_ADD,r,r,ref2.base));
-
-                 //list.concat(tai_comment.create(strpnew('*** a_loadaddr_ref_reg')));
-               end
-             else
-               begin
-
-                 { add the symbol's value to the base of the reference, and if the }
-                 { reference doesn't have a base, create one                       }
-                 reference_reset(tmpref);
-                 tmpref.offset := ref2.offset;
-                 tmpref.symbol := ref2.symbol;
-                 tmpref.relsymbol := ref2.relsymbol;
-                 tmpref.refaddr := addr_hi;
-                 if ref2.base<> NR_NO then
-                   begin
-                     list.concat(taicpu.op_reg_reg_ref(A_ADDIS,r,
-                       ref2.base,tmpref));
-                   end
-                 else
-                   list.concat(taicpu.op_reg_ref(A_LIS,r,tmpref));
-                 tmpref.base := NR_NO;
-                 tmpref.refaddr := addr_lo;
-                 { can be folded with one of the next instructions by the }
-                 { optimizer probably                                     }
-                 list.concat(taicpu.op_reg_reg_ref(A_ADDI,r,r,tmpref));
-               end
-           end
-         else if ref2.offset <> 0 Then
-           if ref2.base <> NR_NO then
-             a_op_const_reg_reg(list,OP_ADD,OS_32,ref2.offset,ref2.base,r)
-           { FixRef makes sure that "(ref.index <> R_NO) and (ref.offset <> 0)" never}
-           { occurs, so now only ref.offset has to be loaded                         }
-           else
-             a_load_const_reg(list,OS_32,ref2.offset,r)
-         else if ref2.index <> NR_NO Then
-           list.concat(taicpu.op_reg_reg_reg(A_ADD,r,ref2.base,ref2.index))
-         else if (ref2.base <> NR_NO) and
-                 (r <> ref2.base) then
-           a_load_reg_reg(list,OS_ADDR,OS_ADDR,ref2.base,r)
-         else
-           list.concat(taicpu.op_reg_const(A_LI,r,0));
-       end;
-
 { ************* concatcopy ************ }
 
 {$ifndef ppc603}
@@ -1784,78 +1694,6 @@ const
       end;
 
 
-    procedure tcgppc.g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);
-
-        procedure loadvmttor11;
-        var
-          href : treference;
-        begin
-          reference_reset_base(href,NR_R3,0);
-          cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,href,NR_R11);
-        end;
-
-        procedure op_onr11methodaddr;
-        var
-          href : treference;
-        begin
-          if (procdef.extnumber=$ffff) then
-            Internalerror(200006139);
-          { call/jmp  vmtoffs(%eax) ; method offs }
-          reference_reset_base(href,NR_R11,procdef._class.vmtmethodoffset(procdef.extnumber));
-          if not((longint(href.offset) >= low(smallint)) and
-                 (longint(href.offset) <= high(smallint))) then
-            begin
-              list.concat(taicpu.op_reg_reg_const(A_ADDIS,NR_R11,NR_R11,
-                smallint((href.offset shr 16)+ord(smallint(href.offset and $ffff) < 0))));
-              href.offset := smallint(href.offset and $ffff);
-            end;
-          list.concat(taicpu.op_reg_ref(A_LWZ,NR_R11,href));
-          list.concat(taicpu.op_reg(A_MTCTR,NR_R11));
-          list.concat(taicpu.op_none(A_BCTR));
-        end;
-
-      var
-        make_global : boolean;
-      begin
-        if not(procdef.proctypeoption in [potype_function,potype_procedure]) then
-          Internalerror(200006137);
-        if not assigned(procdef._class) or
-           (procdef.procoptions*[po_classmethod, po_staticmethod,
-             po_methodpointer, po_interrupt, po_iocheck]<>[]) then
-          Internalerror(200006138);
-        if procdef.owner.symtabletype<>ObjectSymtable then
-          Internalerror(200109191);
-
-        make_global:=false;
-        if (not current_module.is_unit) or
-           (cs_create_smart in current_settings.moduleswitches) or
-           (procdef.owner.defowner.owner.symtabletype=globalsymtable) then
-          make_global:=true;
-
-        if make_global then
-          List.concat(Tai_symbol.Createname_global(labelname,AT_FUNCTION,0))
-        else
-          List.concat(Tai_symbol.Createname(labelname,AT_FUNCTION,0));
-
-        { set param1 interface to self  }
-        g_adjust_self_value(list,procdef,ioffset);
-
-        { case 4 }
-        if po_virtualmethod in procdef.procoptions then
-          begin
-            loadvmttor11;
-            op_onr11methodaddr;
-          end
-        { case 0 }
-        else
-          if not(target_info.system = system_powerpc_darwin) then
-            list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol(procdef.mangledname)))
-          else
-            list.concat(taicpu.op_sym(A_B,get_darwin_call_stub(procdef.mangledname)));
-        List.concat(Tai_symbol_end.Createname(labelname));
-      end;
-
-
 {***************** This is private property, keep out! :) *****************}
 
     function tcgppc.issimpleref(const ref: treference): boolean;
@@ -1990,100 +1828,6 @@ const
       end;
 
 
-    procedure tcgppc.a_load_store(list:TAsmList;op: tasmop;reg:tregister;
-       ref: treference);
-
-      var
-        tmpreg: tregister;
-        tmpref: treference;
-        largeOffset: Boolean;
-
-      begin
-        tmpreg := NR_NO;
-
-        if target_info.system = system_powerpc_macos then
-          begin
-            largeOffset:= (cardinal(ref.offset-low(smallint)) >
-                  high(smallint)-low(smallint));
-
-            if assigned(ref.symbol) then
-              begin {Load symbol's value}
-                tmpreg := rg[R_INTREGISTER].getregister(list,R_SUBWHOLE);
-
-                reference_reset(tmpref);
-                tmpref.symbol := ref.symbol;
-                tmpref.base := NR_RTOC;
-
-                if macos_direct_globals then
-                  list.concat(taicpu.op_reg_ref(A_LA,tmpreg,tmpref))
-                else
-                  list.concat(taicpu.op_reg_ref(A_LWZ,tmpreg,tmpref));
-              end;
-
-            if largeOffset then
-              begin {Add hi part of offset}
-                reference_reset(tmpref);
-
-                if Smallint(Lo(ref.offset)) < 0 then
-                  tmpref.offset := Hi(ref.offset) + 1 {Compensate when lo part is negative}
-                else
-                  tmpref.offset := Hi(ref.offset);
-
-                if (tmpreg <> NR_NO) then
-                  list.concat(taicpu.op_reg_reg_ref(A_ADDIS,tmpreg, tmpreg,tmpref))
-                else
-                  begin
-                    tmpreg := rg[R_INTREGISTER].getregister(list,R_SUBWHOLE);
-                    list.concat(taicpu.op_reg_ref(A_LIS,tmpreg,tmpref));
-                  end;
-              end;
-
-            if (tmpreg <> NR_NO) then
-              begin
-                {Add content of base register}
-                if ref.base <> NR_NO then
-                  list.concat(taicpu.op_reg_reg_reg(A_ADD,tmpreg,
-                    ref.base,tmpreg));
-
-                {Make ref ready to be used by op}
-                ref.symbol:= nil;
-                ref.base:= tmpreg;
-                if largeOffset then
-                  ref.offset := Smallint(Lo(ref.offset));
-
-                list.concat(taicpu.op_reg_ref(op,reg,ref));
-                //list.concat(tai_comment.create(strpnew('*** a_load_store indirect global')));
-              end
-            else
-              list.concat(taicpu.op_reg_ref(op,reg,ref));
-          end
-        else {if target_info.system <> system_powerpc_macos}
-          begin
-            if assigned(ref.symbol) or
-               (cardinal(ref.offset-low(smallint)) >
-                high(smallint)-low(smallint)) then
-              begin
-                tmpreg := rg[R_INTREGISTER].getregister(list,R_SUBWHOLE);
-                reference_reset(tmpref);
-                tmpref.symbol := ref.symbol;
-                tmpref.relsymbol := ref.relsymbol;
-                tmpref.offset := ref.offset;
-                tmpref.refaddr := addr_hi;
-                if ref.base <> NR_NO then
-                  list.concat(taicpu.op_reg_reg_ref(A_ADDIS,tmpreg,
-                    ref.base,tmpref))
-                else
-                  list.concat(taicpu.op_reg_ref(A_LIS,tmpreg,tmpref));
-                ref.base := tmpreg;
-                ref.refaddr := addr_lo;
-                list.concat(taicpu.op_reg_ref(op,reg,ref));
-              end
-            else
-              list.concat(taicpu.op_reg_ref(op,reg,ref));
-          end;
-      end;
-
-
     procedure tcg64fppc.a_op64_reg_reg(list : TAsmList;op:TOpCG;size : tcgsize;regsrc,regdst : tregister64);
       begin
         a_op64_reg_reg_reg(list,op,size,regsrc,regdst,regdst);

+ 0 - 346
compiler/powerpc64/agppcgas.pas

@@ -1,346 +0,0 @@
-{
-    Copyright (c) 1998-2002 by Florian Klaempfl
-
-    This unit implements an asm for the PowerPC64. Heavily based on the one
-    from the PowerPC architecture.
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    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.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- ****************************************************************************
-}
-{ This unit implements the GNU Assembler writer for the PowerPC
-}
-
-unit agppcgas;
-
-{$I fpcdefs.inc}
-
-interface
-
-uses
-  aasmtai,aasmdata,
-  aggas,
-  cpubase;
-
-type
-  TPPCGNUAssembler = class(TGNUassembler)
-  public
-    constructor create(smart: boolean); override;
-    procedure WriteExtraHeader; override;
-  end;
-
-  TPPCInstrWriter = class(TCPUInstrWriter)
-    procedure WriteInstruction(hp: tai); override;
-  end;
-
-
-implementation
-
-uses
-  cutils, globals, verbose,
-  cgbase, cgutils, systems,
-  assemble, globtype, fmodule,
-  itcpugas, finput,
-  aasmcpu;
-
-
-{****************************************************************************}
-{                         GNU PPC Assembler writer                           }
-{****************************************************************************}
-
-constructor TPPCGNUAssembler.create(smart: boolean);
-begin
-  inherited create(smart);
-  InstrWriter := TPPCInstrWriter.create(self);
-end;
-
-
-procedure TPPCGNUAssembler.WriteExtraHeader;
-var
-  i: longint;
-begin
-  for i := 0 to 31 do
-    AsmWriteln(#9'.set'#9'r' + tostr(i) + ',' + tostr(i));
-  for i := 0 to 31 do
-    AsmWriteln(#9'.set'#9'f' + tostr(i) + ',' + tostr(i));
-end;
-
-{****************************************************************************}
-{                  Helper routines for Instruction Writer                    }
-{****************************************************************************}
-
-const
-  refaddr2str: array[trefaddr] of string[9] = ('', '', 'ha16','lo16','', '@l', '@h', '@higher', '@highest', '@ha', '@highera', '@highesta');
-
-function getreferencestring(var ref: treference): string;
-var
-  s: string;
-begin
-  with ref do begin
-    if ((offset < -32768) or (offset > 32767)) and
-      (refaddr = addr_no) then
-      internalerror(2006052501);
-    if (refaddr = addr_no) then
-      s := ''
-    else begin
-      s := '(';
-      if assigned(symbol) then begin
-        s := s + symbol.name;
-        if assigned(relsymbol) then
-          s := s + '-' + relsymbol.name;
-      end;
-    end;
-    if offset < 0 then
-      s := s + tostr(offset)
-    else if (offset > 0) then begin
-      if assigned(symbol) then
-        s := s + '+' + tostr(offset)
-      else
-        s := s + tostr(offset);
-    end;
-
-    if (refaddr in [addr_low, addr_high, addr_higher, addr_highest, addr_higha, addr_highera, addr_highesta]) then begin
-      s := s + ')';
-      if (target_info.system <> system_powerpc_darwin) then
-        s := s + refaddr2str[refaddr];
-    end;
-    if (refaddr = addr_pic) then s := s + ')';
-
-    if (index = NR_NO) and (base <> NR_NO) then begin
-      if offset = 0 then begin
-        if not (assigned(symbol)) then
-          s := s + '0';
-      end;
-      s := s + '(' + gas_regname(base) + ')';
-    end else if (index <> NR_NO) and (base <> NR_NO) then begin
-      if (offset = 0) then
-        s := s + gas_regname(base) + ',' + gas_regname(index)
-      else
-        internalerror(2006052502);
-    end;
-  end;
-  getreferencestring := s;
-end;
-
-function getopstr_jmp(const o: toper): string;
-var
-  hs: string;
-begin
-  case o.typ of
-    top_reg:
-      getopstr_jmp := gas_regname(o.reg);
-    { no top_ref jumping for powerpc }
-    top_const:
-      getopstr_jmp := tostr(o.val);
-    top_ref:
-      begin
-        if o.ref^.refaddr <> addr_full then
-          internalerror(200402262);
-        hs := o.ref^.symbol.name;
-        if o.ref^.offset > 0 then
-          hs := hs + '+' + tostr(o.ref^.offset)
-        else if o.ref^.offset < 0 then
-          hs := hs + tostr(o.ref^.offset);
-        getopstr_jmp := hs;
-      end;
-    top_none:
-      getopstr_jmp := '';
-  else
-    internalerror(2002070603);
-  end;
-end;
-
-function getopstr(const o: toper): string;
-var
-  hs: string;
-begin
-  case o.typ of
-    top_reg:
-      getopstr := gas_regname(o.reg);
-    top_const:
-      getopstr := tostr(longint(o.val));
-    top_ref:
-      if o.ref^.refaddr = addr_full then begin
-        hs := o.ref^.symbol.name;
-        if o.ref^.offset > 0 then
-          hs := hs + '+' + tostr(o.ref^.offset)
-        else if o.ref^.offset < 0 then
-          hs := hs + tostr(o.ref^.offset);
-        getopstr := hs;
-      end else
-        getopstr := getreferencestring(o.ref^);
-  else
-    internalerror(2002070604);
-  end;
-end;
-
-function branchmode(o: tasmop): string[4];
-var
-  tempstr: string[4];
-begin
-  tempstr := '';
-  case o of
-    A_BCCTR, A_BCCTRL: tempstr := 'ctr';
-    A_BCLR, A_BCLRL: tempstr := 'lr';
-  end;
-  case o of
-    A_BL, A_BLA, A_BCL, A_BCLA, A_BCCTRL, A_BCLRL: tempstr := tempstr + 'l';
-  end;
-  case o of
-    A_BA, A_BLA, A_BCA, A_BCLA: tempstr := tempstr + 'a';
-  end;
-  branchmode := tempstr;
-end;
-
-function cond2str(op: tasmop; c: tasmcond): string;
-{ note: no checking is performed whether the given combination of }
-{ conditions is valid                                             }
-var
-  tempstr: string;
-begin
-  tempstr := #9;
-  case c.simple of
-    false:
-      begin
-        cond2str := tempstr + gas_op2str[op];
-        case c.dirhint of
-          DH_None: ;
-          DH_Minus:
-            cond2str := cond2str + '-';
-          DH_Plus:
-            cond2str := cond2str + '+';
-        else
-          internalerror(2003112901);
-        end;
-        cond2str := cond2str + #9 + tostr(c.bo) + ',' + tostr(c.bi);
-      end;
-    true:
-      if (op >= A_B) and (op <= A_BCLRL) then
-        case c.cond of
-          { unconditional branch }
-          C_NONE:
-            cond2str := tempstr + gas_op2str[op];
-          { bdnzt etc }
-        else
-          begin
-            tempstr := tempstr + 'b' + asmcondflag2str[c.cond] +
-              branchmode(op);
-            case c.dirhint of
-              DH_None:
-                tempstr := tempstr + #9;
-              DH_Minus:
-                tempstr := tempstr + ('-' + #9);
-              DH_Plus:
-                tempstr := tempstr + ('+' + #9);
-            else
-              internalerror(2003112901);
-            end;
-            case c.cond of
-              C_LT..C_NU:
-                cond2str := tempstr + gas_regname(newreg(R_SPECIALREGISTER,
-                  c.cr, R_SUBWHOLE));
-              C_T, C_F, C_DNZT, C_DNZF, C_DZT, C_DZF:
-                cond2str := tempstr + tostr(c.crbit);
-            else
-              cond2str := tempstr;
-            end;
-          end;
-        end
-          { we have a trap instruction }
-      else begin
-        internalerror(2002070601);
-        { not yet implemented !!!!!!!!!!!!!!!!!!!!! }
-        { case tempstr := 'tw';}
-      end;
-  end;
-end;
-
-
-{****************************************************************************}
-{                        PowerPC Instruction Writer                          }
-{****************************************************************************}
-
-procedure TPPCInstrWriter.WriteInstruction(hp: tai);
-var
-  op: TAsmOp;
-  s: string;
-  i: byte;
-  sep: string[3];
-begin
-  op := taicpu(hp).opcode;
-  if is_calljmp(op) then begin
-    { direct BO/BI in op[0] and op[1] not supported, put them in condition! }
-    case op of
-      A_BL,
-      A_B, A_BA, A_BLA:
-        s := #9 + gas_op2str[op] + #9;
-      A_BCTR, A_BCTRL, A_BLR, A_BLRL:
-        s := #9 + gas_op2str[op]
-    else
-      begin
-        s := cond2str(op, taicpu(hp).condition);
-        if (s[length(s)] <> #9) and
-        (taicpu(hp).ops > 0) then
-          s := s + ',';
-      end;
-    end;
-
-    if (taicpu(hp).ops > 0) and (taicpu(hp).oper[0]^.typ <> top_none) then begin
-      { first write the current contents of s, because the symbol }
-      { may be 255 characters                                     }
-      owner.AsmWrite(s);
-      s := getopstr_jmp(taicpu(hp).oper[0]^);
-    end;
-  end else begin
-    { process operands }
-    s := #9 + gas_op2str[op];
-    if taicpu(hp).ops <> 0 then begin
-      {
-        if not is_calljmp(op) then
-          sep:=','
-        else
-      }
-      sep := #9;
-      for i := 0 to taicpu(hp).ops - 1 do begin
-        // debug code
-        // writeln(s);
-        // writeln(taicpu(hp).fileinfo.line);
-        s := s + sep + getopstr(taicpu(hp).oper[i]^);
-        sep := ',';
-      end;
-    end;
-  end;
-  owner.AsmWriteLn(s);
-end;
-
-
-const
-  as_ppc_gas_info: tasminfo =
-  (
-    id: as_gas;
-
-    idtxt: 'AS';
-    asmbin: 'as';
-    asmcmd: '-a64 -o $OBJ $ASM';
-    supported_target: system_any;
-    flags: [af_allowdirect, af_needar, af_smartlink_sections];
-    labelprefix: '.L';
-    comment: '# ';
-    );
-
-
-begin
-  RegisterAssembler(as_ppc_gas_info, TPPCGNUAssembler);
-end.

+ 93 - 123
compiler/powerpc64/cgcpu.pas

@@ -99,8 +99,6 @@ type
     procedure g_concatcopy(list: TAsmList; const source, dest: treference;
       len: aint); override;
 
-    procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const
-      labelname: string; ioffset: longint); override;
   private
 
     procedure a_load_regconst_subsetreg_intern(list : TAsmList; fromsize, subsetsize: tcgsize; fromreg: tregister; const sreg: tsubsetregister; slopt: tsubsetloadopt); override;
@@ -132,10 +130,6 @@ type
       for the current procedure }
     procedure calcFirstUsedGPR(out firstgpr : TSuperRegister; out gprcount : aint);
 
-    { returns true if the offset of the given reference can not be represented by a 16 bit
-    immediate as required by some PowerPC instructions }
-    function hasLargeOffset(const ref : TReference) : Boolean; inline;
-
     { generates code to call a method with the given string name. The boolean options
      control code generation. If prependDot is true, a single dot character is prepended to
      the string, if addNOP is true a single NOP instruction is added after the call, and
@@ -177,7 +171,7 @@ end;
 
 function cgsize2string(const size : TCgSize) : string;
 const
-  cgsize_strings : array[TCgSize] of string[7] = (
+  cgsize_strings : array[TCgSize] of string[8] = (
     'OS_NO', 'OS_8', 'OS_16', 'OS_32', 'OS_64', 'OS_128', 'OS_S8', 'OS_S16', 'OS_S32',
     'OS_S64', 'OS_S128', 'OS_F32', 'OS_F64', 'OS_F80', 'OS_C64', 'OS_F128',
     'OS_M8', 'OS_M16', 'OS_M32', 'OS_M64', 'OS_M128', 'OS_MS8', 'OS_MS16', 'OS_MS32',
@@ -400,17 +394,26 @@ end;
 procedure tcgppc.init_register_allocators;
 begin
   inherited init_register_allocators;
-  rg[R_INTREGISTER] := trgcpu.create(R_INTREGISTER, R_SUBWHOLE,
-    [RS_R3, RS_R4, RS_R5, RS_R6, RS_R7, RS_R8,
-      RS_R9, RS_R10, RS_R11, RS_R12, RS_R31, RS_R30, RS_R29,
-      RS_R28, RS_R27, RS_R26, RS_R25, RS_R24, RS_R23, RS_R22,
-      RS_R21, RS_R20, RS_R19, RS_R18, RS_R17, RS_R16, RS_R15,
-      RS_R14], first_int_imreg, []);
+  if (target_info.system <> system_powerpc64_darwin) then
+    rg[R_INTREGISTER] := trgcpu.create(R_INTREGISTER, R_SUBWHOLE,
+      [RS_R3, RS_R4, RS_R5, RS_R6, RS_R7, RS_R8,
+       RS_R9, RS_R10, RS_R11, RS_R12, RS_R31, RS_R30, RS_R29,
+       RS_R28, RS_R27, RS_R26, RS_R25, RS_R24, RS_R23, RS_R22,
+       RS_R21, RS_R20, RS_R19, RS_R18, RS_R17, RS_R16, RS_R15,
+       RS_R14, RS_R13], first_int_imreg, [])
+  else
+    { special for darwin/ppc64: r2 available volatile, r13 = tls }
+    rg[R_INTREGISTER] := trgcpu.create(R_INTREGISTER, R_SUBWHOLE,
+      [RS_R2, RS_R3, RS_R4, RS_R5, RS_R6, RS_R7, RS_R8,
+       RS_R9, RS_R10, RS_R11, RS_R12, RS_R31, RS_R30, RS_R29,
+       RS_R28, RS_R27, RS_R26, RS_R25, RS_R24, RS_R23, RS_R22,
+       RS_R21, RS_R20, RS_R19, RS_R18, RS_R17, RS_R16, RS_R15,
+       RS_R14], first_int_imreg, []);	
   rg[R_FPUREGISTER] := trgcpu.create(R_FPUREGISTER, R_SUBNONE,
     [RS_F0, RS_F1, RS_F2, RS_F3, RS_F4, RS_F5, RS_F6, RS_F7, RS_F8, RS_F9,
-    RS_F10, RS_F11, RS_F12, RS_F13, RS_F31, RS_F30, RS_F29, RS_F28, RS_F27,
-      RS_F26, RS_F25, RS_F24, RS_F23, RS_F22, RS_F21, RS_F20, RS_F19, RS_F18,
-      RS_F17, RS_F16, RS_F15, RS_F14], first_fpu_imreg, []);
+     RS_F10, RS_F11, RS_F12, RS_F13, RS_F31, RS_F30, RS_F29, RS_F28, RS_F27,
+     RS_F26, RS_F25, RS_F24, RS_F23, RS_F22, RS_F21, RS_F20, RS_F19, RS_F18,
+     RS_F17, RS_F16, RS_F15, RS_F14], first_fpu_imreg, []);
 {$WARNING FIX ME}
   rg[R_MMREGISTER] := trgcpu.create(R_MMREGISTER, R_SUBNONE,
     [RS_M0, RS_M1, RS_M2], first_mm_imreg, []);
@@ -669,11 +672,11 @@ procedure tcgppc.a_load_const_reg(list: TAsmList; size: TCGSize; a: aint;
   begin
     if (lo(a) = 0) and (hi(a) <> 0) then begin
       { load only upper 32 bits, and shift }
-      load32bitconstant(list, size, hi(a), reg);
+      load32bitconstant(list, size, longint(hi(a)), reg);
       list.concat(taicpu.op_reg_reg_const(A_SLDI, reg, reg, 32));
     end else begin
       { load lower 32 bits }
-      extendssign := load32bitconstant(list, size, lo(a), reg);
+      extendssign := load32bitconstant(list, size, longint(lo(a)), reg);
       if (extendssign) and (hi(a) = 0) then
         { if upper 32 bits are zero, but loading the lower 32 bit resulted in automatic
           sign extension, clear those bits }
@@ -689,7 +692,7 @@ procedure tcgppc.a_load_const_reg(list: TAsmList; size: TCGSize; a: aint;
           - loading the lower 32 bits resulted in 0 in the upper 32 bits, and the upper
            32 bits should contain 0 }
         a_reg_alloc(list, NR_R0);
-        load32bitconstantR0(list, size, hi(a));
+        load32bitconstantR0(list, size, longint(hi(a)));
         { combine both registers }
         list.concat(taicpu.op_reg_reg_const_const(A_RLDIMI, reg, NR_R0, 32, 0));
         a_reg_dealloc(list, NR_R0);
@@ -968,7 +971,7 @@ var
       end else begin
         getmagic_unsignedN(sizeof(aWord)*8, a, u_magic, u_add, u_shift);
         { load magic in divreg }
-        cg.a_load_const_reg(current_asmdata.CurrAsmList, OS_INT, u_magic, divreg);
+        cg.a_load_const_reg(current_asmdata.CurrAsmList, OS_INT, aint(u_magic), divreg);
         current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_MULHDU, dst, src, divreg));
         if (u_add) then begin
           cg.a_op_reg_reg_reg(current_asmdata.CurrAsmList, OP_SUB, OS_INT, dst, src, divreg);
@@ -1213,8 +1216,17 @@ begin
 end;
 
 procedure tcgppc.a_jmp_name(list: TAsmList; const s: string);
+var
+  p: taicpu;
 begin
-  a_jmp_name_direct(list, s, true);
+  if (target_info.system = system_powerpc64_darwin) then
+    begin
+      p := taicpu.op_sym(A_B,get_darwin_call_stub(s));
+      p.is_jmp := true;
+      list.concat(p)
+    end
+  else
+    a_jmp_name_direct(list, s, true);
 end;
 
 procedure tcgppc.a_jmp_always(list: TAsmList; l: tasmlabel);
@@ -1631,6 +1643,12 @@ var
   tempreg : TRegister;
 
 begin
+  if (target_info.system = system_powerpc64_darwin) then
+    begin
+      inherited a_loadaddr_ref_reg(list,ref,r);
+      exit;
+    end;
+
   ref2 := ref;
   fixref(list, ref2);
   { load a symbol }
@@ -1851,83 +1869,6 @@ begin
 
 end;
 
-procedure tcgppc.g_intf_wrapper(list: TAsmList; procdef: tprocdef; const
-  labelname: string; ioffset: longint);
-
-  procedure loadvmttor11;
-  var
-    href: treference;
-  begin
-    reference_reset_base(href, NR_R3, 0);
-    cg.a_load_ref_reg(list, OS_ADDR, OS_ADDR, href, NR_R11);
-  end;
-
-  procedure op_onr11methodaddr;
-  var
-    href: treference;
-  begin
-    if (procdef.extnumber = $FFFF) then
-      Internalerror(200006139);
-    { call/jmp  vmtoffs(%eax) ; method offs }
-    reference_reset_base(href, NR_R11,
-      procdef._class.vmtmethodoffset(procdef.extnumber));
-    if not (hasLargeOffset(href)) then begin
-      list.concat(taicpu.op_reg_reg_const(A_ADDIS, NR_R11, NR_R11,
-        smallint((href.offset shr 16) + ord(smallint(href.offset and $FFFF) <
-        0))));
-      href.offset := smallint(href.offset and $FFFF);
-    end else
-      { add support for offsets > 16 bit }
-      internalerror(200510201);
-    list.concat(taicpu.op_reg_ref(A_LD, NR_R11, href));
-    { the loaded reference is a function descriptor reference, so deref again
-     (at ofs 0 there's the real pointer) }
-    {$warning ts:TODO: update GOT reference}
-    reference_reset_base(href, NR_R11, 0);
-    list.concat(taicpu.op_reg_ref(A_LD, NR_R11, href));
-
-    list.concat(taicpu.op_reg(A_MTCTR, NR_R11));
-    list.concat(taicpu.op_none(A_BCTR));
-    { NOP needed for the linker...? }
-    list.concat(taicpu.op_none(A_NOP));
-  end;
-
-var
-  make_global: boolean;
-begin
-  if (not (procdef.proctypeoption in [potype_function, potype_procedure])) then
-    Internalerror(200006137);
-  if not assigned(procdef._class) or
-    (procdef.procoptions * [po_classmethod, po_staticmethod,
-    po_methodpointer, po_interrupt, po_iocheck] <> []) then
-    Internalerror(200006138);
-  if procdef.owner.symtabletype <> ObjectSymtable then
-    Internalerror(200109191);
-
-  make_global := false;
-  if (not current_module.is_unit) or
-    (cs_create_smart in current_settings.moduleswitches) or
-    (procdef.owner.defowner.owner.symtabletype = globalsymtable) then
-    make_global := true;
-
-  if make_global then
-    List.concat(Tai_symbol.Createname_global(labelname, AT_FUNCTION, 0))
-  else
-    List.concat(Tai_symbol.Createname(labelname, AT_FUNCTION, 0));
-
-  { set param1 interface to self  }
-  g_adjust_self_value(list, procdef, ioffset);
-
-  if po_virtualmethod in procdef.procoptions then begin
-    loadvmttor11;
-    op_onr11methodaddr;
-  end else
-    {$note ts:todo add GOT change?? - think not needed :) }
-    list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol('.' + procdef.mangledname)));
-
-  List.concat(Tai_symbol_end.Createname(labelname));
-end;
-
 {***************** This is private property, keep out! :) *****************}
 
 procedure tcgppc.maybeadjustresult(list: TAsmList; op: TOpCg; size: tcgsize; dst: tregister);
@@ -2001,9 +1942,28 @@ begin
   list.concat(tai_comment.create(strpnew('fixref0 ' + ref2string(ref))));
   {$ENDIF EXTDEBUG}
 
+  if (target_info.system = system_powerpc64_darwin) and
+     assigned(ref.symbol) and
+     (ref.symbol.bind = AB_EXTERNAL) then
+    begin
+      tmpreg := g_indirect_sym_load(list,ref.symbol.name);
+      if (ref.base = NR_NO) then
+        ref.base := tmpreg
+      else if (ref.index = NR_NO) then
+        ref.index := tmpreg
+      else
+        begin
+          list.concat(taicpu.op_reg_reg_reg(A_ADD,tmpreg,ref.base,tmpreg));
+          ref.base := tmpreg;
+        end;
+      ref.symbol := nil;
+    end;
+
+
   { if we have to create PIC, add the symbol to the TOC/GOT }
   {$WARNING Hack for avoiding too long manglednames enabled!!}
-  if (cs_create_pic in current_settings.moduleswitches) and (assigned(ref.symbol) and
+  if (target_info.system <> system_powerpc64_darwin) and
+     (cs_create_pic in current_settings.moduleswitches) and (assigned(ref.symbol) and
     (length(ref.symbol.name) < MAX_GOT_SYMBOL_NAME_LENGTH_HACK)) then begin
     tmpreg := load_got_symbol(list, ref.symbol.name);
     if (ref.base = NR_NO) then
@@ -2041,11 +2001,44 @@ end;
 
 procedure tcgppc.a_load_store(list: TAsmList; op: tasmop; reg: tregister;
   ref: treference);
+
+  procedure maybefixup64bitoffset;
+    var
+      tmpreg: tregister;
+    begin
+      { for some instructions we need to check that the offset is divisible by at
+       least four. If not, add the bytes which are "off" to the base register and
+       adjust the offset accordingly }
+      case op of
+        A_LD, A_LDU, A_STD, A_STDU, A_LWA :
+           if ((ref.offset mod 4) <> 0) then begin
+            tmpreg := rg[R_INTREGISTER].getregister(list, R_SUBWHOLE);
+    
+            if (ref.base <> NR_NO) then begin
+              a_op_const_reg_reg(list, OP_ADD, OS_ADDR, ref.offset mod 4, ref.base, tmpreg);
+              ref.base := tmpreg;
+            end else begin
+              list.concat(taicpu.op_reg_const(A_LI, tmpreg, ref.offset mod 4));
+              ref.base := tmpreg;
+            end;
+            ref.offset := (ref.offset div 4) * 4;
+          end;
+      end;
+    end;
+
 var
   tmpreg, tmpreg2: tregister;
   tmpref: treference;
   largeOffset: Boolean;
 begin
+  if (target_info.system = system_powerpc64_darwin) then
+    begin
+      { darwin/ppc64 works with 32 bit relocatable symbol addresses }
+      maybefixup64bitoffset;
+      inherited a_load_store(list,op,reg,ref);
+      exit
+    end;
+
   { at this point there must not be a combination of values in the ref treference
     which is not possible to directly map to instructions of the PowerPC architecture }
   if (ref.index <> NR_NO) and ((ref.offset <> 0) or (assigned(ref.symbol))) then
@@ -2063,24 +2056,7 @@ begin
     exit;
   end;
 
-  { for some instructions we need to check that the offset is divisible by at
-   least four. If not, add the bytes which are "off" to the base register and
-   adjust the offset accordingly }
-  case op of
-    A_LD, A_LDU, A_STD, A_STDU, A_LWA :
-       if ((ref.offset mod 4) <> 0) then begin
-        tmpreg := rg[R_INTREGISTER].getregister(list, R_SUBWHOLE);
-
-        if (ref.base <> NR_NO) then begin
-          a_op_const_reg_reg(list, OP_ADD, OS_ADDR, ref.offset mod 4, ref.base, tmpreg);
-          ref.base := tmpreg;
-        end else begin
-          list.concat(taicpu.op_reg_const(A_LI, tmpreg, ref.offset mod 4));
-          ref.base := tmpreg;
-        end;
-        ref.offset := (ref.offset div 4) * 4;
-      end;
-  end;
+  maybefixup64bitoffset;
   {$IFDEF EXTDEBUG}
   list.concat(tai_comment.create(strpnew('a_load_store1 ' + BoolToStr(ref.refaddr = addr_pic))));
   {$ENDIF EXTDEBUG}
@@ -2185,12 +2161,6 @@ begin
   end;
 end;
 
-function tcgppc.hasLargeOffset(const ref : TReference) : Boolean; {$ifdef ver2_0}inline;{$endif}
-begin
-  { this rather strange calculation is required because offsets of TReferences are unsigned }
-  result := aword(ref.offset-low(smallint)) > high(smallint)-low(smallint);
-end;
-
 procedure tcgppc.loadConstantPIC(list : TAsmList; size : TCGSize; a : aint; reg : TRegister);
 var
   l: tasmsymbol;

+ 1 - 1
compiler/powerpc64/cpunode.pas

@@ -40,7 +40,7 @@ uses
   //       nppcflw,
   //       nppcmem,
   ngppcset,
-  ngppcinl, nppcinl,
+  ngppcinl,
   //       nppcopt,
   nppcmat,
   nppccnv,

+ 3 - 1
compiler/powerpc64/cpupara.pas

@@ -68,7 +68,9 @@ uses
 function tppcparamanager.get_volatile_registers_int(calloption:
   tproccalloption): tcpuregisterset;
 begin
-  result := [RS_R3..RS_R12];
+  result := [RS_R0,RS_R3..RS_R12];
+  if (target_info.system = system_powerpc64_darwin) then
+    include(result,RS_R2);
 end;
 
 function tppcparamanager.get_volatile_registers_fpu(calloption:

+ 8 - 1
compiler/powerpc64/cputarg.pas

@@ -1,7 +1,7 @@
 {
     Copyright (c) 2001-2002 by Peter Vreman
 
-    Includes the powerpc dependent target units
+    Includes the powerpc64 dependent target units
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -38,6 +38,9 @@ implementation
     {$ifndef NOTARGETLINUX}
       ,t_linux
     {$endif}
+    {$ifndef NOTARGETBSD}
+      ,t_bsd
+    {$endif}
 
 {**************************************
              Assemblers
@@ -60,6 +63,10 @@ implementation
 **************************************}
 
 { stabs debug info are not supported, so do not include them here}
+{ they are supported on darwin/ppc64 }
+  {$ifndef NoDbgDwarf}
+      ,dbgstabs
+  {$endif NoDbgDwarf}
   {$ifndef NoDbgDwarf}
       ,dbgdwarf
   {$endif NoDbgDwarf}

+ 1 - 1
compiler/powerpc64/itcpugas.pas

@@ -147,7 +147,7 @@ begin
   p := findreg_by_number(r);
   if p <> 0 then
     if (cs_create_smart in current_settings.moduleswitches) and
-      (target_info.system <> system_powerpc_darwin) then
+      not(target_info.system = system_powerpc64_darwin) then
       result := gas_regname_short_table[p]
     else
       result := gas_regname_table[p]

+ 0 - 79
compiler/powerpc64/nppcinl.pas

@@ -1,79 +0,0 @@
-{
-    Copyright (c) 1998-2007 by Free Pascal development team
-
-    Generate PowerPC64 inline nodes
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    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.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- ****************************************************************************
-}
-unit nppcinl;
-
-{$i fpcdefs.inc}
-
-interface
-
-    uses
-       node,ninl,ncginl,ngppcinl;
-
-    type
-       tppc64inlinenode = class(tgppcinlinenode)
-         function first_sqrt_real: tnode; override;
-         procedure second_sqrt_real; override;
-       end;
-
-implementation
-
-    uses
-      cutils,globals,verbose,
-      aasmtai,aasmdata,aasmcpu,
-      symconst,symdef,
-      defutil,
-      cgbase,pass_2,
-      cpubase,ncgutil,
-      cgutils,cgobj,rgobj;
-
-
-{*****************************************************************************
-                              tppc64inlinenode
-*****************************************************************************}
-function tppc64inlinenode.first_sqrt_real : tnode;
-begin
-  expectloc:=LOC_FPUREGISTER;
-  registersint:=left.registersint;
-  registersfpu:=max(left.registersfpu,1);
-  first_sqrt_real := nil;
-end;
-
-procedure tppc64inlinenode.second_sqrt_real;
-begin
-  location.loc:=LOC_FPUREGISTER;
-  load_fpu_location;
-  case left.location.size of
-  OS_F32:
-    current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_FSQRTS,location.register,
-      left.location.register));
-  OS_F64:
-    current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_FSQRT,location.register,
-      left.location.register));
-  else
-    inherited;
-  end;
-end;
-
-
-begin
-   cinlinenode:=tppc64inlinenode;
-end.

+ 12 - 0
compiler/powerpc64/rappcgas.pas

@@ -116,6 +116,18 @@ begin
         oper.opr.ref.refaddr := addr_highest                
       else
         Message(asmr_e_invalid_reference_syntax);
+
+      { darwin/ppc64's relocation symbols are 32 bits }
+      if (target_info.system = system_powerpc64_darwin) then
+        case oper.opr.ref.refaddr of
+          addr_low:
+            oper.opr.ref.refaddr:=addr_lo;
+          addr_higha:
+            oper.opr.ref.refaddr:=addr_hi;
+          else if (oper.opr.ref.refaddr<>addr_no) then
+            Message(asmr_e_invalid_reference_syntax);
+        end;
+
       Consume(AS_ID);
     end
     else

+ 136 - 92
compiler/powerpc/agppcgas.pas → compiler/ppcgen/agppcgas.pas

@@ -1,7 +1,7 @@
 {
     Copyright (c) 1998-2002 by Florian Klaempfl
 
-    This unit implements an asm for the PowerPC
+    This unit the GAS asm writers for PowerPC/PowerPC64
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -19,87 +19,65 @@
 
  ****************************************************************************
 }
-{ This unit implements the GNU Assembler writer for the PowerPC
-}
+
+{****************************************************************************}
+{                  Helper routines for Instruction Writer                    }
+{****************************************************************************}
 
 unit agppcgas;
 
 {$i fpcdefs.inc}
 
   interface
-
+  
     uses
        aasmbase,
        aasmtai,aasmdata,
        aggas,
-       cpubase,
+       cpubase,cgutils,
        globtype;
 
-    type
-      TPPCGNUAssembler=class(TGNUassembler)
-        constructor create(smart: boolean); override;
-        procedure WriteExtraHeader;override;
-      end;
-
-      TPPCAppleGNUAssembler=class(TAppleGNUassembler)
-        constructor create(smart: boolean); override;
-      end;
+  type
+    TPPCInstrWriter=class(TCPUInstrWriter)
+       procedure WriteInstruction(hp : tai);override;
+    end;
 
+    TPPCGNUAssembler=class(TGNUassembler)
+      constructor create(smart: boolean); override;
+      procedure WriteExtraHeader; override;
+    end;
 
-     TPPCInstrWriter=class(TCPUInstrWriter)
-        procedure WriteInstruction(hp : tai);override;
-     end;
+    TPPCAppleGNUAssembler=class(TAppleGNUassembler)
+      constructor create(smart: boolean); override;
+      function MakeCmdLine: TCmdStr; override;
+    end;
 
+    function getreferencestring(var ref : treference) : string;
+    function getopstr_jmp(const o:toper) : string;
+    function getopstr(const o:toper) : string;
+    function branchmode(o: tasmop): string[4];
+    function cond2str(op: tasmop; c: tasmcond): string;  
 
   implementation
 
     uses
        cutils,globals,verbose,
-       cgbase,cgutils,systems,
+       cgbase,systems,
        assemble,
-       itcpugas,
+       itcpugas,cpuinfo,
        aasmcpu;
 
-{****************************************************************************}
-{                         GNU PPC Assembler writer                           }
-{****************************************************************************}
-
-    constructor TPPCGNUAssembler.create(smart: boolean);
-      begin
-        inherited create(smart);
-        InstrWriter := TPPCInstrWriter.create(self);
-      end;
-
-
-    procedure TPPCGNUAssembler.WriteExtraHeader;
-      var
-         i : longint;
-      begin
-        for i:=0 to 31 do
-          AsmWriteln(#9'.set'#9'r'+tostr(i)+','+tostr(i));
-        for i:=0 to 31 do
-          AsmWriteln(#9'.set'#9'f'+tostr(i)+','+tostr(i));
-      end;
-
-
-{****************************************************************************}
-{                      GNU/Apple PPC Assembler writer                        }
-{****************************************************************************}
-
-    constructor TPPCAppleGNUAssembler.create(smart: boolean);
-      begin
-        inherited create(smart);
-        InstrWriter := TPPCInstrWriter.create(self);
-      end;
-
-
-{****************************************************************************}
-{                  Helper routines for Instruction Writer                    }
-{****************************************************************************}
-
-  const
-    refaddr2str: array[trefaddr] of string[3] = ('','','@ha','@l','');
-    refaddr2str_darwin: array[trefaddr] of string[4] = ('','','ha16','lo16','');
+{$ifdef cpu64bit}
+    const
+      refaddr2str: array[trefaddr] of string[9] = ('', '', 'ha16','lo16','', '@l', '@h', '@higher', '@highest', '@ha', '@highera', '@highesta');
+      verbose_refaddrs = [addr_lo,addr_hi,addr_low, addr_high, addr_higher, addr_highest, addr_higha, addr_highera, addr_highesta];
+      refaddr2str_darwin: array[trefaddr] of string[4] = ('','','ha16','lo16','','@err', '@err', '@err', '@err', '@err', '@err', '@err');
+{$else cpu64bit}
+    const
+      refaddr2str: array[trefaddr] of string[3] = ('','','@ha','@l','');
+      refaddr2str_darwin: array[trefaddr] of string[4] = ('','','ha16','lo16','');
+      verbose_refaddrs = [addr_lo,addr_hi];
+{$endif cpu64bit}
 
 
     function getreferencestring(var ref : treference) : string;
@@ -110,12 +88,12 @@ unit agppcgas;
         begin
           if ((offset < -32768) or (offset > 32767)) and
              (refaddr = addr_no) then
-            internalerror(19991);
+            internalerror(2006052501);
           if (refaddr = addr_no) then
             s := ''
           else
             begin
-              if target_info.system = system_powerpc_darwin then
+              if target_info.system in [system_powerpc_darwin,system_powerpc64_darwin] then
                 s := refaddr2str_darwin[refaddr]
               else
                 s :='';
@@ -138,12 +116,15 @@ unit agppcgas;
                 s:=s+tostr(offset);
             end;
 
-           if (refaddr in [addr_lo,addr_hi]) then
+           if (refaddr in verbose_refaddrs) then
              begin
                s := s+')';
-               if (target_info.system <> system_powerpc_darwin) then
+               if not(target_info.system in [system_powerpc_darwin,system_powerpc64_darwin]) then
                  s := s+refaddr2str[refaddr];
              end;
+{$ifdef cpu64bit}
+           if (refaddr = addr_pic) then s := s + ')';
+{$endif cpu64bit}
 
            if (index=NR_NO) and (base<>NR_NO) then
              begin
@@ -159,12 +140,12 @@ unit agppcgas;
                if (offset=0) then
                  s:=s+gas_regname(base)+','+gas_regname(index)
                else
-                 internalerror(19992);
+                 internalerror(2006052502);
              end;
         end;
       getreferencestring:=s;
     end;
-
+    
 
     function getopstr_jmp(const o:toper) : string;
     var
@@ -195,6 +176,7 @@ unit agppcgas;
       end;
     end;
 
+
     function getopstr(const o:toper) : string;
     var
       hs : string;
@@ -222,6 +204,7 @@ unit agppcgas;
       end;
     end;
 
+
     function branchmode(o: tasmop): string[4];
       var tempstr: string[4];
       begin
@@ -239,6 +222,7 @@ unit agppcgas;
         branchmode := tempstr;
       end;
 
+
     function cond2str(op: tasmop; c: tasmcond): string;
     { note: no checking is performed whether the given combination of }
     { conditions is valid                                             }
@@ -364,37 +348,97 @@ unit agppcgas;
       owner.AsmWriteLn(s);
     end;
 
+
+{****************************************************************************}
+{                         GNU PPC Assembler writer                           }
+{****************************************************************************}
+
+    constructor TPPCGNUAssembler.create(smart: boolean);
+      begin
+        inherited create(smart);
+        InstrWriter := TPPCInstrWriter.create(self);
+      end;
+
+
+    procedure TPPCGNUAssembler.WriteExtraHeader;
+      var
+         i : longint;
+      begin
+        for i:=0 to 31 do
+          AsmWriteln(#9'.set'#9'r'+tostr(i)+','+tostr(i));
+        for i:=0 to 31 do
+          AsmWriteln(#9'.set'#9'f'+tostr(i)+','+tostr(i));
+      end;
+
+
+{****************************************************************************}
+{                      GNU/Apple PPC Assembler writer                        }
+{****************************************************************************}
+
+    constructor TPPCAppleGNUAssembler.create(smart: boolean);
+      begin
+        inherited create(smart);
+        InstrWriter := TPPCInstrWriter.create(self);
+      end;
+
+
+    function TPPCAppleGNUAssembler.MakeCmdLine: TCmdStr;
+      begin
+        result := inherited MakeCmdLine;
+{$ifdef cpu64bit}
+        Replace(result,'$ARCH','ppc64')
+{$else cpu64bit}
+        case current_settings.cputype of
+          cpu_PPC7400:
+            Replace(result,'$ARCH','ppc7400');
+          cpu_PPC970:
+            Replace(result,'$ARCH','ppc970');
+          else
+            Replace(result,'$ARCH','ppc')
+        end;
+{$endif cpu64bit}
+      end;
+
+
+
+
+
 {*****************************************************************************
                                   Initialize
 *****************************************************************************}
 
-    const
-       as_ppc_gas_info : tasminfo =
-          (
-            id     : as_gas;
-
-            idtxt  : 'AS';
-            asmbin : 'as';
-            asmcmd : '-o $OBJ $ASM';
-            supported_target : system_any;
-            flags : [af_allowdirect,af_needar,af_smartlink_sections];
-            labelprefix : '.L';
-            comment : '# ';
-          );
-
-
-       as_ppc_gas_darwin_powerpc_info : tasminfo =
-          (
-            id     : as_darwin;
-
-            idtxt  : 'AS-Darwin';
-            asmbin : 'as';
-            asmcmd : '-o $OBJ $ASM -arch ppc';
-            supported_target : system_any;
-            flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf];
-            labelprefix : 'L';
-            comment : '# ';
-          );
+  const
+    as_ppc_gas_info : tasminfo =
+       (
+         id     : as_gas;
+
+         idtxt  : 'AS';
+         asmbin : 'as';
+{$ifdef cpu64bit}
+         asmcmd : '-o $OBJ $ASM';
+{$else cpu64bit}
+         asmcmd: '-a64 -o $OBJ $ASM';
+{$endif cpu64bit}
+         supported_target : system_any;
+         flags : [af_allowdirect,af_needar,af_smartlink_sections];
+         labelprefix : '.L';
+         comment : '# ';
+       );
+
+
+    as_ppc_gas_darwin_powerpc_info : tasminfo =
+       (
+         id     : as_darwin;
+
+         idtxt  : 'AS-Darwin';
+         asmbin : 'as';
+         asmcmd : '-o $OBJ $ASM -arch $ARCH';
+         supported_target : system_any;
+         flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf];
+         labelprefix : 'L';
+         comment : '# ';
+       );
+
 
 begin
   RegisterAssembler(as_ppc_gas_info,TPPCGNUAssembler);

+ 283 - 1
compiler/ppcgen/cgppc.pas

@@ -45,6 +45,8 @@ unit cgppc;
         procedure a_load_reg_ref(list: TAsmList; fromsize, tosize: TCGSize;
           reg: tregister; const ref: treference); override;
 
+        procedure a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);override;
+
         { fpu move instructions }
         procedure a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister); override;
         procedure a_loadfpu_ref_reg(list: TAsmList; fromsize, tosize: tcgsize; const ref: treference; reg: tregister); override;
@@ -57,16 +59,24 @@ unit cgppc;
         procedure g_profilecode(list: TAsmList); override;
 
         procedure a_jmp_cond(list : TAsmList;cond : TOpCmp;l: tasmlabel);
+
+        procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
        protected
         function  get_darwin_call_stub(const s: string): tasmsymbol;
         procedure a_load_subsetref_regs_noindex(list: TAsmList; subsetsize: tcgsize; loadbitsize: byte; const sref: tsubsetreference; valuereg, extra_value_reg: tregister); override;
         function  fixref(list: TAsmList; var ref: treference): boolean; virtual; abstract;
-        procedure a_load_store(list:TAsmList;op: tasmop;reg:tregister;ref: treference);virtual;abstract;
+        { contains the common code of a_load_reg_ref and a_load_ref_reg }
+        procedure a_load_store(list:TAsmList;op: tasmop;reg:tregister;ref: treference);virtual;
 
         { creates the correct branch instruction for a given combination }
         { of asmcondflags and destination addressing mode                }
         procedure a_jmp(list: TAsmList; op: tasmop;
                         c: tasmcondflag; crval: longint; l: tasmlabel);
+
+        { returns true if the offset of the given reference can not be  }
+        { represented by a 16 bit immediate as required by some PowerPC }
+        { instructions                                                  }
+        function hasLargeOffset(const ref : TReference) : Boolean; inline;
      end;
 
   const
@@ -82,6 +92,12 @@ unit cgppc;
        rgobj,tgobj,cpupi,procinfo,paramgr;
 
 
+    function tcgppcgen.hasLargeOffset(const ref : TReference) : Boolean;
+      begin
+        result := aword(ref.offset-low(smallint)) > high(smallint)-low(smallint);
+      end;
+
+
     procedure tcgppcgen.a_param_const(list: TAsmList; size: tcgsize; a: aint; const
       paraloc: tcgpara);
     var
@@ -173,6 +189,90 @@ unit cgppc;
       end;
 
 
+     procedure tcgppcgen.a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);
+
+       var
+         ref2, tmpref: treference;
+
+       begin
+         ref2 := ref;
+         fixref(list,ref2);
+         if assigned(ref2.symbol) then
+           begin
+             if target_info.system = system_powerpc_macos then
+               begin
+                 if macos_direct_globals then
+                   begin
+                     reference_reset(tmpref);
+                     tmpref.offset := ref2.offset;
+                     tmpref.symbol := ref2.symbol;
+                     tmpref.base := NR_NO;
+                     list.concat(taicpu.op_reg_reg_ref(A_ADDI,r,NR_RTOC,tmpref));
+                   end
+                 else
+                   begin
+                     reference_reset(tmpref);
+                     tmpref.symbol := ref2.symbol;
+                     tmpref.offset := 0;
+                     tmpref.base := NR_RTOC;
+                     list.concat(taicpu.op_reg_ref(A_LWZ,r,tmpref));
+
+                     if ref2.offset <> 0 then
+                       begin
+                         reference_reset(tmpref);
+                         tmpref.offset := ref2.offset;
+                         tmpref.base:= r;
+                         list.concat(taicpu.op_reg_ref(A_LA,r,tmpref));
+                       end;
+                   end;
+
+                 if ref2.base <> NR_NO then
+                   list.concat(taicpu.op_reg_reg_reg(A_ADD,r,r,ref2.base));
+
+                 //list.concat(tai_comment.create(strpnew('*** a_loadaddr_ref_reg')));
+               end
+             else
+               begin
+
+                 { add the symbol's value to the base of the reference, and if the }
+                 { reference doesn't have a base, create one                       }
+                 reference_reset(tmpref);
+                 tmpref.offset := ref2.offset;
+                 tmpref.symbol := ref2.symbol;
+                 tmpref.relsymbol := ref2.relsymbol;
+                 tmpref.refaddr := addr_hi;
+                 if ref2.base<> NR_NO then
+                   begin
+                     list.concat(taicpu.op_reg_reg_ref(A_ADDIS,r,
+                       ref2.base,tmpref));
+                   end
+                 else
+                   list.concat(taicpu.op_reg_ref(A_LIS,r,tmpref));
+                 tmpref.base := NR_NO;
+                 tmpref.refaddr := addr_lo;
+                 { can be folded with one of the next instructions by the }
+                 { optimizer probably                                     }
+                 list.concat(taicpu.op_reg_reg_ref(A_ADDI,r,r,tmpref));
+               end
+           end
+         else if ref2.offset <> 0 Then
+           if ref2.base <> NR_NO then
+             a_op_const_reg_reg(list,OP_ADD,OS_ADDR,ref2.offset,ref2.base,r)
+           { FixRef makes sure that "(ref.index <> R_NO) and (ref.offset <> 0)" never}
+           { occurs, so now only ref.offset has to be loaded                         }
+           else
+             a_load_const_reg(list,OS_ADDR,ref2.offset,r)
+         else if ref2.index <> NR_NO Then
+           list.concat(taicpu.op_reg_reg_reg(A_ADD,r,ref2.base,ref2.index))
+         else if (ref2.base <> NR_NO) and
+                 (r <> ref2.base) then
+           a_load_reg_reg(list,OS_ADDR,OS_ADDR,ref2.base,r)
+         else
+           list.concat(taicpu.op_reg_const(A_LI,r,0));
+       end;
+
+
+
     { calling a procedure by address }
     procedure tcgppcgen.a_call_reg(list : TAsmList;reg: tregister);
       begin
@@ -421,6 +521,188 @@ unit cgppc;
 
 
 
+    procedure tcgppcgen.g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);
+
+        procedure loadvmttor11;
+        var
+          href : treference;
+        begin
+          reference_reset_base(href,NR_R3,0);
+          cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,href,NR_R11);
+        end;
+
+
+        procedure op_onr11methodaddr;
+        var
+          href : treference;
+        begin
+          if (procdef.extnumber=$ffff) then
+            Internalerror(200006139);
+          { call/jmp  vmtoffs(%eax) ; method offs }
+          reference_reset_base(href,NR_R11,procdef._class.vmtmethodoffset(procdef.extnumber));
+          if hasLargeOffset(href) then
+            begin
+{$ifdef cpu64}
+              if (longint(href.offset) <> href.offset) then
+                { add support for offsets > 32 bit }
+                internalerror(200510201);
+{$endif cpu64}
+              list.concat(taicpu.op_reg_reg_const(A_ADDIS,NR_R11,NR_R11,
+                smallint((href.offset shr 16)+ord(smallint(href.offset and $ffff) < 0))));
+              href.offset := smallint(href.offset and $ffff);
+            end;
+          a_load_ref_reg(list,OS_ADDR,OS_ADDR,href,NR_R11);
+          if (target_info.system = system_powerpc64_linux) then
+            begin
+              reference_reset_base(href, NR_R11, 0);
+              a_load_ref_reg(list, OS_ADDR, OS_ADDR, href, NR_R11);
+            end;
+          list.concat(taicpu.op_reg(A_MTCTR,NR_R11));
+          list.concat(taicpu.op_none(A_BCTR));
+          if (target_info.system = system_powerpc64_linux) then
+            list.concat(taicpu.op_none(A_NOP));
+        end;
+
+
+      var
+        make_global : boolean;
+      begin
+        if not(procdef.proctypeoption in [potype_function,potype_procedure]) then
+          Internalerror(200006137);
+        if not assigned(procdef._class) or
+           (procdef.procoptions*[po_classmethod, po_staticmethod,
+             po_methodpointer, po_interrupt, po_iocheck]<>[]) then
+          Internalerror(200006138);
+        if procdef.owner.symtabletype<>ObjectSymtable then
+          Internalerror(200109191);
+
+        make_global:=false;
+        if (not current_module.is_unit) or
+           (cs_create_smart in current_settings.moduleswitches) or
+           (procdef.owner.defowner.owner.symtabletype=globalsymtable) then
+          make_global:=true;
+
+        if make_global then
+          List.concat(Tai_symbol.Createname_global(labelname,AT_FUNCTION,0))
+        else
+          List.concat(Tai_symbol.Createname(labelname,AT_FUNCTION,0));
+
+        { set param1 interface to self  }
+        g_adjust_self_value(list,procdef,ioffset);
+
+        { case 4 }
+        if po_virtualmethod in procdef.procoptions then
+          begin
+            loadvmttor11;
+            op_onr11methodaddr;
+          end
+        { case 0 }
+        else
+          case target_info.system of
+            system_powerpc_darwin,
+            system_powerpc64_darwin:
+              list.concat(taicpu.op_sym(A_B,get_darwin_call_stub(procdef.mangledname)));
+            system_powerpc64_linux:
+              {$note ts:todo add GOT change?? - think not needed :) }
+              list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol('.' + procdef.mangledname)));
+            else
+              list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol(procdef.mangledname)))
+          end;
+        List.concat(Tai_symbol_end.Createname(labelname));
+      end;
+
+
+    procedure tcgppcgen.a_load_store(list:TAsmList;op: tasmop;reg:tregister;
+       ref: treference);
+
+      var
+        tmpreg: tregister;
+        tmpref: treference;
+        largeOffset: Boolean;
+
+      begin
+        tmpreg := NR_NO;
+        largeOffset:= hasLargeOffset(ref);
+
+        if target_info.system = system_powerpc_macos then
+          begin
+
+            if assigned(ref.symbol) then
+              begin {Load symbol's value}
+                tmpreg := rg[R_INTREGISTER].getregister(list,R_SUBWHOLE);
+
+                reference_reset(tmpref);
+                tmpref.symbol := ref.symbol;
+                tmpref.base := NR_RTOC;
+
+                if macos_direct_globals then
+                  list.concat(taicpu.op_reg_ref(A_LA,tmpreg,tmpref))
+                else
+                  list.concat(taicpu.op_reg_ref(A_LWZ,tmpreg,tmpref));
+              end;
+
+            if largeOffset then
+              begin {Add hi part of offset}
+                reference_reset(tmpref);
+
+                if Smallint(Lo(ref.offset)) < 0 then
+                  tmpref.offset := Hi(ref.offset) + 1 {Compensate when lo part is negative}
+                else
+                  tmpref.offset := Hi(ref.offset);
+
+                if (tmpreg <> NR_NO) then
+                  list.concat(taicpu.op_reg_reg_ref(A_ADDIS,tmpreg, tmpreg,tmpref))
+                else
+                  begin
+                    tmpreg := rg[R_INTREGISTER].getregister(list,R_SUBWHOLE);
+                    list.concat(taicpu.op_reg_ref(A_LIS,tmpreg,tmpref));
+                  end;
+              end;
+
+            if (tmpreg <> NR_NO) then
+              begin
+                {Add content of base register}
+                if ref.base <> NR_NO then
+                  list.concat(taicpu.op_reg_reg_reg(A_ADD,tmpreg,
+                    ref.base,tmpreg));
+
+                {Make ref ready to be used by op}
+                ref.symbol:= nil;
+                ref.base:= tmpreg;
+                if largeOffset then
+                  ref.offset := Smallint(Lo(ref.offset));
+
+                list.concat(taicpu.op_reg_ref(op,reg,ref));
+                //list.concat(tai_comment.create(strpnew('*** a_load_store indirect global')));
+              end
+            else
+              list.concat(taicpu.op_reg_ref(op,reg,ref));
+          end
+        else {if target_info.system <> system_powerpc_macos}
+          begin
+            if assigned(ref.symbol) or
+               largeOffset then
+              begin
+                tmpreg := rg[R_INTREGISTER].getregister(list,R_SUBWHOLE);
+                reference_reset(tmpref);
+                tmpref.symbol := ref.symbol;
+                tmpref.relsymbol := ref.relsymbol;
+                tmpref.offset := ref.offset;
+                tmpref.refaddr := addr_hi;
+                if ref.base <> NR_NO then
+                  list.concat(taicpu.op_reg_reg_ref(A_ADDIS,tmpreg,
+                    ref.base,tmpref))
+                else
+                  list.concat(taicpu.op_reg_ref(A_LIS,tmpreg,tmpref));
+                ref.base := tmpreg;
+                ref.refaddr := addr_lo;
+                list.concat(taicpu.op_reg_ref(op,reg,ref));
+              end
+            else
+              list.concat(taicpu.op_reg_ref(op,reg,ref));
+          end;
+      end;
+
 
 end.
 

+ 48 - 11
compiler/ppcgen/ngppcinl.pas

@@ -34,8 +34,10 @@ interface
             so that the code generator will actually generate
             these nodes.
           }
+          function first_sqrt_real: tnode; override;
           function first_abs_real: tnode; override;
           function first_sqr_real: tnode; override;
+          procedure second_sqrt_real; override;
           procedure second_abs_real; override;
           procedure second_sqr_real; override;
           procedure second_prefetch;override;
@@ -51,7 +53,7 @@ implementation
       symconst,symdef,
       defutil,
       cgbase,pass_2,
-      cpubase,ncgutil,
+      cpubase,cpuinfo,ncgutil,
       cgutils,cgobj,rgobj;
 
 
@@ -59,7 +61,21 @@ implementation
                               tgppcinlinenode
 *****************************************************************************}
 
-     function tgppcinlinenode.first_abs_real : tnode;
+    function tgppcinlinenode.first_sqrt_real : tnode;
+      begin
+        if (current_settings.cputype >= cpu_PPC970) then
+          begin
+            expectloc:=LOC_FPUREGISTER;
+            registersint:=left.registersint;
+            registersfpu:=max(left.registersfpu,1);
+            first_sqrt_real := nil;
+          end
+        else
+          result:=inherited first_sqrt_real;
+      end;
+
+    
+    function tgppcinlinenode.first_abs_real : tnode;
       begin
         expectloc:=LOC_FPUREGISTER;
         registersint:=left.registersint;
@@ -70,6 +86,7 @@ implementation
         first_abs_real := nil;
       end;
 
+
      function tgppcinlinenode.first_sqr_real : tnode;
       begin
         expectloc:=LOC_FPUREGISTER;
@@ -82,15 +99,34 @@ implementation
       end;
 
 
-       { load the FPU into the an fpu register }
-       procedure tgppcinlinenode.load_fpu_location;
-         begin
-           location_reset(location,LOC_FPUREGISTER,def_cgsize(resultdef));
-           secondpass(left);
-           location_force_fpureg(current_asmdata.CurrAsmList,left.location,true);
-           location.loc := LOC_FPUREGISTER;
-           location.register := cg.getfpuregister(current_asmdata.CurrAsmList,OS_F64);
-         end;
+     { load the FPU into the an fpu register }
+     procedure tgppcinlinenode.load_fpu_location;
+       begin
+         location_reset(location,LOC_FPUREGISTER,def_cgsize(resultdef));
+         secondpass(left);
+         location_force_fpureg(current_asmdata.CurrAsmList,left.location,true);
+         location.loc := LOC_FPUREGISTER;
+         location.register := cg.getfpuregister(current_asmdata.CurrAsmList,OS_F64);
+       end;
+
+
+    procedure tgppcinlinenode.second_sqrt_real;
+      begin
+        if (current_settings.cputype < cpu_PPC970) then
+          internalerror(2007020910);
+        location.loc:=LOC_FPUREGISTER;
+        load_fpu_location;
+        case left.location.size of
+          OS_F32:
+            current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_FSQRTS,location.register,
+              left.location.register));
+          OS_F64:
+            current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_FSQRT,location.register,
+              left.location.register));
+          else
+            inherited;
+        end;
+      end;
 
 
      procedure tgppcinlinenode.second_abs_real;
@@ -101,6 +137,7 @@ implementation
            left.location.register));
        end;
 
+
      procedure tgppcinlinenode.second_sqr_real;
        var
          op: tasmop;

+ 1 - 1
compiler/ppcgen/ngppcset.pas

@@ -65,7 +65,7 @@ implementation
 
     function tgppccasenode.has_jumptable : boolean;
       begin
-        has_jumptable:=true;
+        has_jumptable:=(target_info.system <> system_powerpc64_darwin);
       end;
 
 

+ 5 - 1
compiler/psub.pas

@@ -102,7 +102,8 @@ implementation
        { codegen }
        tgobj,cgbase,cgobj,dbgbase,
        ncgutil,regvars,
-       opttail
+       opttail,
+       optcse
 {$if defined(arm) or defined(powerpc) or defined(powerpc64)}
        ,aasmcpu
 {$endif arm}
@@ -754,6 +755,9 @@ implementation
           (pi_is_recursive in flags) then
           do_opttail(code,procdef);
 
+        if cs_opt_nodecse in current_settings.optimizerswitches then
+          do_optcse(code);
+
         { add implicit entry and exit code }
         add_entry_exit_code;
 

+ 3 - 1
compiler/symconst.pas

@@ -353,7 +353,9 @@ type
     vo_has_explicit_paraloc,
     vo_is_syscall_lib,
     vo_has_mangledname,
-    vo_is_typed_const
+    vo_is_typed_const,
+    vo_is_range_check,
+    vo_is_overflow_check
   );
   tvaroptions=set of tvaroption;
 

+ 1 - 1
compiler/symdef.pas

@@ -814,7 +814,7 @@ implementation
         if suffix<>'' then
           result:=result+'_'+suffix;
         { the Darwin assembler assumes that all symbols starting with 'L' are local }
-        if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) and
+        if (target_info.system in systems_darwin) and
            (result[1] = 'L') then
           result := '_' + result;
       end;

+ 22 - 2
compiler/systems.pas

@@ -139,9 +139,15 @@ interface
              system_arm_embedded,       { 57 }
              system_powerpc64_embedded, { 58 }
              system_i386_symbian,       { 59 }
-             system_arm_symbian         { 60 }
+             system_arm_symbian,        { 60 }
+             system_x86_64_darwin       { 61 }
        );
 
+     const
+       systems_darwin = [system_powerpc_darwin,system_i386_darwin,
+                         system_powerpc64_darwin,system_x86_64_darwin];
+
+     type
        tasm = (as_none
              ,as_gas                   { standard gnu assembler }
              ,as_i386_as_aout
@@ -813,6 +819,10 @@ begin
     default_target(system_x86_64_freebsd);
     {$define default_target_set}
    {$endif}
+   {$ifdef darwin}
+    default_target(system_x86_64_darwin);
+    {$define source_system_set}
+   {$endif}
   {$endif cpux86_64}
   { default is linux }
   {$ifndef default_target_set}
@@ -860,9 +870,19 @@ begin
     default_target(source_info.system);
     {$define default_target_set}
   {$else cpupowerpc64}
+    {$ifdef darwin}
+     default_target(system_powerpc64_darwin);
+     {$define default_target_set}
+    {$endif}
+    {$ifdef linux}
+     default_target(system_powerpc64_linux);
+     {$define default_target_set}
+    {$endif}
+  {$endif cpupowerpc64}
+  {$ifndef default_target_set}
     default_target(system_powerpc64_linux);
     {$define default_target_set}
-  {$endif cpupowerpc64}
+  {$endif}
 {$endif POWERPC64}
 
 {$ifdef sparc}

+ 70 - 2
compiler/systems/i_bsd.pas

@@ -512,6 +512,69 @@ unit i_bsd;
             abi         : abi_default;
           );
 
+
+
+       system_powerpc64_darwin_info  : tsysteminfo =
+          (
+            system       : system_powerpc64_darwin;
+            name         : 'Darwin for PowerPC64';
+            shortname    : 'Darwin';
+            flags        : [tf_p_ext_support,tf_files_case_sensitive,tf_smartlink_sections,tf_dwarf_relative_addresses,tf_dwarf_only_local_labels];
+            cpu          : cpu_powerpc64;
+            unit_env     : 'BSDUNITS';
+            extradefines : 'UNIX;BSD;HASUNIX';
+            exeext       : '';
+            defext       : '.def';
+            scriptext    : '.sh';
+            smartext     : '.sl';
+            unitext      : '.ppu';
+            unitlibext   : '.ppl';
+            asmext       : '.s';
+            objext       : '.o';
+            resext       : '.res';
+            resobjext    : '.or';
+            sharedlibext : '.dylib';
+            staticlibext : '.a';
+            staticlibprefix : 'libp';
+            sharedlibprefix : 'lib';
+            sharedClibext : '.dylib';
+            staticClibext : '.a';
+            staticClibprefix : 'lib';
+            sharedClibprefix : 'lib';
+            Cprefix      : '_';
+            newline      : #10;
+            dirsep       : '/';
+            assem        : as_darwin;
+            assemextern  : as_darwin;
+            link         : nil;
+            linkextern   : nil;
+            ar           : ar_gnu_ar;
+            res          : res_none;
+            dbg          : dbg_dwarf2;
+            script       : script_unix;
+            endian       : endian_big;
+            alignment    :
+              (
+                procalign       : 16;
+                loopalign       : 4;
+                jumpalign       : 0;
+                constalignmin   : 4;
+                constalignmax   : 8;
+                varalignmin     : 4;
+                varalignmax     : 8;
+                localalignmin   : 4;
+                localalignmax   : 8;
+                recordalignmin  : 0;
+                recordalignmax  : 2;
+                maxCrecordalign : 8
+              );
+            first_parm_offset : 48;
+            stacksize   : 262144;
+            abi : abi_powerpc_aix;
+          );
+
+
+
   implementation
 
 initialization
@@ -539,12 +602,17 @@ initialization
      set_source_info(system_m68k_NetBSD_info);
   {$endif NetBSD}
 {$endif cpu68}
-{$ifdef cpupowerpc}
+{$ifdef cpupowerpc32}
   {$ifdef Darwin}
      set_source_info(system_powerpc_darwin_info);
   {$endif Darwin}
   {$ifdef NetBSD}
      set_source_info(system_powerpc_netbsd_info);
   {$endif}
-{$endif cpu68}
+{$endif cpupowerpc32}
+{$ifdef cpupowerpc64}
+  {$ifdef Darwin}
+     set_source_info(system_powerpc64_darwin_info);
+  {$endif Darwin}
+{$endif powerpc64}
 end.

+ 1 - 1
compiler/systems/i_linux.pas

@@ -338,7 +338,7 @@ unit i_linux;
               );
             first_parm_offset : 8;
             stacksize    : 10*1024*1024;
-            abi : abi_default
+            abi : abi_powerpc_sysv
           );
 
        system_alpha_linux_info : tsysteminfo =

+ 20 - 9
compiler/systems/t_bsd.pas

@@ -207,7 +207,7 @@ Constructor TLinkerBSD.Create;
 begin
   Inherited Create;
   if not Dontlinkstdlibpath Then
-   if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+   if not(target_info.system in systems_darwin) then
      LibrarySearchPath.AddPath('/lib;/usr/lib;/usr/X11R6/lib',true)
    else
      { Mac OS X doesn't have a /lib }
@@ -221,12 +221,12 @@ procedure TLinkerBSD.SetDefaultInfo;
 }
 begin
   LibrarySuffix:=' ';
-  LdSupportsNoResponseFile := (target_info.system in [system_m68k_netbsd,system_powerpc_darwin,system_i386_darwin]);
+  LdSupportsNoResponseFile := (target_info.system in ([system_m68k_netbsd]+systems_darwin));
   with Info do
    begin
      if LdSupportsNoResponseFile then
        begin
-         if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+         if not(target_info.system in systems_darwin) then
            begin
              ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE `cat $RES`';
              DllCmd[1]:='ld $OPT -shared -L. -o $EXE `cat $RES`'
@@ -242,7 +242,7 @@ begin
          ExeCmd[1]:='ld $OPT $DYNLINK $STATIC  $GCSECTIONS $STRIP -L. -o $EXE $RES';
          DllCmd[1]:='ld $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $RES';
        end;
-     if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+     if not(target_info.system in systems_darwin) then
        DllCmd[2]:='strip --strip-unneeded $EXE'
      else
        DllCmd[2]:='strip -x $EXE';
@@ -254,7 +254,7 @@ procedure TLinkerBSD.LoadPredefinedLibraryOrder;
 // put your linkorder/linkalias overrides here.
 // Note: assumes only called when reordering/aliasing is used.
 Begin
-  if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+  if not(target_info.system in systems_darwin) then
     begin
       if (target_info.system =system_i386_freebsd) and
          not (cs_link_no_default_lib_order in  current_settings.globalswitches) Then
@@ -294,7 +294,7 @@ Var
 begin
   WriteResponseFile:=False;
   ReOrder:=False;
-  IsDarwin:=target_info.system in [system_powerpc_darwin,system_i386_darwin];
+  IsDarwin:=target_info.system in systems_darwin;
 { set special options for some targets }
   if not IsDarwin Then
     begin
@@ -369,6 +369,10 @@ begin
            LinkRes.Add('-arch ppc');
         system_i386_darwin:
            LinkRes.Add('-arch i386');
+        system_powerpc64_darwin:
+           LinkRes.Add('-arch ppc64');
+        system_x86_64_darwin:
+           LinkRes.Add('-arch x86_64');
       end;
   end;
   { Write path to search libraries }
@@ -529,20 +533,20 @@ begin
 
   if (cs_link_smart in current_settings.globalswitches) and
      (tf_smartlink_sections in target_info.flags) then
-    if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+    if not(target_info.system in systems_darwin) then
       GCSectionsStr:='--gc-sections'
     else
       // warning: this option only exists for 32 bit under Mac OS X, maybe the default for 64 bit?
       GCSectionsStr:='-dead_strip';
 
-   if(not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) and
+   if(not(target_info.system in systems_darwin) and
       (cs_profile in current_settings.moduleswitches)) or
      ((Info.DynamicLinker<>'') and (not SharedLibFiles.Empty)) then
    DynLinkStr:='-dynamic-linker='+Info.DynamicLinker;
 
   if CShared Then
    begin
-   if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+   if not(target_info.system in systems_darwin) then
      DynLinKStr:=DynLinkStr+' --shared'
     else
      DynLinKStr:=DynLinkStr+' -dynamic'; // one dash!
@@ -662,9 +666,16 @@ initialization
   RegisterImport(system_powerpc_darwin,timportlibdarwin);
   RegisterExport(system_powerpc_darwin,texportlibbsd);
   RegisterTarget(system_powerpc_darwin_info);
+
   RegisterExternalLinker(system_powerpc_netbsd_info,TLinkerBSD);
   RegisterImport(system_powerpc_netbsd,timportlibbsd);
   RegisterExport(system_powerpc_netbsd,texportlibbsd);
   RegisterTarget(system_powerpc_netbsd_info);
 {$endif powerpc}
+{$ifdef powerpc64}
+  RegisterExternalLinker(system_powerpc64_darwin_info,TLinkerBSD);
+  RegisterImport(system_powerpc64_darwin,timportlibdarwin);
+  RegisterExport(system_powerpc64_darwin,texportlibbsd);
+  RegisterTarget(system_powerpc64_darwin_info);
+{$endif powerpc64}
 end.

+ 23 - 1
compiler/tgobj.pas

@@ -86,6 +86,7 @@ unit tgobj;
 
           function sizeoftemp(list: TAsmList; const ref: treference): longint;
           function changetemptype(list: TAsmList; const ref:treference;temptype:ttemptype):boolean;
+          function gettypeoftemp(const ref:treference): ttemptype;
 
           {# Returns TRUE if the reference ref is allocated in temporary volatile memory space,
              otherwise returns FALSE.
@@ -559,7 +560,7 @@ implementation
       end;
 
 
-    function ttgobj.ChangeTempType(list: TAsmList; const ref:treference;temptype:ttemptype):boolean;
+    function ttgobj.changetemptype(list: tasmList; const ref:treference; temptype:ttemptype):boolean;
       var
         hp : ptemprecord;
       begin
@@ -600,6 +601,27 @@ implementation
       end;
 
 
+    function ttgobj.gettypeoftemp(const ref:treference): ttemptype;
+      var
+        hp : ptemprecord;
+      begin
+         hp:=templist;
+         while assigned(hp) do
+          begin
+            if (hp^.pos=ref.offset) then
+             begin
+               if hp^.temptype<>tt_free then
+                 result:=hp^.temptype
+               else
+                 internalerror(2007020810);
+               exit;
+             end;
+            hp:=hp^.next;
+          end;
+        result:=tt_none;
+      end;
+
+
     procedure ttgobj.UnGetTemp(list: TAsmList; const ref : treference);
       begin
         FreeTemp(list,ref.offset,[tt_normal,tt_noreuse,tt_persistent]);

+ 18 - 3
compiler/utils/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst fpcmkcfg
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst fpcmkcfg
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst fpcmkcfg
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst fpcmkcfg
 endif
@@ -533,6 +536,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override CLEAN_UNITS+=ppu crc usubst
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override CLEAN_UNITS+=ppu crc usubst
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override CLEAN_UNITS+=ppu crc usubst
 endif
@@ -687,6 +693,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=..
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=..
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=..
 endif
@@ -840,6 +849,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=..
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=..
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_SOURCEDIR+=..
 endif
@@ -1743,6 +1755,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 1 - 1
compiler/version.pas

@@ -28,7 +28,7 @@ interface
     const
        { version string }
        version_nr = '2';
-       release_nr = '1';
+       release_nr = '3';
        patch_nr   = '1';
        minorpatch = '';
 

+ 21 - 3
fv/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=fv
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=buildfv
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=buildfv
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=buildfv
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_IMPLICITUNITS+=app colortxt dialogs drivers editors fvcommon fvconsts gadgets histlist inplong memory menus msgbox statuses stddlg tabs time validate views sysmsg asciitab timeddlg
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_IMPLICITUNITS+=app colortxt dialogs drivers editors fvcommon fvconsts gadgets histlist inplong memory menus msgbox statuses stddlg tabs time validate views sysmsg asciitab timeddlg
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_IMPLICITUNITS+=app colortxt dialogs drivers editors fvcommon fvconsts gadgets histlist inplong memory menus msgbox statuses stddlg tabs time validate views sysmsg asciitab timeddlg
 endif
@@ -688,6 +694,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLEDIRS+=test
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLEDIRS+=test
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLEDIRS+=test
 endif
@@ -843,6 +852,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_TARGETDIR+=.
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_TARGETDIR+=.
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_TARGETDIR+=.
 endif
@@ -1744,6 +1756,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -2501,6 +2516,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_EXAMPLEDIRS_TEST=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_EXAMPLEDIRS_TEST=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_EXAMPLEDIRS_TEST=1
 endif

+ 10 - 3
fv/test/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_PROGRAMS+=testapp
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=testapp
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=testapp
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=testapp
 endif
@@ -1331,6 +1334,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_FV=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_FV=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_FV=1

+ 21 - 3
ide/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=ide
 override PACKAGE_VERSION=2.0.0
 ifndef NOGDB
@@ -404,6 +404,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=compiler
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=compiler
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_DIRS+=compiler
 endif
@@ -557,6 +560,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=fp
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=fp
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=fp
 endif
@@ -712,6 +718,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-Sg
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OPTIONS+=-Sg
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OPTIONS+=-Sg
 endif
@@ -1795,6 +1804,12 @@ REQUIRE_PACKAGES_FV=1
 REQUIRE_PACKAGES_GDBINT=1
 REQUIRE_PACKAGES_REGEXPR=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_FV=1
+REQUIRE_PACKAGES_GDBINT=1
+REQUIRE_PACKAGES_REGEXPR=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_FV=1
@@ -2655,6 +2670,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_DIRS_COMPILER=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_COMPILER=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_DIRS_COMPILER=1
 endif

+ 18 - 3
ide/compiler/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=ide
 PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ide/Makefile.fpc,$(PACKAGESDIR))))))
 COMPILERDIR=$(FPCDIR)/compiler
@@ -402,6 +402,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=compunit
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=compunit
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=compunit
 endif
@@ -556,6 +559,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-Ur -dNOCATCH
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OPTIONS+=-Ur -dNOCATCH
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OPTIONS+=-Ur -dNOCATCH
 endif
@@ -709,6 +715,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
 endif
@@ -862,6 +871,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
 endif
@@ -1763,6 +1775,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 9 - 3
ide/fakegdb/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/18]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=ide
 PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ide/Makefile.fpc,$(PACKAGESDIR))))))
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=gdbcon gdbint
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=gdbcon gdbint
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=gdbcon gdbint
 endif
@@ -1284,6 +1287,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 14 - 3
installer/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=installer
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -412,6 +412,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override CLEAN_UNITS+=scroll
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override CLEAN_UNITS+=scroll
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override CLEAN_UNITS+=scroll
 endif
@@ -587,6 +590,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=../ide
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=../ide
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=../ide
 endif
@@ -1588,6 +1594,11 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_FV=1
 REQUIRE_PACKAGES_UNZIP=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_FV=1
+REQUIRE_PACKAGES_UNZIP=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_FV=1

+ 191 - 4
packages/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/08/20]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin 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-amiga powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince arm-gba powerpc64-linux
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
@@ -281,6 +281,12 @@ endif
 ifeq ($(FULL_TARGET),i386-wince)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
+endif
 ifeq ($(FULL_TARGET),m68k-linux)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
@@ -302,6 +308,9 @@ endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
+endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
@@ -320,6 +329,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
@@ -329,6 +341,9 @@ endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
+endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
@@ -338,6 +353,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
+endif
 ifeq ($(FULL_TARGET),arm-linux)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
@@ -350,9 +368,24 @@ endif
 ifeq ($(FULL_TARGET),arm-gba)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
+endif
 override INSTALL_FPCPACKAGE=y
 override INSTALL_FPCSUBDIR=packages
 ifdef REQUIRE_UNITSDIR
@@ -681,6 +714,10 @@ EXEEXT=.gba
 SHAREDLIBEXT=.so
 SHORTSUFFIX=gba
 endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
 else
 ifeq ($(OS_TARGET),go32v1)
 PPUEXT=.pp1
@@ -1149,7 +1186,7 @@ ifeq ($(CPU_TARGET),powerpc)
 FPCCPUOPT:=-O1r
 endif
 else
-FPCCPUOPT:=-O1r
+FPCCPUOPT:=-O2
 endif
 override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
 override FPCOPTDEF+=RELEASE
@@ -1208,6 +1245,13 @@ ifeq ($(CPU_TARGET),i386)
 override FPCOPT+=-Aas
 endif
 endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
 ifdef LINKSHARED
 endif
 ifdef OPT
@@ -1638,6 +1682,32 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 endif
+ifeq ($(FULL_TARGET),i386-embedded)
+TARGET_DIRS_BASE=1
+TARGET_DIRS_FCL-BASE=1
+TARGET_DIRS_FCL-DB=1
+TARGET_DIRS_FCL-IMAGE=1
+TARGET_DIRS_FCL-NET=1
+TARGET_DIRS_FCL-PASSRC=1
+TARGET_DIRS_FCL-REGISTRY=1
+TARGET_DIRS_FCL-WEB=1
+TARGET_DIRS_FCL-XML=1
+TARGET_DIRS_FCL-FPCUNIT=1
+TARGET_DIRS_EXTRA=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+TARGET_DIRS_BASE=1
+TARGET_DIRS_FCL-BASE=1
+TARGET_DIRS_FCL-DB=1
+TARGET_DIRS_FCL-IMAGE=1
+TARGET_DIRS_FCL-NET=1
+TARGET_DIRS_FCL-PASSRC=1
+TARGET_DIRS_FCL-REGISTRY=1
+TARGET_DIRS_FCL-WEB=1
+TARGET_DIRS_FCL-XML=1
+TARGET_DIRS_FCL-FPCUNIT=1
+TARGET_DIRS_EXTRA=1
+endif
 ifeq ($(FULL_TARGET),m68k-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1729,6 +1799,19 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+TARGET_DIRS_BASE=1
+TARGET_DIRS_FCL-BASE=1
+TARGET_DIRS_FCL-DB=1
+TARGET_DIRS_FCL-IMAGE=1
+TARGET_DIRS_FCL-NET=1
+TARGET_DIRS_FCL-PASSRC=1
+TARGET_DIRS_FCL-REGISTRY=1
+TARGET_DIRS_FCL-WEB=1
+TARGET_DIRS_FCL-XML=1
+TARGET_DIRS_FCL-FPCUNIT=1
+TARGET_DIRS_EXTRA=1
+endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1807,6 +1890,19 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+TARGET_DIRS_BASE=1
+TARGET_DIRS_FCL-BASE=1
+TARGET_DIRS_FCL-DB=1
+TARGET_DIRS_FCL-IMAGE=1
+TARGET_DIRS_FCL-NET=1
+TARGET_DIRS_FCL-PASSRC=1
+TARGET_DIRS_FCL-REGISTRY=1
+TARGET_DIRS_FCL-WEB=1
+TARGET_DIRS_FCL-XML=1
+TARGET_DIRS_FCL-FPCUNIT=1
+TARGET_DIRS_EXTRA=1
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1846,6 +1942,19 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+TARGET_DIRS_BASE=1
+TARGET_DIRS_FCL-BASE=1
+TARGET_DIRS_FCL-DB=1
+TARGET_DIRS_FCL-IMAGE=1
+TARGET_DIRS_FCL-NET=1
+TARGET_DIRS_FCL-PASSRC=1
+TARGET_DIRS_FCL-REGISTRY=1
+TARGET_DIRS_FCL-WEB=1
+TARGET_DIRS_FCL-XML=1
+TARGET_DIRS_FCL-FPCUNIT=1
+TARGET_DIRS_EXTRA=1
+endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1885,6 +1994,19 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+TARGET_DIRS_BASE=1
+TARGET_DIRS_FCL-BASE=1
+TARGET_DIRS_FCL-DB=1
+TARGET_DIRS_FCL-IMAGE=1
+TARGET_DIRS_FCL-NET=1
+TARGET_DIRS_FCL-PASSRC=1
+TARGET_DIRS_FCL-REGISTRY=1
+TARGET_DIRS_FCL-WEB=1
+TARGET_DIRS_FCL-XML=1
+TARGET_DIRS_FCL-FPCUNIT=1
+TARGET_DIRS_EXTRA=1
+endif
 ifeq ($(FULL_TARGET),arm-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1937,6 +2059,45 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 endif
+ifeq ($(FULL_TARGET),arm-nds)
+TARGET_DIRS_BASE=1
+TARGET_DIRS_FCL-BASE=1
+TARGET_DIRS_FCL-DB=1
+TARGET_DIRS_FCL-IMAGE=1
+TARGET_DIRS_FCL-NET=1
+TARGET_DIRS_FCL-PASSRC=1
+TARGET_DIRS_FCL-REGISTRY=1
+TARGET_DIRS_FCL-WEB=1
+TARGET_DIRS_FCL-XML=1
+TARGET_DIRS_FCL-FPCUNIT=1
+TARGET_DIRS_EXTRA=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+TARGET_DIRS_BASE=1
+TARGET_DIRS_FCL-BASE=1
+TARGET_DIRS_FCL-DB=1
+TARGET_DIRS_FCL-IMAGE=1
+TARGET_DIRS_FCL-NET=1
+TARGET_DIRS_FCL-PASSRC=1
+TARGET_DIRS_FCL-REGISTRY=1
+TARGET_DIRS_FCL-WEB=1
+TARGET_DIRS_FCL-XML=1
+TARGET_DIRS_FCL-FPCUNIT=1
+TARGET_DIRS_EXTRA=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+TARGET_DIRS_BASE=1
+TARGET_DIRS_FCL-BASE=1
+TARGET_DIRS_FCL-DB=1
+TARGET_DIRS_FCL-IMAGE=1
+TARGET_DIRS_FCL-NET=1
+TARGET_DIRS_FCL-PASSRC=1
+TARGET_DIRS_FCL-REGISTRY=1
+TARGET_DIRS_FCL-WEB=1
+TARGET_DIRS_FCL-XML=1
+TARGET_DIRS_FCL-FPCUNIT=1
+TARGET_DIRS_EXTRA=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1950,6 +2111,32 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_BASE=1
+TARGET_DIRS_FCL-BASE=1
+TARGET_DIRS_FCL-DB=1
+TARGET_DIRS_FCL-IMAGE=1
+TARGET_DIRS_FCL-NET=1
+TARGET_DIRS_FCL-PASSRC=1
+TARGET_DIRS_FCL-REGISTRY=1
+TARGET_DIRS_FCL-WEB=1
+TARGET_DIRS_FCL-XML=1
+TARGET_DIRS_FCL-FPCUNIT=1
+TARGET_DIRS_EXTRA=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+TARGET_DIRS_BASE=1
+TARGET_DIRS_FCL-BASE=1
+TARGET_DIRS_FCL-DB=1
+TARGET_DIRS_FCL-IMAGE=1
+TARGET_DIRS_FCL-NET=1
+TARGET_DIRS_FCL-PASSRC=1
+TARGET_DIRS_FCL-REGISTRY=1
+TARGET_DIRS_FCL-WEB=1
+TARGET_DIRS_FCL-XML=1
+TARGET_DIRS_FCL-FPCUNIT=1
+TARGET_DIRS_EXTRA=1
+endif
 ifdef TARGET_DIRS_BASE
 base_all:
 	$(MAKE) -C base all

+ 135 - 4
packages/base/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/08/20]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin 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-amiga powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince arm-gba powerpc64-linux
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd libc
 endif
@@ -281,6 +281,12 @@ endif
 ifeq ($(FULL_TARGET),i386-wince)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  ibase sqlite postgres
 endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
 ifeq ($(FULL_TARGET),m68k-linux)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd
 endif
@@ -302,6 +308,9 @@ endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
 endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd
 endif
@@ -320,6 +329,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
 endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd
 endif
@@ -329,6 +341,9 @@ endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  libasync mysql ibase postgres oracle odbc sqlite pthreads imagemagick httpd
 endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd libc
 endif
@@ -338,6 +353,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  mysql ibase odbc sqlite postgres oracle winunits
 endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
 ifeq ($(FULL_TARGET),arm-linux)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd
 endif
@@ -350,9 +368,24 @@ endif
 ifeq ($(FULL_TARGET),arm-gba)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
 endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  libasync mysql ibase postgres oracle odbc sqlite pthreads imagemagick httpd
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
 override INSTALL_FPCPACKAGE=y
 override INSTALL_FPCSUBDIR=packages/base
 ifdef REQUIRE_UNITSDIR
@@ -681,6 +714,10 @@ EXEEXT=.gba
 SHAREDLIBEXT=.so
 SHORTSUFFIX=gba
 endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
 else
 ifeq ($(OS_TARGET),go32v1)
 PPUEXT=.pp1
@@ -1149,7 +1186,7 @@ ifeq ($(CPU_TARGET),powerpc)
 FPCCPUOPT:=-O1r
 endif
 else
-FPCCPUOPT:=-O1r
+FPCCPUOPT:=-O2
 endif
 override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
 override FPCOPTDEF+=RELEASE
@@ -1208,6 +1245,13 @@ ifeq ($(CPU_TARGET),i386)
 override FPCOPT+=-Aas
 endif
 endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
 ifdef LINKSHARED
 endif
 ifdef OPT
@@ -1616,6 +1660,20 @@ TARGET_DIRS_IBASE=1
 TARGET_DIRS_SQLITE=1
 TARGET_DIRS_POSTGRES=1
 endif
+ifeq ($(FULL_TARGET),i386-embedded)
+TARGET_DIRS_HASH=1
+TARGET_DIRS_PASZLIB=1
+TARGET_DIRS_PASJPEG=1
+TARGET_DIRS_REGEXPR=1
+TARGET_DIRS_NETDB=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+TARGET_DIRS_HASH=1
+TARGET_DIRS_PASZLIB=1
+TARGET_DIRS_PASJPEG=1
+TARGET_DIRS_REGEXPR=1
+TARGET_DIRS_NETDB=1
+endif
 ifeq ($(FULL_TARGET),m68k-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
@@ -1708,6 +1766,13 @@ TARGET_DIRS_PASJPEG=1
 TARGET_DIRS_REGEXPR=1
 TARGET_DIRS_NETDB=1
 endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+TARGET_DIRS_HASH=1
+TARGET_DIRS_PASZLIB=1
+TARGET_DIRS_PASJPEG=1
+TARGET_DIRS_REGEXPR=1
+TARGET_DIRS_NETDB=1
+endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
@@ -1782,6 +1847,13 @@ TARGET_DIRS_PASJPEG=1
 TARGET_DIRS_REGEXPR=1
 TARGET_DIRS_NETDB=1
 endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+TARGET_DIRS_HASH=1
+TARGET_DIRS_PASZLIB=1
+TARGET_DIRS_PASJPEG=1
+TARGET_DIRS_REGEXPR=1
+TARGET_DIRS_NETDB=1
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
@@ -1835,6 +1907,13 @@ TARGET_DIRS_PTHREADS=1
 TARGET_DIRS_IMAGEMAGICK=1
 TARGET_DIRS_HTTPD=1
 endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+TARGET_DIRS_HASH=1
+TARGET_DIRS_PASZLIB=1
+TARGET_DIRS_PASJPEG=1
+TARGET_DIRS_REGEXPR=1
+TARGET_DIRS_NETDB=1
+endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
@@ -1889,6 +1968,13 @@ TARGET_DIRS_POSTGRES=1
 TARGET_DIRS_ORACLE=1
 TARGET_DIRS_WINUNITS=1
 endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+TARGET_DIRS_HASH=1
+TARGET_DIRS_PASZLIB=1
+TARGET_DIRS_PASJPEG=1
+TARGET_DIRS_REGEXPR=1
+TARGET_DIRS_NETDB=1
+endif
 ifeq ($(FULL_TARGET),arm-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
@@ -1933,6 +2019,27 @@ TARGET_DIRS_PASJPEG=1
 TARGET_DIRS_REGEXPR=1
 TARGET_DIRS_NETDB=1
 endif
+ifeq ($(FULL_TARGET),arm-nds)
+TARGET_DIRS_HASH=1
+TARGET_DIRS_PASZLIB=1
+TARGET_DIRS_PASJPEG=1
+TARGET_DIRS_REGEXPR=1
+TARGET_DIRS_NETDB=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+TARGET_DIRS_HASH=1
+TARGET_DIRS_PASZLIB=1
+TARGET_DIRS_PASJPEG=1
+TARGET_DIRS_REGEXPR=1
+TARGET_DIRS_NETDB=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+TARGET_DIRS_HASH=1
+TARGET_DIRS_PASZLIB=1
+TARGET_DIRS_PASJPEG=1
+TARGET_DIRS_REGEXPR=1
+TARGET_DIRS_NETDB=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
@@ -1953,6 +2060,30 @@ TARGET_DIRS_IMAGEMAGICK=1
 TARGET_DIRS_DBUS=1
 TARGET_DIRS_HTTPD=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_HASH=1
+TARGET_DIRS_PASZLIB=1
+TARGET_DIRS_PASJPEG=1
+TARGET_DIRS_REGEXPR=1
+TARGET_DIRS_NETDB=1
+TARGET_DIRS_LIBASYNC=1
+TARGET_DIRS_MYSQL=1
+TARGET_DIRS_IBASE=1
+TARGET_DIRS_POSTGRES=1
+TARGET_DIRS_ORACLE=1
+TARGET_DIRS_ODBC=1
+TARGET_DIRS_SQLITE=1
+TARGET_DIRS_PTHREADS=1
+TARGET_DIRS_IMAGEMAGICK=1
+TARGET_DIRS_HTTPD=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+TARGET_DIRS_HASH=1
+TARGET_DIRS_PASZLIB=1
+TARGET_DIRS_PASJPEG=1
+TARGET_DIRS_REGEXPR=1
+TARGET_DIRS_NETDB=1
+endif
 ifdef TARGET_DIRS_HASH
 hash_all:
 	$(MAKE) -C hash all

+ 15 - 3
packages/base/dbus/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=dbus
 override PACKAGE_VERSION=2.0.4
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=dbus
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=dbus
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=dbus
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLEDIRS+=example
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLEDIRS+=example
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLEDIRS+=example
 endif
@@ -1468,6 +1474,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -2231,6 +2240,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_EXAMPLEDIRS_EXAMPLE=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 endif

+ 10 - 3
packages/base/dbus/example/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_PROGRAMS+=busexample
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=busexample
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=busexample
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=busexample
 endif
@@ -1363,6 +1366,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_DBUS=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_DBUS=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_DBUS=1

+ 10 - 4
packages/base/fpmake/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/18]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -92,7 +92,7 @@ endif
 endif
 export ECHO
 endif
-override DEFAULT_FPCDIR=../..
+override DEFAULT_FPCDIR=../../..
 ifndef FPC
 ifdef PP
 FPC=$(PP)
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=fpmake
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=fpmktype fpmkunit
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=fpmktype fpmkunit
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=fpmktype fpmkunit
 endif
@@ -1284,6 +1287,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 18 - 3
packages/base/gdbint/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/27]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=gdbint
 override PACKAGE_VERSION=2.0.0
 ifdef inUnix
@@ -402,6 +402,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=gdbint gdbcon
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=gdbint gdbcon
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=gdbint gdbcon
 endif
@@ -555,6 +558,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testgdb symify
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testgdb symify
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testgdb symify
 endif
@@ -709,6 +715,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
 endif
@@ -862,6 +871,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
 endif
@@ -1794,6 +1806,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 18 - 3
packages/base/graph/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=graph
 override PACKAGE_VERSION=2.1
 GRAPHDIR=inc
@@ -446,6 +446,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
@@ -600,6 +603,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-S2
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OPTIONS+=-S2
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OPTIONS+=-S2
 endif
@@ -753,6 +759,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=$(OS_TARGET) inc  unix
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=$(OS_TARGET) inc  unix
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=$(OS_TARGET) inc
 endif
@@ -906,6 +915,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=$(OS_TARGET) inc
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=$(OS_TARGET) inc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_SOURCEDIR+=$(OS_TARGET) inc
 endif
@@ -1840,6 +1852,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 12 - 3
packages/base/hash/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=hash
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=md5 crc ntlm uuid  unixcrypt
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=md5 crc ntlm uuid
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=md5 crc ntlm uuid
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=mdtest
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=mdtest
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=mdtest
 endif
@@ -1437,6 +1443,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 17 - 3
packages/base/httpd/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_DIRS+=httpd-1.3 httpd-2.0 httpd-2.2
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=httpd-1.3 httpd-2.0 httpd-2.2
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=httpd-1.3 httpd-2.0 httpd-2.2
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_DIRS+=httpd-1.3 httpd-2.0 httpd-2.2
 endif
@@ -533,6 +536,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLEDIRS+=examples
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLEDIRS+=examples
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLEDIRS+=examples
 endif
@@ -1879,6 +1885,11 @@ TARGET_DIRS_HTTPD-1.3=1
 TARGET_DIRS_HTTPD-2.0=1
 TARGET_DIRS_HTTPD-2.2=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_HTTPD-1.3=1
+TARGET_DIRS_HTTPD-2.0=1
+TARGET_DIRS_HTTPD-2.2=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_DIRS_HTTPD-1.3=1
 TARGET_DIRS_HTTPD-2.0=1
@@ -2169,6 +2180,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_EXAMPLEDIRS_EXAMPLES=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_EXAMPLEDIRS_EXAMPLES=1
 endif

+ 13 - 3
packages/base/httpd/examples/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_PROGRAMS+=mod_example  mod_hello  mod_spelling  testmodule
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=mod_example  mod_hello  mod_spelling  testmodule
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=mod_example  mod_hello  mod_spelling  testmodule
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=mod_example  mod_hello  mod_spelling  testmodule
 endif
@@ -533,6 +536,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=minimain
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=minimain
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=minimain
 endif
@@ -1516,6 +1522,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1

+ 9 - 3
packages/base/httpd/httpd-1.3/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=httpd-1.3
 override PACKAGE_VERSION=2.0.4
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=httpd
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=httpd
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=httpd
 endif
@@ -1315,6 +1318,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 9 - 3
packages/base/httpd/httpd-2.0/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=httpd-2.0
 override PACKAGE_VERSION=2.0.4
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 endif
@@ -1315,6 +1318,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 9 - 3
packages/base/httpd/httpd-2.2/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=httpd-2.2
 override PACKAGE_VERSION=2.0.4
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 endif
@@ -1315,6 +1318,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 12 - 3
packages/base/ibase/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=ibase
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=ibase40 ibase60 ibase60dyn
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=ibase40 ibase60 ibase60dyn
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=ibase40 ibase60 ibase60dyn
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testib40 testib60
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testib40 testib60
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testib40 testib60
 endif
@@ -1470,6 +1476,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 15 - 3
packages/base/imagemagick/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=gtk2
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=buildim
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=buildim
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=buildim
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_IMPLICITUNITS+=magick_wand imagemagick
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_IMPLICITUNITS+=magick_wand imagemagick
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_IMPLICITUNITS+=magick_wand imagemagick
 endif
@@ -690,6 +696,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=magick wand
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=magick wand
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=magick wand
 endif
@@ -1624,6 +1633,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 12 - 3
packages/base/libasync/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=libasync
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=libasync
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=libasync
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=libasync
 endif
@@ -446,6 +449,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=unix
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=unix
+endif
 ifdef REQUIRE_UNITSDIR
 override UNITSDIR+=$(REQUIRE_UNITSDIR)
 endif
@@ -1344,6 +1350,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 9 - 3
packages/base/libc/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=libc
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=kerneldefs kernelioctl libc
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=kerneldefs kernelioctl libc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=kerneldefs kernelioctl libc
 endif
@@ -1317,6 +1320,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 12 - 3
packages/base/mysql/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=mysql
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=my4_sys mysql4_com mysql4_version mysql4 mysql4dyn mysql4_comdyn mysql3_com mysql3_version mysql3 mysql3_comdyn mysql3dyn mysql40 mysql40dyn mysql41 mysql41dyn mysql50 mysql50dyn
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=my4_sys mysql4_com mysql4_version mysql4 mysql4dyn mysql4_comdyn mysql3_com mysql3_version mysql3 mysql3_comdyn mysql3dyn mysql40 mysql40dyn mysql41 mysql41dyn mysql50 mysql50dyn
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=my4_sys mysql4_com mysql4_version mysql4 mysql4dyn mysql4_comdyn mysql3_com mysql3_version mysql3 mysql3_comdyn mysql3dyn mysql40 mysql40dyn mysql41 mysql41dyn mysql50 mysql50dyn
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testdb4 testdb3
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testdb4 testdb3
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testdb4 testdb3
 endif
@@ -1470,6 +1476,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 12 - 3
packages/base/netdb/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=netdb
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=uriparser  netdb
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=uriparser  netdb
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=uriparser
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testuri  testdns testhst testsvc testnet testhosts
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testuri  testdns testhst testsvc testnet testhosts
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testuri
 endif
@@ -1437,6 +1443,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 12 - 3
packages/base/odbc/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=odbc
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=odbcsql odbcsqldyn
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=odbcsql odbcsqldyn
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=odbcsql odbcsqldyn
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testodbc
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testodbc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testodbc
 endif
@@ -1470,6 +1476,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 15 - 3
packages/base/oracle/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=oracle
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLEDIRS+=example
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLEDIRS+=example
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLEDIRS+=example
 endif
@@ -1470,6 +1476,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -2233,6 +2242,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_EXAMPLEDIRS_EXAMPLE=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 endif

+ 266 - 138
packages/base/oracle/example/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_UNITS+=oraclew
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=oraclew
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=oraclew
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=oraclew
 endif
@@ -533,6 +536,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=test01
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=test01
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=test01
 endif
@@ -1315,7 +1321,7 @@ else
 TAROPT=vz
 TAREXT=.tar.gz
 endif
-override REQUIRE_PACKAGES=rtl oracle fcl
+override REQUIRE_PACKAGES=rtl oracle fcl-base fcl-db fcl-xml
 ifeq ($(FULL_TARGET),i386-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
@@ -1324,8 +1330,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1337,9 +1344,10 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 REQUIRE_PACKAGES_RTL=1
@@ -1347,8 +1355,10 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_WINUNITS=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1361,8 +1371,9 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 REQUIRE_PACKAGES_RTL=1
@@ -1372,8 +1383,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1385,9 +1397,10 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 REQUIRE_PACKAGES_RTL=1
@@ -1396,8 +1409,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1412,26 +1426,29 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 REQUIRE_PACKAGES_RTL=1
@@ -1440,8 +1457,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1453,9 +1471,10 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 REQUIRE_PACKAGES_RTL=1
@@ -1465,8 +1484,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1479,26 +1499,29 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 REQUIRE_PACKAGES_RTL=1
@@ -1506,8 +1529,9 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_SQLITE=1
@@ -1517,18 +1541,20 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 REQUIRE_PACKAGES_RTL=1
@@ -1538,8 +1564,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1554,8 +1581,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1569,8 +1597,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1582,18 +1611,20 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 REQUIRE_PACKAGES_RTL=1
@@ -1602,8 +1633,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1615,18 +1647,20 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 REQUIRE_PACKAGES_RTL=1
@@ -1636,8 +1670,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1651,8 +1686,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1664,18 +1700,20 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 REQUIRE_PACKAGES_RTL=1
@@ -1685,8 +1723,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1698,18 +1737,20 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 REQUIRE_PACKAGES_RTL=1
@@ -1719,8 +1760,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1734,8 +1776,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1750,17 +1793,19 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 REQUIRE_PACKAGES_RTL=1
@@ -1770,8 +1815,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1786,8 +1832,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1800,17 +1847,20 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_WINUNITS=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 REQUIRE_PACKAGES_RTL=1
@@ -1820,8 +1870,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1833,9 +1884,10 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 REQUIRE_PACKAGES_RTL=1
@@ -1843,8 +1895,9 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_SQLITE=1
@@ -1854,36 +1907,40 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),arm-nds)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
@@ -1893,8 +1950,26 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=1
-REQUIRE_PACKAGES_FCL=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
+REQUIRE_PACKAGES_IBASE=1
+REQUIRE_PACKAGES_POSTGRES=1
+REQUIRE_PACKAGES_MYSQL=1
+REQUIRE_PACKAGES_ODBC=1
+REQUIRE_PACKAGES_SQLITE=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_ORACLE=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_NETDB=1
+REQUIRE_PACKAGES_LIBASYNC=1
+REQUIRE_PACKAGES_PTHREADS=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
+REQUIRE_PACKAGES_FCL-XML=1
 REQUIRE_PACKAGES_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1906,9 +1981,10 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
-REQUIRE_PACKAGES_FCL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-DB=1
 REQUIRE_PACKAGES_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 ifdef REQUIRE_PACKAGES_RTL
 PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
@@ -2092,56 +2168,82 @@ ifdef UNITDIR_PTHREADS
 override COMPILER_UNITDIR+=$(UNITDIR_PTHREADS)
 endif
 endif
-ifdef REQUIRE_PACKAGES_FCL
-PACKAGEDIR_FCL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_FCL),)
-ifneq ($(wildcard $(PACKAGEDIR_FCL)/units/$(TARGETSUFFIX)),)
-UNITDIR_FCL=$(PACKAGEDIR_FCL)/units/$(TARGETSUFFIX)
+ifdef REQUIRE_PACKAGES_FCL-BASE
+PACKAGEDIR_FCL-BASE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-base/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_FCL-BASE),)
+ifneq ($(wildcard $(PACKAGEDIR_FCL-BASE)/units/$(TARGETSUFFIX)),)
+UNITDIR_FCL-BASE=$(PACKAGEDIR_FCL-BASE)/units/$(TARGETSUFFIX)
 else
-UNITDIR_FCL=$(PACKAGEDIR_FCL)
+UNITDIR_FCL-BASE=$(PACKAGEDIR_FCL-BASE)
 endif
 ifdef CHECKDEPEND
-$(PACKAGEDIR_FCL)/$(FPCMADE):
-	$(MAKE) -C $(PACKAGEDIR_FCL) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL)/$(FPCMADE)
+$(PACKAGEDIR_FCL-BASE)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_FCL-BASE) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-BASE)/$(FPCMADE)
 endif
 else
-PACKAGEDIR_FCL=
-UNITDIR_FCL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_FCL),)
-UNITDIR_FCL:=$(firstword $(UNITDIR_FCL))
+PACKAGEDIR_FCL-BASE=
+UNITDIR_FCL-BASE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-base/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_FCL-BASE),)
+UNITDIR_FCL-BASE:=$(firstword $(UNITDIR_FCL-BASE))
 else
-UNITDIR_FCL=
+UNITDIR_FCL-BASE=
 endif
 endif
-ifdef UNITDIR_FCL
-override COMPILER_UNITDIR+=$(UNITDIR_FCL)
+ifdef UNITDIR_FCL-BASE
+override COMPILER_UNITDIR+=$(UNITDIR_FCL-BASE)
 endif
 endif
-ifdef REQUIRE_PACKAGES_PASJPEG
-PACKAGEDIR_PASJPEG:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /pasjpeg/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_PASJPEG),)
-ifneq ($(wildcard $(PACKAGEDIR_PASJPEG)/units/$(TARGETSUFFIX)),)
-UNITDIR_PASJPEG=$(PACKAGEDIR_PASJPEG)/units/$(TARGETSUFFIX)
+ifdef REQUIRE_PACKAGES_FCL-DB
+PACKAGEDIR_FCL-DB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-db/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_FCL-DB),)
+ifneq ($(wildcard $(PACKAGEDIR_FCL-DB)/units/$(TARGETSUFFIX)),)
+UNITDIR_FCL-DB=$(PACKAGEDIR_FCL-DB)/units/$(TARGETSUFFIX)
 else
-UNITDIR_PASJPEG=$(PACKAGEDIR_PASJPEG)
+UNITDIR_FCL-DB=$(PACKAGEDIR_FCL-DB)
 endif
 ifdef CHECKDEPEND
-$(PACKAGEDIR_PASJPEG)/$(FPCMADE):
-	$(MAKE) -C $(PACKAGEDIR_PASJPEG) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_PASJPEG)/$(FPCMADE)
+$(PACKAGEDIR_FCL-DB)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_FCL-DB) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-DB)/$(FPCMADE)
 endif
 else
-PACKAGEDIR_PASJPEG=
-UNITDIR_PASJPEG:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /pasjpeg/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_PASJPEG),)
-UNITDIR_PASJPEG:=$(firstword $(UNITDIR_PASJPEG))
+PACKAGEDIR_FCL-DB=
+UNITDIR_FCL-DB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-db/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_FCL-DB),)
+UNITDIR_FCL-DB:=$(firstword $(UNITDIR_FCL-DB))
 else
-UNITDIR_PASJPEG=
+UNITDIR_FCL-DB=
 endif
 endif
-ifdef UNITDIR_PASJPEG
-override COMPILER_UNITDIR+=$(UNITDIR_PASJPEG)
+ifdef UNITDIR_FCL-DB
+override COMPILER_UNITDIR+=$(UNITDIR_FCL-DB)
+endif
+endif
+ifdef REQUIRE_PACKAGES_FCL-XML
+PACKAGEDIR_FCL-XML:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-xml/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_FCL-XML),)
+ifneq ($(wildcard $(PACKAGEDIR_FCL-XML)/units/$(TARGETSUFFIX)),)
+UNITDIR_FCL-XML=$(PACKAGEDIR_FCL-XML)/units/$(TARGETSUFFIX)
+else
+UNITDIR_FCL-XML=$(PACKAGEDIR_FCL-XML)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_FCL-XML)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_FCL-XML) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-XML)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_FCL-XML=
+UNITDIR_FCL-XML:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-xml/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_FCL-XML),)
+UNITDIR_FCL-XML:=$(firstword $(UNITDIR_FCL-XML))
+else
+UNITDIR_FCL-XML=
+endif
+endif
+ifdef UNITDIR_FCL-XML
+override COMPILER_UNITDIR+=$(UNITDIR_FCL-XML)
 endif
 endif
 ifdef REQUIRE_PACKAGES_IBASE
@@ -2274,6 +2376,32 @@ ifdef UNITDIR_SQLITE
 override COMPILER_UNITDIR+=$(UNITDIR_SQLITE)
 endif
 endif
+ifdef REQUIRE_PACKAGES_WINUNITS
+PACKAGEDIR_WINUNITS:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /winunits/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_WINUNITS),)
+ifneq ($(wildcard $(PACKAGEDIR_WINUNITS)/units/$(TARGETSUFFIX)),)
+UNITDIR_WINUNITS=$(PACKAGEDIR_WINUNITS)/units/$(TARGETSUFFIX)
+else
+UNITDIR_WINUNITS=$(PACKAGEDIR_WINUNITS)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_WINUNITS)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_WINUNITS) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_WINUNITS)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_WINUNITS=
+UNITDIR_WINUNITS:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /winunits/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_WINUNITS),)
+UNITDIR_WINUNITS:=$(firstword $(UNITDIR_WINUNITS))
+else
+UNITDIR_WINUNITS=
+endif
+endif
+ifdef UNITDIR_WINUNITS
+override COMPILER_UNITDIR+=$(UNITDIR_WINUNITS)
+endif
+endif
 ifndef NOCPUDEF
 override FPCOPTDEF=$(CPU_TARGET)
 endif

+ 15 - 3
packages/base/pasjpeg/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=pasjpeg
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=buildpasjpeg
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=buildpasjpeg
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=buildpasjpeg
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_IMPLICITUNITS+=jcapimin jcapistd jccoefct jccolor jcdctmgr jchuff jcinit jcmainct jcmarker jcmaster jcomapi jcparam jcphuff jcprepct jcsample jdapimin jdapistd jdatadst jdatasrc jdcoefct jdcolor jdct jddctmgr jdeferr jdhuff jdinput jdmainct jdmarker jdmaster jdmerge jdphuff jdpostct jdsample jerror jfdctflt jfdctfst jfdctint jidctflt jidctfst jidctint jidctred jinclude jmemmgr jmemnobs jmorecfg jpeglib jquant1 jquant2 jutils
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_IMPLICITUNITS+=jcapimin jcapistd jccoefct jccolor jcdctmgr jchuff jcinit jcmainct jcmarker jcmaster jcomapi jcparam jcphuff jcprepct jcsample jdapimin jdapistd jdatadst jdatasrc jdcoefct jdcolor jdct jddctmgr jdeferr jdhuff jdinput jdmainct jdmarker jdmaster jdmerge jdphuff jdpostct jdsample jerror jfdctflt jfdctfst jfdctint jidctflt jidctfst jidctint jidctred jinclude jmemmgr jmemnobs jmorecfg jpeglib jquant1 jquant2 jutils
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_IMPLICITUNITS+=jcapimin jcapistd jccoefct jccolor jcdctmgr jchuff jcinit jcmainct jcmarker jcmaster jcomapi jcparam jcphuff jcprepct jcsample jdapimin jdapistd jdatadst jdatasrc jdcoefct jdcolor jdct jddctmgr jdeferr jdhuff jdinput jdmainct jdmarker jdmaster jdmerge jdphuff jdpostct jdsample jerror jfdctflt jfdctfst jfdctint jidctflt jidctfst jidctint jidctred jinclude jmemmgr jmemnobs jmorecfg jpeglib jquant1 jquant2 jutils
 endif
@@ -688,6 +694,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=cjpeg demo djpeg jpegtran rdjpgcom
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=cjpeg demo djpeg jpegtran rdjpgcom
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=cjpeg demo djpeg jpegtran rdjpgcom
 endif
@@ -1590,6 +1599,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 13 - 3
packages/base/paszlib/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=paszlib
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=paszlib adler gzio infblock infcodes inffast inftrees infutil trees zcompres zdeflate zinflate zbase zuncompr
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=paszlib adler gzio infblock infcodes inffast inftrees infutil trees zcompres zdeflate zinflate zbase zuncompr
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=paszlib adler gzio infblock infcodes inffast inftrees infutil trees zcompres zdeflate zinflate zbase zuncompr
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=example minigzip
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=example minigzip
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=example minigzip
 endif
@@ -1487,6 +1493,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HASH=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HASH=1

+ 12 - 3
packages/base/postgres/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=postgres
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=dllist dllistdyn postgres postgres3 postgres3dyn
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=dllist dllistdyn postgres postgres3 postgres3dyn
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=dllist dllistdyn postgres postgres3 postgres3dyn
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testpg1 testpg2
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testpg1 testpg2
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testpg1 testpg2
 endif
@@ -1470,6 +1476,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 9 - 3
packages/base/pthreads/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=pthreads
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=pthreads
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=pthreads
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=pthreads
 endif
@@ -1284,6 +1287,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 15 - 3
packages/base/regexpr/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=regexpr
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=regexpr
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=regexpr
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=regexpr
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testreg1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testreg1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testreg1
 endif
@@ -689,6 +695,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-S2
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OPTIONS+=-S2
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OPTIONS+=-S2
 endif
@@ -1590,6 +1599,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 81 - 4
packages/base/sqlite/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/12/01]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin 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-amiga powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince arm-gba powerpc64-linux
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=sqlite
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -283,6 +283,12 @@ endif
 ifeq ($(FULL_TARGET),i386-wince)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
 ifeq ($(FULL_TARGET),m68k-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
@@ -304,6 +310,9 @@ endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
@@ -322,6 +331,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
@@ -331,6 +343,9 @@ endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
@@ -340,6 +355,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
 ifeq ($(FULL_TARGET),arm-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
@@ -352,9 +370,24 @@ endif
 ifeq ($(FULL_TARGET),arm-gba)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
 override INSTALL_FPCPACKAGE=y
 override SHARED_BUILD=n
 override SHARED_BUILD=n
@@ -684,6 +717,10 @@ EXEEXT=.gba
 SHAREDLIBEXT=.so
 SHORTSUFFIX=gba
 endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
 else
 ifeq ($(OS_TARGET),go32v1)
 PPUEXT=.pp1
@@ -1153,6 +1190,12 @@ endif
 ifeq ($(FULL_TARGET),i386-wince)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),m68k-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -1174,6 +1217,9 @@ endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -1192,6 +1238,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -1201,6 +1250,9 @@ endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -1210,6 +1262,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),arm-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -1222,9 +1277,24 @@ endif
 ifeq ($(FULL_TARGET),arm-gba)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifdef REQUIRE_PACKAGES_RTL
 PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
 ifneq ($(PACKAGEDIR_RTL),)
@@ -1302,7 +1372,7 @@ ifeq ($(CPU_TARGET),powerpc)
 FPCCPUOPT:=-O1r
 endif
 else
-FPCCPUOPT:=-O1r
+FPCCPUOPT:=-O2
 endif
 override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
 override FPCOPTDEF+=RELEASE
@@ -1361,6 +1431,13 @@ ifeq ($(CPU_TARGET),i386)
 override FPCOPT+=-Aas
 endif
 endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
 ifdef LINKSHARED
 endif
 ifdef OPT

File diff ditekan karena terlalu besar
+ 5 - 2
packages/base/winunits/Makefile


+ 34 - 7
packages/extra/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/02/15]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_DIRS+=unzip zlib fftw x11 opengl gtk gtk2 syslog forms svgalib ggi libpng libgd utmp bfd gdbm ncurses tcl cdrom imlib gnome1 fpgtk newt uuid ldap openal mad oggvorbis a52 modplug dts openssl pcap libcurl cairo unixutil
 endif
@@ -258,7 +258,7 @@ ifeq ($(FULL_TARGET),i386-openbsd)
 override TARGET_DIRS+=unzip zlib x11 opengl gtk syslog forms svgalib ggi libpng libgd utmp bfd gdbm ncurses fpgtk tcl imlib gnome1 openssl pcap libcurl cairo
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_DIRS+=unzip zlib fftw x11 opengl gtk gtk2 syslog forms libpng libgd utmp bfd gdbm ncurses fpgtk tcl imlib gnome1 univint openssl libcurl cairo
+override TARGET_DIRS+=unzip zlib fftw x11 opengl gtk gtk2 syslog forms libpng libgd utmp bfd gdbm ncurses fpgtk tcl imlib gnome1 openssl libcurl cairo univint
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 override TARGET_DIRS+=os2units rexx unzip zlib x11 gtk libpng tcl imlib fpgtk
@@ -297,7 +297,7 @@ ifeq ($(FULL_TARGET),powerpc-amiga)
 override TARGET_DIRS+=amunits
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_DIRS+=unzip zlib fftw x11 opengl gtk gtk2 syslog forms libpng libgd utmp bfd gdbm ncurses fpgtk tcl imlib gnome1 univint openssl libcurl cairo
+override TARGET_DIRS+=unzip zlib fftw x11 opengl gtk gtk2 syslog forms libpng libgd utmp bfd gdbm ncurses fpgtk tcl imlib gnome1 openssl libcurl cairo univint
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 override TARGET_DIRS+=unzip zlib fftw x11 opengl gtk gtk2 syslog forms svgalib ggi libpng libgd utmp bfd gdbm ncurses tcl cdrom imlib gnome1 fpgtk newt uuid ldap openal mad oggvorbis a52 modplug dts openssl pcap libcurl cairo
@@ -329,6 +329,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=unzip zlib fftw x11 opengl gtk gtk2 syslog forms svgalib ggi libpng libgd utmp bfd gdbm ncurses tcl cdrom imlib gnome1 fpgtk newt uuid ldap openal mad oggvorbis a52 modplug dts openssl pcap libcurl cairo
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=unzip zlib fftw x11 opengl gtk gtk2 syslog forms libpng libgd utmp bfd gdbm ncurses fpgtk tcl imlib gnome1 openssl libcurl cairo
+endif
 override INSTALL_FPCPACKAGE=y
 override INSTALL_FPCSUBDIR=packages/extra
 ifdef REQUIRE_UNITSDIR
@@ -1603,10 +1606,10 @@ TARGET_DIRS_FPGTK=1
 TARGET_DIRS_TCL=1
 TARGET_DIRS_IMLIB=1
 TARGET_DIRS_GNOME1=1
-TARGET_DIRS_UNIVINT=1
 TARGET_DIRS_OPENSSL=1
 TARGET_DIRS_LIBCURL=1
 TARGET_DIRS_CAIRO=1
+TARGET_DIRS_UNIVINT=1
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 TARGET_DIRS_OS2UNITS=1
@@ -1835,10 +1838,10 @@ TARGET_DIRS_FPGTK=1
 TARGET_DIRS_TCL=1
 TARGET_DIRS_IMLIB=1
 TARGET_DIRS_GNOME1=1
-TARGET_DIRS_UNIVINT=1
 TARGET_DIRS_OPENSSL=1
 TARGET_DIRS_LIBCURL=1
 TARGET_DIRS_CAIRO=1
+TARGET_DIRS_UNIVINT=1
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 TARGET_DIRS_UNZIP=1
@@ -2088,6 +2091,30 @@ TARGET_DIRS_PCAP=1
 TARGET_DIRS_LIBCURL=1
 TARGET_DIRS_CAIRO=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_UNZIP=1
+TARGET_DIRS_ZLIB=1
+TARGET_DIRS_FFTW=1
+TARGET_DIRS_X11=1
+TARGET_DIRS_OPENGL=1
+TARGET_DIRS_GTK=1
+TARGET_DIRS_GTK2=1
+TARGET_DIRS_SYSLOG=1
+TARGET_DIRS_FORMS=1
+TARGET_DIRS_LIBPNG=1
+TARGET_DIRS_LIBGD=1
+TARGET_DIRS_UTMP=1
+TARGET_DIRS_BFD=1
+TARGET_DIRS_GDBM=1
+TARGET_DIRS_NCURSES=1
+TARGET_DIRS_FPGTK=1
+TARGET_DIRS_TCL=1
+TARGET_DIRS_IMLIB=1
+TARGET_DIRS_GNOME1=1
+TARGET_DIRS_OPENSSL=1
+TARGET_DIRS_LIBCURL=1
+TARGET_DIRS_CAIRO=1
+endif
 ifdef TARGET_DIRS_UNZIP
 unzip_all:
 	$(MAKE) -C unzip all

+ 3 - 1
packages/extra/Makefile.fpc

@@ -53,7 +53,9 @@ dirs_darwin= unzip zlib fftw \
              x11 opengl gtk gtk2 syslog \
              forms libpng libgd \
              utmp bfd gdbm ncurses fpgtk tcl imlib gnome1 \
-             univint openssl libcurl cairo
+             openssl libcurl cairo
+dirs_powerpc_darwin=univint
+dirs_i386_darwin=univint
 dirs_solaris= unzip zlib fftw \
              x11 opengl gtk gtk2 syslog \
              forms svgalib ggi libpng libgd \

+ 9 - 3
packages/extra/a52/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=a52
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=a52
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=a52
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=a52
 endif
@@ -1284,6 +1287,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 16 - 3
packages/extra/amunits/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=amunits
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=units utilunits
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=units utilunits
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_DIRS+=units utilunits
 endif
@@ -536,6 +539,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=inc
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=inc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=inc
 endif
@@ -689,6 +695,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=units utilunits
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=units utilunits
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_SOURCEDIR+=units utilunits
 endif
@@ -2117,6 +2126,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_DIRS_UNITS=1
 TARGET_DIRS_UTILUNITS=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_UNITS=1
+TARGET_DIRS_UTILUNITS=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_DIRS_UNITS=1
 TARGET_DIRS_UTILUNITS=1

+ 18 - 3
packages/extra/amunits/units/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=amunits
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=amigados amigaguide amigalib amigaprinter asl audio bootblock bullet cd clipboard colorwheel commodities configregs configvars console conunit datatypes diskfont expansion expansionbase gadtools gameport gradientslider graphics hardblocks hardware icon iffparse input inputevent intuition keyboard keymap layers locale lowlevel nonvolatile parallel prefs prtbase prtgfx realtime rexx romboot_base scsidisk serial tapedeck timer trackdisk translator utility workbench exec
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=amigados amigaguide amigalib amigaprinter asl audio bootblock bullet cd clipboard colorwheel commodities configregs configvars console conunit datatypes diskfont expansion expansionbase gadtools gameport gradientslider graphics hardblocks hardware icon iffparse input inputevent intuition keyboard keymap layers locale lowlevel nonvolatile parallel prefs prtbase prtgfx realtime rexx romboot_base scsidisk serial tapedeck timer trackdisk translator utility workbench exec
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=amigados amigaguide amigalib amigaprinter asl audio bootblock bullet cd clipboard colorwheel commodities configregs configvars console conunit datatypes diskfont expansion expansionbase gadtools gameport gradientslider graphics hardblocks hardware icon iffparse input inputevent intuition keyboard keymap layers locale lowlevel nonvolatile parallel prefs prtbase prtgfx realtime rexx romboot_base scsidisk serial tapedeck timer trackdisk translator utility workbench exec
 endif
@@ -536,6 +539,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=../inc
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=../inc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=../inc
 endif
@@ -689,6 +695,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=../utilunits
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=../utilunits
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=../utilunits
 endif
@@ -842,6 +851,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=.
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=.
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_SOURCEDIR+=.
 endif
@@ -1743,6 +1755,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 18 - 3
packages/extra/amunits/utilunits/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=amunits
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=amigautils consoleio deadkeys doublebuffer easyasl hisoft linklist longarray msgbox pastoc pcq systemvartags tagsarray timerutils vartags wbargs
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=amigautils consoleio deadkeys doublebuffer easyasl hisoft linklist longarray msgbox pastoc pcq systemvartags tagsarray timerutils vartags wbargs
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=amigautils consoleio deadkeys doublebuffer easyasl hisoft linklist longarray msgbox pastoc pcq systemvartags tagsarray timerutils vartags wbargs
 endif
@@ -536,6 +539,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=../inc
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=../inc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=../inc
 endif
@@ -689,6 +695,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=../units
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=../units
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=../units
 endif
@@ -842,6 +851,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=.
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=.
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_SOURCEDIR+=.
 endif
@@ -1743,6 +1755,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 9 - 3
packages/extra/bfd/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=bfd
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=bfd
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=bfd
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=bfd
 endif
@@ -1286,6 +1289,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 17 - 2
packages/extra/cairo/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/02/26]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=cairo
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=cairo
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=cairo
 endif
@@ -1677,6 +1680,18 @@ REQUIRE_PACKAGES_PTHREADS=1
 REQUIRE_PACKAGES_FCL-BASE=1
 REQUIRE_PACKAGES_FCL-IMAGE=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_NETDB=1
+REQUIRE_PACKAGES_LIBASYNC=1
+REQUIRE_PACKAGES_PTHREADS=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-IMAGE=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_X11=1

+ 12 - 3
packages/extra/cdrom/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=cdrom
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=cdrom discid
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=cdrom discid
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=cdrom discid
 endif
@@ -559,6 +562,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=showcds getdiscid
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=showcds getdiscid
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=showcds getdiscid
 endif
@@ -1461,6 +1467,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 9 - 3
packages/extra/dts/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=dts
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=dts
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=dts
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=dts
 endif
@@ -1284,6 +1287,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 9 - 3
packages/extra/fftw/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=fftw
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=fftw_s
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=fftw_s
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=fftw_s
 endif
@@ -1286,6 +1289,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif

+ 19 - 3
packages/extra/forms/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=forms
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=fd2pascal
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=fd2pascal
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=fd2pascal
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=xforms
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=xforms
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=xforms
 endif
@@ -688,6 +694,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLEDIRS+=demo
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLEDIRS+=demo
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLEDIRS+=demo
 endif
@@ -1673,6 +1682,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_X11=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_X11=1
@@ -2480,6 +2493,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_EXAMPLEDIRS_DEMO=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_EXAMPLEDIRS_DEMO=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_EXAMPLEDIRS_DEMO=1
 endif

+ 11 - 3
packages/extra/forms/demo/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/01/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_PROGRAMS+=pushme yesno pushbutton touchbutton minput inputall choice butttypes colsel colsel1 buttonall chartall positioner secretinput cursor fdial ldial ndial invslider sliderall borderwidth boxtype xyplotover arrowbutton browserop browserall chartstrip colbrowser counter fbrowse1 fbrowse flclock fonts goodies lalign ll longlabel menu objinactive objpos newbutton multilabel objreturn
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=pushme yesno pushbutton touchbutton minput inputall choice butttypes colsel colsel1 buttonall chartall positioner secretinput cursor fdial ldial ndial invslider sliderall borderwidth boxtype xyplotover arrowbutton browserop browserall chartstrip colbrowser counter fbrowse1 fbrowse flclock fonts goodies lalign ll longlabel menu objinactive objpos newbutton multilabel objreturn
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=pushme yesno pushbutton touchbutton minput inputall choice butttypes colsel colsel1 buttonall chartall positioner secretinput cursor fdial ldial ndial invslider sliderall borderwidth boxtype xyplotover arrowbutton browserop browserall chartstrip colbrowser counter fbrowse1 fbrowse flclock fonts goodies lalign ll longlabel menu objinactive objpos newbutton multilabel objreturn
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=pushme yesno pushbutton touchbutton minput inputall choice butttypes colsel colsel1 buttonall chartall positioner secretinput cursor fdial ldial ndial invslider sliderall borderwidth boxtype xyplotover arrowbutton browserop browserall chartstrip colbrowser counter fbrowse1 fbrowse flclock fonts goodies lalign ll longlabel menu objinactive objpos newbutton multilabel objreturn
 endif
@@ -1413,6 +1416,11 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_X11=1
 REQUIRE_PACKAGES_FORMS=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_FORMS=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_X11=1

+ 20 - 2
packages/extra/fpgtk/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/02/26]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
 #
 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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-embedded
+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-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=fpglib fpgtk fpgtkext
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=fpglib fpgtk fpgtkext
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=fpglib fpgtk fpgtkext
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_RSTS+=fpgtk fpgtkext
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_RSTS+=fpgtk fpgtkext
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_RSTS+=fpgtk fpgtkext
 endif
@@ -1798,6 +1804,18 @@ REQUIRE_PACKAGES_GTK=1
 REQUIRE_PACKAGES_X11=1
 REQUIRE_PACKAGES_OPENGL=1
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_NETDB=1
+REQUIRE_PACKAGES_LIBASYNC=1
+REQUIRE_PACKAGES_PTHREADS=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_GTK=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HASH=1

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini