Forráskód Böngészése

* 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 éve
szülő
commit
c13ff3729b
100 módosított fájl, 3375 hozzáadás és 1781 törlés
  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/pexpr.pas svneol=native#text/plain
 compiler/pinline.pas svneol=native#text/plain
 compiler/pinline.pas svneol=native#text/plain
 compiler/pmodules.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/agppcmpw.pas svneol=native#text/plain
 compiler/powerpc/aoptcpu.pas svneol=native#text/plain
 compiler/powerpc/aoptcpu.pas svneol=native#text/plain
 compiler/powerpc/aoptcpub.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/rppcstab.inc svneol=native#text/plain
 compiler/powerpc/rppcstd.inc svneol=native#text/plain
 compiler/powerpc/rppcstd.inc svneol=native#text/plain
 compiler/powerpc/rppcsup.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/aoptcpu.pas svneol=native#text/plain
 compiler/powerpc64/aoptcpub.pas svneol=native#text/plain
 compiler/powerpc64/aoptcpub.pas svneol=native#text/plain
 compiler/powerpc64/aoptcpuc.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/nppcadd.pas svneol=native#text/plain
 compiler/powerpc64/nppccal.pas svneol=native#text/plain
 compiler/powerpc64/nppccal.pas svneol=native#text/plain
 compiler/powerpc64/nppccnv.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/nppcld.pas svneol=native#text/plain
 compiler/powerpc64/nppcmat.pas svneol=native#text/plain
 compiler/powerpc64/nppcmat.pas svneol=native#text/plain
 compiler/powerpc64/ppcins.dat -text
 compiler/powerpc64/ppcins.dat -text
@@ -378,6 +375,7 @@ compiler/ppc.dof -text
 compiler/ppc68k.lpi svneol=native#text/plain
 compiler/ppc68k.lpi svneol=native#text/plain
 compiler/ppcarm.lpi svneol=native#text/plain
 compiler/ppcarm.lpi svneol=native#text/plain
 compiler/ppcgen/aasmcpu.pas 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/cgppc.pas svneol=native#text/plain
 compiler/ppcgen/ngppcadd.pas svneol=native#text/plain
 compiler/ppcgen/ngppcadd.pas svneol=native#text/plain
 compiler/ppcgen/ngppccnv.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/pmutext.inc svneol=native#text/plain
 rtl/darwin/powerpc/sig_cpu.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/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/pthread.inc svneol=native#text/plain
 rtl/darwin/ptypes.inc svneol=native#text/plain
 rtl/darwin/ptypes.inc svneol=native#text/plain
 rtl/darwin/signal.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/tcext3.o -text
 tests/test/cg/obj/darwin/powerpc/tcext4.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/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/ctest.o -text
 tests/test/cg/obj/freebsd/i386/tcext3.o -text
 tests/test/cg/obj/freebsd/i386/tcext3.o -text
 tests/test/cg/obj/freebsd/i386/tcext4.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/tw8258.pp svneol=native#text/plain
 tests/webtbs/tw8258a.pp svneol=native#text/plain
 tests/webtbs/tw8258a.pp svneol=native#text/plain
 tests/webtbs/tw8264.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/tw8304.pp svneol=native#text/plain
 tests/webtbs/tw8312.pp svneol=native#text/plain
 tests/webtbs/tw8312.pp svneol=native#text/plain
 tests/webtbs/tw8321.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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -492,6 +492,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=compiler rtl utils fv packages ide installer
 override TARGET_DIRS+=compiler rtl utils fv packages ide installer
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=compiler rtl utils fv packages ide installer
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_DIRS+=compiler rtl utils fv packages ide installer
 override TARGET_DIRS+=compiler rtl utils fv packages ide installer
 endif
 endif
@@ -2171,6 +2174,15 @@ TARGET_DIRS_PACKAGES=1
 TARGET_DIRS_IDE=1
 TARGET_DIRS_IDE=1
 TARGET_DIRS_INSTALLER=1
 TARGET_DIRS_INSTALLER=1
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_DIRS_COMPILER=1
 TARGET_DIRS_COMPILER=1
 TARGET_DIRS_RTL=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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=compiler
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 unexport FPC_VERSION FPC_COMPILERINFO
 unexport FPC_VERSION FPC_COMPILERINFO
@@ -502,6 +502,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=utils
 override TARGET_DIRS+=utils
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=utils
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_DIRS+=utils
 override TARGET_DIRS+=utils
 endif
 endif
@@ -655,6 +658,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=pp
 override TARGET_PROGRAMS+=pp
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=pp
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=pp
 override TARGET_PROGRAMS+=pp
 endif
 endif
@@ -809,6 +815,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=$(PPC_TARGET)
 override COMPILER_INCLUDEDIR+=$(PPC_TARGET)
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=$(PPC_TARGET)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=$(PPC_TARGET)
 override COMPILER_INCLUDEDIR+=$(PPC_TARGET)
 endif
 endif
@@ -962,6 +971,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 endif
 endif
@@ -1115,6 +1127,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_TARGETDIR+=.
 override COMPILER_TARGETDIR+=.
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_TARGETDIR+=.
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_TARGETDIR+=.
 override COMPILER_TARGETDIR+=.
 endif
 endif
@@ -1268,6 +1283,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 endif
 endif
@@ -2169,6 +2187,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -2916,6 +2937,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_DIRS_UTILS=1
 TARGET_DIRS_UTILS=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_UTILS=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_DIRS_UTILS=1
 TARGET_DIRS_UTILS=1
 endif
 endif

+ 1 - 1
compiler/aasmdata.pas

@@ -282,7 +282,7 @@ implementation
         for hal:=low(TAsmListType) to high(TAsmListType) do
         for hal:=low(TAsmListType) to high(TAsmListType) do
           AsmLists[hal]:=TAsmList.create;
           AsmLists[hal]:=TAsmList.create;
         { PIC data }
         { 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,''));
           AsmLists[al_picdata].concat(tai_directive.create(asd_non_lazy_symbol_pointer,''));
         { CFI }
         { CFI }
         FAsmCFI:=CAsmCFI.Create;
         FAsmCFI:=CAsmCFI.Create;

+ 14 - 10
compiler/aggas.pas

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

+ 7 - 1
compiler/cgobj.pas

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

+ 1 - 1
compiler/cgutils.pas

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

+ 7 - 2
compiler/cresstr.pas

@@ -133,7 +133,7 @@ uses
           s : pchar;
           s : pchar;
           referencelab: TAsmLabel;
           referencelab: TAsmLabel;
         begin
         begin
-          if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+          if (target_info.system in systems_darwin) then
             begin
             begin
               current_asmdata.getdatalabel(referencelab);
               current_asmdata.getdatalabel(referencelab);
               current_asmdata.asmlists[al_const].concat(tai_label.create(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(-1));
           current_asmdata.asmlists[al_const].concat(tai_const.create_aint(len));
           current_asmdata.asmlists[al_const].concat(tai_const.create_aint(len));
           current_asmdata.asmlists[al_const].concat(tai_label.create(result));
           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));
              current_asmdata.asmlists[al_const].concat(tai_directive.create(asd_reference,referencelab.name));
           getmem(s,len+1);
           getmem(s,len+1);
           move(p^,s^,len);
           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));
         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(
         current_asmdata.AsmLists[al_resourcestrings].concat(tai_symbol.createname_global(
           make_mangledname('RESSTR',current_module.localsymtable,'END'),AT_DATA,0));
           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;
       end;
 
 
 
 

+ 1 - 1
compiler/dbgdwarf.pas

@@ -2510,7 +2510,7 @@ implementation
                     if (prevlabel = nil) or
                     if (prevlabel = nil) or
                        { darwin's assembler cannot create an uleb128 of the difference }
                        { darwin's assembler cannot create an uleb128 of the difference }
                        { between to symbols                                            }
                        { 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
                       begin
                         asmline.concat(tai_const.create_8bit(DW_LNS_extended_op));
                         asmline.concat(tai_const.create_8bit(DW_LNS_extended_op));
 {$ifdef cpu64bit}
 {$ifdef cpu64bit}

+ 1 - 1
compiler/dbgstabs.pas

@@ -1573,7 +1573,7 @@ implementation
           exit;
           exit;
         list.concat(Tai_section.create(sec_fpc,'links',0));
         list.concat(Tai_section.create(sec_fpc,'links',0));
         { make sure the debuginfo doesn't get stripped out }
         { 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
           begin
             dbgtable:=tai_symbol.createname('DEBUGINFOTABLE',AT_DATA,0);
             dbgtable:=tai_symbol.createname('DEBUGINFOTABLE',AT_DATA,0);
             list.concat(tai_directive.create(asd_no_dead_strip,dbgtable.sym.name));
             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,
        toptimizerswitch = (cs_opt_none,
          cs_opt_level1,cs_opt_level2,cs_opt_level3,
          cs_opt_level1,cs_opt_level2,cs_opt_level3,
          cs_opt_regvar,cs_opt_uncertain,cs_opt_size,cs_opt_stackframe,
          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;
        toptimizerswitches = set of toptimizerswitch;
 
 
@@ -161,7 +161,7 @@ interface
        OptimizerSwitchStr : array[toptimizerswitch] of string[10] = ('',
        OptimizerSwitchStr : array[toptimizerswitch] of string[10] = ('',
          'LEVEL1','LEVEL2','LEVEL3',
          'LEVEL1','LEVEL2','LEVEL3',
          'REGVAR','UNCERTAIN','SIZE','STACKFRAME',
          'REGVAR','UNCERTAIN','SIZE','STACKFRAME',
-         'PEEPHOLE','ASMCSE','LOOPUNROLL','TAILREC'
+         'PEEPHOLE','ASMCSE','LOOPUNROLL','TAILREC','CSE'
        );
        );
 
 
        { switches being applied to all CPUs at the given level }
        { switches being applied to all CPUs at the given level }

+ 35 - 2
compiler/htypechk.pas

@@ -157,11 +157,12 @@ interface
 implementation
 implementation
 
 
     uses
     uses
+       sysutils,
        globtype,systems,
        globtype,systems,
        cutils,cclasses,verbose,
        cutils,cclasses,verbose,
        symtable,
        symtable,
        defutil,defcmp,
        defutil,defcmp,
-       nbas,ncnv,nld,nmem,ncal,nmat,ninl,nutils,
+       nbas,ncnv,nld,nmem,ncal,nmat,ninl,nutils,ncon,
        cgbase,procinfo
        cgbase,procinfo
        ;
        ;
 
 
@@ -358,9 +359,41 @@ implementation
         eq : tequaltype;
         eq : tequaltype;
         conv : tconverttype;
         conv : tconverttype;
         pd : tprocdef;
         pd : tprocdef;
+        oldcount,
+        count: longint;
+        parasym : tparavarsym;
       begin
       begin
         result:=false;
         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
           1 : begin
                 ld:=tparavarsym(pf.parast.SymList[0]).vardef;
                 ld:=tparavarsym(pf.parast.SymList[0]).vardef;
                 { assignment is a special case }
                 { assignment is a special case }

+ 20 - 0
compiler/ncal.pas

@@ -159,6 +159,7 @@ interface
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           function dogetcopy : tnode;override;
           function dogetcopy : tnode;override;
           procedure insertintolist(l : tnodelist);override;
           procedure insertintolist(l : tnodelist);override;
+          function  pass_1 : tnode;override;
           procedure get_paratype;
           procedure get_paratype;
           procedure insert_typeconv(do_count : boolean);
           procedure insert_typeconv(do_count : boolean);
           procedure det_registers;
           procedure det_registers;
@@ -743,9 +744,18 @@ implementation
          result:=n;
          result:=n;
       end;
       end;
 
 
+
     procedure tcallparanode.insertintolist(l : tnodelist);
     procedure tcallparanode.insertintolist(l : tnodelist);
+      begin
+      end;
+
 
 
+    function tcallparanode.pass_1 : tnode;
       begin
       begin
+        firstpass(left);
+        if assigned(right) then
+          firstpass(right);
+        result:=nil;
       end;
       end;
 
 
 
 
@@ -1749,6 +1759,16 @@ implementation
                    if not(assigned(procdefinition.owner.defowner)) then
                    if not(assigned(procdefinition.owner.defowner)) then
                      internalerror(200309287);
                      internalerror(200309287);
                    hiddentree:=cloadparentfpnode.create(tprocdef(procdefinition.owner.defowner));
                    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;
                  end;
               { add the hidden parameter }
               { add the hidden parameter }
               if not assigned(hiddentree) then
               if not assigned(hiddentree) then

+ 24 - 9
compiler/ncginl.pas

@@ -715,22 +715,37 @@ implementation
     procedure Tcginlinenode.second_get_caller_frame;
     procedure Tcginlinenode.second_get_caller_frame;
 
 
     var frame_ref:Treference;
     var frame_ref:Treference;
+        frame_reg:Tregister;
+        use_frame_pointer:boolean;
 
 
     begin
     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
         begin
           location_reset(location,LOC_CREGISTER,OS_ADDR);
           location_reset(location,LOC_CREGISTER,OS_ADDR);
           location.register:=NR_FRAME_POINTER_REG;
           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
         end
       else
       else
         begin
         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;
     end;
     end;
 
 
@@ -743,7 +758,7 @@ implementation
         begin
         begin
           location_reset(location,LOC_REGISTER,OS_ADDR);
           location_reset(location,LOC_REGISTER,OS_ADDR);
           location.register:=cg.getaddressregister(current_asmdata.currasmlist);
           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);
           cg.a_load_ref_reg(current_asmdata.currasmlist,OS_ADDR,OS_ADDR,frame_ref,location.register);
         end
         end
       else
       else

+ 147 - 22
compiler/ncgld.pas

@@ -27,12 +27,13 @@ unit ncgld;
 interface
 interface
 
 
     uses
     uses
-      node,nld;
+      node,nld,cgutils;
 
 
     type
     type
        tcgloadnode = class(tloadnode)
        tcgloadnode = class(tloadnode)
           procedure pass_generate_code;override;
           procedure pass_generate_code;override;
           procedure generate_picvaraccess;virtual;
           procedure generate_picvaraccess;virtual;
+          procedure changereflocation(const ref: treference);
        end;
        end;
 
 
        tcgassignmentnode = class(tassignmentnode)
        tcgassignmentnode = class(tassignmentnode)
@@ -54,6 +55,7 @@ implementation
       cutils,
       cutils,
       systems,
       systems,
       verbose,globtype,globals,
       verbose,globtype,globals,
+      nutils,
       symconst,symtype,symdef,symsym,defutil,paramgr,
       symconst,symtype,symdef,symsym,defutil,paramgr,
       ncnv,ncon,nmem,nbas,ncgrtti,
       ncnv,ncon,nmem,nbas,ncgrtti,
       aasmbase,aasmtai,aasmdata,aasmcpu,
       aasmbase,aasmtai,aasmdata,aasmcpu,
@@ -61,9 +63,119 @@ implementation
       procinfo,
       procinfo,
       cpubase,parabase,
       cpubase,parabase,
       tgobj,ncgutil,
       tgobj,ncgutil,
-      cgutils,cgobj,
+      cgobj,
       ncgbas,ncgflw;
       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
                              SecondLoad
 *****************************************************************************}
 *****************************************************************************}
@@ -77,6 +189,24 @@ implementation
       end;
       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;
     procedure tcgloadnode.pass_generate_code;
       var
       var
         hregister : tregister;
         hregister : tregister;
@@ -451,26 +581,7 @@ implementation
 
 
         releaseright:=true;
         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 }
         { shortstring assignments are handled separately }
-        else
-{$endif old_append_str}
-
         if is_shortstring(left.resultdef) then
         if is_shortstring(left.resultdef) then
           begin
           begin
             {
             {
@@ -526,6 +637,13 @@ implementation
             else
             else
               internalerror(200204249);
               internalerror(200204249);
           end
           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
         else
           begin
           begin
             { SSA support }
             { SSA support }
@@ -941,7 +1059,14 @@ implementation
     procedure tcgrttinode.pass_generate_code;
     procedure tcgrttinode.pass_generate_code;
       begin
       begin
         location_reset(location,LOC_CREFERENCE,OS_NO);
         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;
       end;
 
 
 
 

+ 245 - 2
compiler/ncgrtti.pas

@@ -39,6 +39,7 @@ interface
         function  fields_count(st:tsymtable;rt:trttitype):longint;
         function  fields_count(st:tsymtable;rt:trttitype):longint;
         procedure fields_write_rtti(st:tsymtable;rt:trttitype);
         procedure fields_write_rtti(st:tsymtable;rt:trttitype);
         procedure fields_write_rtti_data(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);
         procedure published_write_rtti(st:tsymtable;rt:trttitype);
         function  published_properties_count(st:tsymtable):longint;
         function  published_properties_count(st:tsymtable):longint;
         procedure published_properties_write_rtti_data(propnamelist:TFPHashObjectList;st:tsymtable);
         procedure published_properties_write_rtti_data(propnamelist:TFPHashObjectList;st:tsymtable);
@@ -50,6 +51,8 @@ interface
       public
       public
         procedure write_rtti(def:tdef;rt:trttitype);
         procedure write_rtti(def:tdef;rt:trttitype);
         function  get_rtti_label(def:tdef;rt:trttitype):tasmsymbol;
         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;
       end;
 
 
     var
     var
@@ -389,7 +392,7 @@ implementation
           current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(tkEnumeration));
           current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(tkEnumeration));
           write_rtti_name(def);
           write_rtti_name(def);
 {$ifdef cpurequiresproperalignment}
 {$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}
 {$endif cpurequiresproperalignment}
           case longint(def.size) of
           case longint(def.size) of
             1 :
             1 :
@@ -400,7 +403,7 @@ implementation
               current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(otULong));
               current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(otULong));
           end;
           end;
 {$ifdef cpurequiresproperalignment}
 {$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}
 {$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.min));
           current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_32bit(def.max));
           current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_32bit(def.max));
@@ -821,6 +824,235 @@ implementation
         end;
         end;
       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);
     procedure TRTTIWriter.write_child_rtti_data(def:tdef;rt:trttitype);
       begin
       begin
@@ -873,6 +1105,7 @@ implementation
         current_asmdata.asmlists[al_rtti].concat(Tai_symbol.Create_global(rttilab,0));
         current_asmdata.asmlists[al_rtti].concat(Tai_symbol.Create_global(rttilab,0));
         write_rtti_data(def,rt);
         write_rtti_data(def,rt);
         current_asmdata.asmlists[al_rtti].concat(Tai_symbol_end.Create(rttilab));
         current_asmdata.asmlists[al_rtti].concat(Tai_symbol_end.Create(rttilab));
+        write_rtti_extrasyms(def,rt,rttilab);
       end;
       end;
 
 
 
 
@@ -881,5 +1114,15 @@ implementation
         result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt));
         result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt));
       end;
       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.
 end.
 
 

+ 2 - 2
compiler/ncgutil.pas

@@ -1965,7 +1965,7 @@ implementation
         current_procinfo.procdef.procendtai:=tai(list.last);
         current_procinfo.procdef.procendtai:=tai(list.last);
 
 
         { finalisation marker for Mac OS X }
         { 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.islibrary) and
            (((current_module.flags and uf_finalize)<>0) or
            (((current_module.flags and uf_finalize)<>0) or
             (current_procinfo.procdef.proctypeoption = potype_proginit)) then
             (current_procinfo.procdef.proctypeoption = potype_proginit)) then
@@ -1980,7 +1980,7 @@ implementation
 
 
         if (current_procinfo.procdef.proctypeoption=potype_proginit) then
         if (current_procinfo.procdef.proctypeoption=potype_proginit) then
           begin
           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
               not(current_module.islibrary) then
              begin
              begin
               list.concat(tai_section.create(sec_code,'',4));
               list.concat(tai_section.create(sec_code,'',4));

+ 3 - 3
compiler/ncnv.pas

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

+ 40 - 25
compiler/nflw.pas

@@ -84,6 +84,9 @@ interface
           constructor create(l,r,_t1 : tnode);virtual;reintroduce;
           constructor create(l,r,_t1 : tnode);virtual;reintroduce;
           function pass_typecheck:tnode;override;
           function pass_typecheck:tnode;override;
           function pass_1 : tnode;override;
           function pass_1 : tnode;override;
+          function simplify : tnode;override;
+         private
+          function internalsimplify(warn: boolean) : tnode;
        end;
        end;
        tifnodeclass = class of tifnode;
        tifnodeclass = class of tifnode;
 
 
@@ -658,6 +661,42 @@ implementation
       end;
       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;
     function tifnode.pass_typecheck:tnode;
       begin
       begin
          result:=nil;
          result:=nil;
@@ -685,31 +724,7 @@ implementation
              else
              else
                Message1(type_e_boolean_expr_expected,left.resultdef.typename);
                Message1(type_e_boolean_expr_expected,left.resultdef.typename);
            end;
            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;
       end;
 
 
 
 

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 539 - 440
compiler/ninl.pas


+ 7 - 3
compiler/nld.pas

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

+ 0 - 1
compiler/nopt.pas

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

+ 15 - 5
compiler/nutils.pas

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

+ 1 - 1
compiler/ogelf.pas

@@ -607,7 +607,7 @@ implementation
         secname : string;
         secname : string;
       begin
       begin
         if (cs_create_pic in current_settings.moduleswitches) and
         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]
           secname:=secnames_pic[atype]
         else
         else
           secname:=secnames[atype];
           secname:=secnames[atype];

+ 166 - 2
compiler/optcse.pas

@@ -23,14 +23,177 @@ unit optcse;
 
 
 {$i fpcdefs.inc}
 {$i fpcdefs.inc}
 
 
+{ $define csedebug}
+
   interface
   interface
 
 
-    procedure docse(rootnode : tnode);
+    uses
+      node;
+
+    function do_optcse(var rootnode : tnode) : tnode;
 
 
   implementation
   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
       begin
+        foreachnodestatic(pm_postprocess,rootnode,@searchcsedomain,nil);
+        result:=nil;
+(*
         { create a linear list of nodes }
         { create a linear list of nodes }
 
 
         { create hash values }
         { create hash values }
@@ -74,6 +237,7 @@ unit optcse;
                   delete the temp. }
                   delete the temp. }
               end;
               end;
           end;
           end;
+*)
       end;
       end;
 
 
 end.
 end.

+ 11 - 11
compiler/pdecvar.pas

@@ -919,7 +919,7 @@ implementation
           if is_cdecl or
           if is_cdecl or
              (
              (
               is_dll and
               is_dll and
-              (target_info.system in [system_powerpc_darwin,system_i386_darwin])
+              (target_info.system in systems_darwin)
              ) then
              ) then
             C_Name := target_info.Cprefix+C_Name;
             C_Name := target_info.Cprefix+C_Name;
 
 
@@ -1143,15 +1143,15 @@ implementation
          uniondef : trecorddef;
          uniondef : trecorddef;
          hintsymoptions : tsymoptions;
          hintsymoptions : tsymoptions;
          semicoloneaten: boolean;
          semicoloneaten: boolean;
-{$ifdef powerpc}
+{$if defined(powerpc) or defined(powerpc64)}
          tempdef: tdef;
          tempdef: tdef;
          is_first_field: boolean;
          is_first_field: boolean;
-{$endif powerpc}
+{$endif powerpc or powerpc64}
       begin
       begin
          recst:=tabstractrecordsymtable(symtablestack.top);
          recst:=tabstractrecordsymtable(symtablestack.top);
-{$ifdef powerpc}
+{$if defined(powerpc) or defined(powerpc64)}
          is_first_field := true;
          is_first_field := true;
-{$endif powerpc}
+{$endif powerpc or powerpc64}
          old_current_object_option:=current_object_option;
          old_current_object_option:=current_object_option;
          { all variables are public if not in a object declaration }
          { all variables are public if not in a object declaration }
          if not(vd_object in options) then
          if not(vd_object in options) then
@@ -1191,7 +1191,7 @@ implementation
              if maybe_parse_proc_directives(hdef) then
              if maybe_parse_proc_directives(hdef) then
                semicoloneaten:=true;
                semicoloneaten:=true;
 
 
-{$ifdef powerpc}
+{$if defined(powerpc) or defined(powerpc64)}
              { from gcc/gcc/config/rs6000/rs6000.h:
              { from gcc/gcc/config/rs6000/rs6000.h:
               /* APPLE LOCAL begin Macintosh alignment 2002-1-22 ff */
               /* APPLE LOCAL begin Macintosh alignment 2002-1-22 ff */
               /* Return the alignment of a struct based on the Macintosh PowerPC
               /* 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
                  (32-bit) alignment, in which case the alignment is determined by
                  the alignment of the first field.  */
                  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
                 is_first_field and
                 (symtablestack.top.symtabletype = recordsymtable) and
                 (symtablestack.top.symtabletype = recordsymtable) and
                 (trecordsymtable(symtablestack.top).usefieldalignment = -1) then
                 (trecordsymtable(symtablestack.top).usefieldalignment = -1) then
@@ -1220,7 +1220,7 @@ implementation
                    trecordsymtable(symtablestack.top).padalignment := maxpadalign;
                    trecordsymtable(symtablestack.top).padalignment := maxpadalign;
                  is_first_field := false;
                  is_first_field := false;
                end;
                end;
-{$endif powerpc}
+{$endif powerpc or powerpc64}
 
 
              { types that use init/final are not allowed in variant parts, but
              { types that use init/final are not allowed in variant parts, but
                classes are allowed }
                classes are allowed }
@@ -1388,14 +1388,14 @@ implementation
               unionsymtable.datasize:=maxsize;
               unionsymtable.datasize:=maxsize;
               unionsymtable.fieldalignment:=maxalignment;
               unionsymtable.fieldalignment:=maxalignment;
               unionsymtable.addalignmentpadding;
               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 }
               { 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
                  is_first_field and
                  (recst.usefieldalignment = -1) and
                  (recst.usefieldalignment = -1) and
                  (maxpadalign > recst.padalignment) then
                  (maxpadalign > recst.padalignment) then
                 recst.padalignment:=maxpadalign;
                 recst.padalignment:=maxpadalign;
-{$endif powerpc}
+{$endif powerpc or powerpc64}
               { Align the offset where the union symtable is added }
               { Align the offset where the union symtable is added }
               if (recst.usefieldalignment=-1) then
               if (recst.usefieldalignment=-1) then
                 usedalign:=used_align(unionsymtable.recordalignment,current_settings.alignment.recordalignmin,current_settings.alignment.maxCrecordalign)
                 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
             if tpointerdef(p1.resultdef).pointeddef.needs_inittable then
              begin
              begin
                para := ccallparanode.create(caddrnode.create_internal(crttinode.create
                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
                        ccallparanode.create(ctemprefnode.create
                           (temp),nil));
                           (temp),nil));
                addstatement(newstatement,ccallnode.createintern('fpc_initialize',para));
                addstatement(newstatement,ccallnode.createintern('fpc_initialize',para));
@@ -563,7 +563,7 @@ implementation
                    ccallparanode.create(cordconstnode.create
                    ccallparanode.create(cordconstnode.create
                       (counter,s32inttype,true),
                       (counter,s32inttype,true),
                    ccallparanode.create(caddrnode.create_internal
                    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))));
                    ccallparanode.create(ctypeconvnode.create_internal(destppn,voidpointertype),nil))));
             addstatement(newstatement,ccallnode.createintern('fpc_dynarray_setlength',npara));
             addstatement(newstatement,ccallnode.createintern('fpc_dynarray_setlength',npara));
             addstatement(newstatement,ctempdeletenode.create(temp));
             addstatement(newstatement,ctempdeletenode.create(temp));
@@ -657,7 +657,7 @@ implementation
                   ccallparanode.create(ctypeconvnode.create
                   ccallparanode.create(ctypeconvnode.create
                      (ppn.left,s32inttype),
                      (ppn.left,s32inttype),
                   ccallparanode.create(caddrnode.create_internal
                   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
                   ccallparanode.create(caddrnode.create_internal
                      (destppn.left),nil))));
                      (destppn.left),nil))));
            newblock:=ccallnode.createintern('fpc_finalize_array',npara);
            newblock:=ccallnode.createintern('fpc_finalize_array',npara);
@@ -750,7 +750,7 @@ implementation
             npara:=ccallparanode.create(highppn,
             npara:=ccallparanode.create(highppn,
                    ccallparanode.create(lowppn,
                    ccallparanode.create(lowppn,
                    ccallparanode.create(caddrnode.create_internal
                    ccallparanode.create(caddrnode.create_internal
-                      (crttinode.create(tstoreddef(ppn.left.resultdef),initrtti)),
+                      (crttinode.create(tstoreddef(ppn.left.resultdef),initrtti,rdt_normal)),
                    ccallparanode.create
                    ccallparanode.create
                       (ctypeconvnode.create_internal(ppn.left,voidpointertype),nil))));
                       (ctypeconvnode.create_internal(ppn.left,voidpointertype),nil))));
             copynode:=ccallnode.createinternres('fpc_dynarray_copy',npara,ppn.left.resultdef);
             copynode:=ccallnode.createinternres('fpc_dynarray_copy',npara,ppn.left.resultdef);

+ 2 - 2
compiler/pmodules.pas

@@ -1312,12 +1312,12 @@ implementation
           begin
           begin
             main_procinfo:=create_main_proc(make_mangledname('',current_module.localsymtable,mainaliasname),potype_proginit,current_module.localsymtable);
             main_procinfo:=create_main_proc(make_mangledname('',current_module.localsymtable,mainaliasname),potype_proginit,current_module.localsymtable);
             { Win32 startup code needs a single name }
             { 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')
               main_procinfo.procdef.aliasnames.insert('PASCALMAIN')
             else
             else
               main_procinfo.procdef.aliasnames.insert(target_info.Cprefix+'PASCALMAIN')
               main_procinfo.procdef.aliasnames.insert(target_info.Cprefix+'PASCALMAIN')
           end
           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
            begin
              main_procinfo:=create_main_proc('PASCALMAIN',potype_proginit,current_module.localsymtable);
              main_procinfo:=create_main_proc('PASCALMAIN',potype_proginit,current_module.localsymtable);
            end
            end

+ 0 - 256
compiler/powerpc/cgcpu.pas

@@ -81,16 +81,12 @@ unit cgcpu;
         procedure g_save_standard_registers(list:TAsmList); override;
         procedure g_save_standard_registers(list:TAsmList); override;
         procedure g_restore_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;
         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 }
         { 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        }
         { that's the case, we can use rlwinm to do an AND operation        }
         function get_rlwi_const(a: aint; var l1, l2: longint): boolean;
         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
       protected
        procedure a_load_regconst_subsetreg_intern(list : TAsmList; fromsize, subsetsize: tcgsize; fromreg: tregister; const sreg: tsubsetregister; slopt: tsubsetloadopt); override;
        procedure a_load_regconst_subsetreg_intern(list : TAsmList; fromsize, subsetsize: tcgsize; fromreg: tregister; const sreg: tsubsetregister; slopt: tsubsetloadopt); override;
       private
       private
@@ -116,10 +112,6 @@ unit cgcpu;
         { instruction                                                      }
         { instruction                                                      }
         function issimpleref(const ref: treference): boolean;
         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;
         function save_regs(list : TAsmList):longint;
         procedure restore_regs(list : TAsmList);
         procedure restore_regs(list : TAsmList);
      end;
      end;
@@ -1511,88 +1503,6 @@ const
       end;
       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 ************ }
 { ************* concatcopy ************ }
 
 
 {$ifndef ppc603}
 {$ifndef ppc603}
@@ -1784,78 +1694,6 @@ const
       end;
       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! :) *****************}
 {***************** This is private property, keep out! :) *****************}
 
 
     function tcgppc.issimpleref(const ref: treference): boolean;
     function tcgppc.issimpleref(const ref: treference): boolean;
@@ -1990,100 +1828,6 @@ const
       end;
       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);
     procedure tcg64fppc.a_op64_reg_reg(list : TAsmList;op:TOpCG;size : tcgsize;regsrc,regdst : tregister64);
       begin
       begin
         a_op64_reg_reg_reg(list,op,size,regsrc,regdst,regdst);
         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;
     procedure g_concatcopy(list: TAsmList; const source, dest: treference;
       len: aint); override;
       len: aint); override;
 
 
-    procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const
-      labelname: string; ioffset: longint); override;
   private
   private
 
 
     procedure a_load_regconst_subsetreg_intern(list : TAsmList; fromsize, subsetsize: tcgsize; fromreg: tregister; const sreg: tsubsetregister; slopt: tsubsetloadopt); override;
     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 }
       for the current procedure }
     procedure calcFirstUsedGPR(out firstgpr : TSuperRegister; out gprcount : aint);
     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
     { 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
      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
      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;
 function cgsize2string(const size : TCgSize) : string;
 const
 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_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_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',
     '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;
 procedure tcgppc.init_register_allocators;
 begin
 begin
   inherited init_register_allocators;
   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,
   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_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}
 {$WARNING FIX ME}
   rg[R_MMREGISTER] := trgcpu.create(R_MMREGISTER, R_SUBNONE,
   rg[R_MMREGISTER] := trgcpu.create(R_MMREGISTER, R_SUBNONE,
     [RS_M0, RS_M1, RS_M2], first_mm_imreg, []);
     [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
   begin
     if (lo(a) = 0) and (hi(a) <> 0) then begin
     if (lo(a) = 0) and (hi(a) <> 0) then begin
       { load only upper 32 bits, and shift }
       { 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));
       list.concat(taicpu.op_reg_reg_const(A_SLDI, reg, reg, 32));
     end else begin
     end else begin
       { load lower 32 bits }
       { 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 (extendssign) and (hi(a) = 0) then
         { if upper 32 bits are zero, but loading the lower 32 bit resulted in automatic
         { if upper 32 bits are zero, but loading the lower 32 bit resulted in automatic
           sign extension, clear those bits }
           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
           - loading the lower 32 bits resulted in 0 in the upper 32 bits, and the upper
            32 bits should contain 0 }
            32 bits should contain 0 }
         a_reg_alloc(list, NR_R0);
         a_reg_alloc(list, NR_R0);
-        load32bitconstantR0(list, size, hi(a));
+        load32bitconstantR0(list, size, longint(hi(a)));
         { combine both registers }
         { combine both registers }
         list.concat(taicpu.op_reg_reg_const_const(A_RLDIMI, reg, NR_R0, 32, 0));
         list.concat(taicpu.op_reg_reg_const_const(A_RLDIMI, reg, NR_R0, 32, 0));
         a_reg_dealloc(list, NR_R0);
         a_reg_dealloc(list, NR_R0);
@@ -968,7 +971,7 @@ var
       end else begin
       end else begin
         getmagic_unsignedN(sizeof(aWord)*8, a, u_magic, u_add, u_shift);
         getmagic_unsignedN(sizeof(aWord)*8, a, u_magic, u_add, u_shift);
         { load magic in divreg }
         { 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));
         current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_MULHDU, dst, src, divreg));
         if (u_add) then begin
         if (u_add) then begin
           cg.a_op_reg_reg_reg(current_asmdata.CurrAsmList, OP_SUB, OS_INT, dst, src, divreg);
           cg.a_op_reg_reg_reg(current_asmdata.CurrAsmList, OP_SUB, OS_INT, dst, src, divreg);
@@ -1213,8 +1216,17 @@ begin
 end;
 end;
 
 
 procedure tcgppc.a_jmp_name(list: TAsmList; const s: string);
 procedure tcgppc.a_jmp_name(list: TAsmList; const s: string);
+var
+  p: taicpu;
 begin
 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;
 end;
 
 
 procedure tcgppc.a_jmp_always(list: TAsmList; l: tasmlabel);
 procedure tcgppc.a_jmp_always(list: TAsmList; l: tasmlabel);
@@ -1631,6 +1643,12 @@ var
   tempreg : TRegister;
   tempreg : TRegister;
 
 
 begin
 begin
+  if (target_info.system = system_powerpc64_darwin) then
+    begin
+      inherited a_loadaddr_ref_reg(list,ref,r);
+      exit;
+    end;
+
   ref2 := ref;
   ref2 := ref;
   fixref(list, ref2);
   fixref(list, ref2);
   { load a symbol }
   { load a symbol }
@@ -1851,83 +1869,6 @@ begin
 
 
 end;
 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! :) *****************}
 {***************** This is private property, keep out! :) *****************}
 
 
 procedure tcgppc.maybeadjustresult(list: TAsmList; op: TOpCg; size: tcgsize; dst: tregister);
 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))));
   list.concat(tai_comment.create(strpnew('fixref0 ' + ref2string(ref))));
   {$ENDIF EXTDEBUG}
   {$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 }
   { if we have to create PIC, add the symbol to the TOC/GOT }
   {$WARNING Hack for avoiding too long manglednames enabled!!}
   {$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
     (length(ref.symbol.name) < MAX_GOT_SYMBOL_NAME_LENGTH_HACK)) then begin
     tmpreg := load_got_symbol(list, ref.symbol.name);
     tmpreg := load_got_symbol(list, ref.symbol.name);
     if (ref.base = NR_NO) then
     if (ref.base = NR_NO) then
@@ -2041,11 +2001,44 @@ end;
 
 
 procedure tcgppc.a_load_store(list: TAsmList; op: tasmop; reg: tregister;
 procedure tcgppc.a_load_store(list: TAsmList; op: tasmop; reg: tregister;
   ref: treference);
   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
 var
   tmpreg, tmpreg2: tregister;
   tmpreg, tmpreg2: tregister;
   tmpref: treference;
   tmpref: treference;
   largeOffset: Boolean;
   largeOffset: Boolean;
 begin
 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
   { 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 }
     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
   if (ref.index <> NR_NO) and ((ref.offset <> 0) or (assigned(ref.symbol))) then
@@ -2063,24 +2056,7 @@ begin
     exit;
     exit;
   end;
   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}
   {$IFDEF EXTDEBUG}
   list.concat(tai_comment.create(strpnew('a_load_store1 ' + BoolToStr(ref.refaddr = addr_pic))));
   list.concat(tai_comment.create(strpnew('a_load_store1 ' + BoolToStr(ref.refaddr = addr_pic))));
   {$ENDIF EXTDEBUG}
   {$ENDIF EXTDEBUG}
@@ -2185,12 +2161,6 @@ begin
   end;
   end;
 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);
 procedure tcgppc.loadConstantPIC(list : TAsmList; size : TCGSize; a : aint; reg : TRegister);
 var
 var
   l: tasmsymbol;
   l: tasmsymbol;

+ 1 - 1
compiler/powerpc64/cpunode.pas

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

+ 3 - 1
compiler/powerpc64/cpupara.pas

@@ -68,7 +68,9 @@ uses
 function tppcparamanager.get_volatile_registers_int(calloption:
 function tppcparamanager.get_volatile_registers_int(calloption:
   tproccalloption): tcpuregisterset;
   tproccalloption): tcpuregisterset;
 begin
 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;
 end;
 
 
 function tppcparamanager.get_volatile_registers_fpu(calloption:
 function tppcparamanager.get_volatile_registers_fpu(calloption:

+ 8 - 1
compiler/powerpc64/cputarg.pas

@@ -1,7 +1,7 @@
 {
 {
     Copyright (c) 2001-2002 by Peter Vreman
     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
     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
     it under the terms of the GNU General Public License as published by
@@ -38,6 +38,9 @@ implementation
     {$ifndef NOTARGETLINUX}
     {$ifndef NOTARGETLINUX}
       ,t_linux
       ,t_linux
     {$endif}
     {$endif}
+    {$ifndef NOTARGETBSD}
+      ,t_bsd
+    {$endif}
 
 
 {**************************************
 {**************************************
              Assemblers
              Assemblers
@@ -60,6 +63,10 @@ implementation
 **************************************}
 **************************************}
 
 
 { stabs debug info are not supported, so do not include them here}
 { 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}
   {$ifndef NoDbgDwarf}
       ,dbgdwarf
       ,dbgdwarf
   {$endif NoDbgDwarf}
   {$endif NoDbgDwarf}

+ 1 - 1
compiler/powerpc64/itcpugas.pas

@@ -147,7 +147,7 @@ begin
   p := findreg_by_number(r);
   p := findreg_by_number(r);
   if p <> 0 then
   if p <> 0 then
     if (cs_create_smart in current_settings.moduleswitches) and
     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]
       result := gas_regname_short_table[p]
     else
     else
       result := gas_regname_table[p]
       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                
         oper.opr.ref.refaddr := addr_highest                
       else
       else
         Message(asmr_e_invalid_reference_syntax);
         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);
       Consume(AS_ID);
     end
     end
     else
     else

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

@@ -1,7 +1,7 @@
 {
 {
     Copyright (c) 1998-2002 by Florian Klaempfl
     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
     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
     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;
 unit agppcgas;
 
 
 {$i fpcdefs.inc}
 {$i fpcdefs.inc}
 
 
   interface
   interface
-
+  
     uses
     uses
        aasmbase,
        aasmbase,
        aasmtai,aasmdata,
        aasmtai,aasmdata,
        aggas,
        aggas,
-       cpubase,
+       cpubase,cgutils,
        globtype;
        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
   implementation
 
 
     uses
     uses
        cutils,globals,verbose,
        cutils,globals,verbose,
-       cgbase,cgutils,systems,
+       cgbase,systems,
        assemble,
        assemble,
-       itcpugas,
+       itcpugas,cpuinfo,
        aasmcpu;
        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;
     function getreferencestring(var ref : treference) : string;
@@ -110,12 +88,12 @@ unit agppcgas;
         begin
         begin
           if ((offset < -32768) or (offset > 32767)) and
           if ((offset < -32768) or (offset > 32767)) and
              (refaddr = addr_no) then
              (refaddr = addr_no) then
-            internalerror(19991);
+            internalerror(2006052501);
           if (refaddr = addr_no) then
           if (refaddr = addr_no) then
             s := ''
             s := ''
           else
           else
             begin
             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]
                 s := refaddr2str_darwin[refaddr]
               else
               else
                 s :='';
                 s :='';
@@ -138,12 +116,15 @@ unit agppcgas;
                 s:=s+tostr(offset);
                 s:=s+tostr(offset);
             end;
             end;
 
 
-           if (refaddr in [addr_lo,addr_hi]) then
+           if (refaddr in verbose_refaddrs) then
              begin
              begin
                s := s+')';
                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];
                  s := s+refaddr2str[refaddr];
              end;
              end;
+{$ifdef cpu64bit}
+           if (refaddr = addr_pic) then s := s + ')';
+{$endif cpu64bit}
 
 
            if (index=NR_NO) and (base<>NR_NO) then
            if (index=NR_NO) and (base<>NR_NO) then
              begin
              begin
@@ -159,12 +140,12 @@ unit agppcgas;
                if (offset=0) then
                if (offset=0) then
                  s:=s+gas_regname(base)+','+gas_regname(index)
                  s:=s+gas_regname(base)+','+gas_regname(index)
                else
                else
-                 internalerror(19992);
+                 internalerror(2006052502);
              end;
              end;
         end;
         end;
       getreferencestring:=s;
       getreferencestring:=s;
     end;
     end;
-
+    
 
 
     function getopstr_jmp(const o:toper) : string;
     function getopstr_jmp(const o:toper) : string;
     var
     var
@@ -195,6 +176,7 @@ unit agppcgas;
       end;
       end;
     end;
     end;
 
 
+
     function getopstr(const o:toper) : string;
     function getopstr(const o:toper) : string;
     var
     var
       hs : string;
       hs : string;
@@ -222,6 +204,7 @@ unit agppcgas;
       end;
       end;
     end;
     end;
 
 
+
     function branchmode(o: tasmop): string[4];
     function branchmode(o: tasmop): string[4];
       var tempstr: string[4];
       var tempstr: string[4];
       begin
       begin
@@ -239,6 +222,7 @@ unit agppcgas;
         branchmode := tempstr;
         branchmode := tempstr;
       end;
       end;
 
 
+
     function cond2str(op: tasmop; c: tasmcond): string;
     function cond2str(op: tasmop; c: tasmcond): string;
     { note: no checking is performed whether the given combination of }
     { note: no checking is performed whether the given combination of }
     { conditions is valid                                             }
     { conditions is valid                                             }
@@ -364,37 +348,97 @@ unit agppcgas;
       owner.AsmWriteLn(s);
       owner.AsmWriteLn(s);
     end;
     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
                                   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
 begin
   RegisterAssembler(as_ppc_gas_info,TPPCGNUAssembler);
   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;
         procedure a_load_reg_ref(list: TAsmList; fromsize, tosize: TCGSize;
           reg: tregister; const ref: treference); override;
           reg: tregister; const ref: treference); override;
 
 
+        procedure a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);override;
+
         { fpu move instructions }
         { fpu move instructions }
         procedure a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister); override;
         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;
         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 g_profilecode(list: TAsmList); override;
 
 
         procedure a_jmp_cond(list : TAsmList;cond : TOpCmp;l: tasmlabel);
         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
        protected
         function  get_darwin_call_stub(const s: string): tasmsymbol;
         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;
         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;
         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 }
         { creates the correct branch instruction for a given combination }
         { of asmcondflags and destination addressing mode                }
         { of asmcondflags and destination addressing mode                }
         procedure a_jmp(list: TAsmList; op: tasmop;
         procedure a_jmp(list: TAsmList; op: tasmop;
                         c: tasmcondflag; crval: longint; l: tasmlabel);
                         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;
      end;
 
 
   const
   const
@@ -82,6 +92,12 @@ unit cgppc;
        rgobj,tgobj,cpupi,procinfo,paramgr;
        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
     procedure tcgppcgen.a_param_const(list: TAsmList; size: tcgsize; a: aint; const
       paraloc: tcgpara);
       paraloc: tcgpara);
     var
     var
@@ -173,6 +189,90 @@ unit cgppc;
       end;
       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 }
     { calling a procedure by address }
     procedure tcgppcgen.a_call_reg(list : TAsmList;reg: tregister);
     procedure tcgppcgen.a_call_reg(list : TAsmList;reg: tregister);
       begin
       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.
 end.
 
 

+ 48 - 11
compiler/ppcgen/ngppcinl.pas

@@ -34,8 +34,10 @@ interface
             so that the code generator will actually generate
             so that the code generator will actually generate
             these nodes.
             these nodes.
           }
           }
+          function first_sqrt_real: tnode; override;
           function first_abs_real: tnode; override;
           function first_abs_real: tnode; override;
           function first_sqr_real: tnode; override;
           function first_sqr_real: tnode; override;
+          procedure second_sqrt_real; override;
           procedure second_abs_real; override;
           procedure second_abs_real; override;
           procedure second_sqr_real; override;
           procedure second_sqr_real; override;
           procedure second_prefetch;override;
           procedure second_prefetch;override;
@@ -51,7 +53,7 @@ implementation
       symconst,symdef,
       symconst,symdef,
       defutil,
       defutil,
       cgbase,pass_2,
       cgbase,pass_2,
-      cpubase,ncgutil,
+      cpubase,cpuinfo,ncgutil,
       cgutils,cgobj,rgobj;
       cgutils,cgobj,rgobj;
 
 
 
 
@@ -59,7 +61,21 @@ implementation
                               tgppcinlinenode
                               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
       begin
         expectloc:=LOC_FPUREGISTER;
         expectloc:=LOC_FPUREGISTER;
         registersint:=left.registersint;
         registersint:=left.registersint;
@@ -70,6 +86,7 @@ implementation
         first_abs_real := nil;
         first_abs_real := nil;
       end;
       end;
 
 
+
      function tgppcinlinenode.first_sqr_real : tnode;
      function tgppcinlinenode.first_sqr_real : tnode;
       begin
       begin
         expectloc:=LOC_FPUREGISTER;
         expectloc:=LOC_FPUREGISTER;
@@ -82,15 +99,34 @@ implementation
       end;
       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;
      procedure tgppcinlinenode.second_abs_real;
@@ -101,6 +137,7 @@ implementation
            left.location.register));
            left.location.register));
        end;
        end;
 
 
+
      procedure tgppcinlinenode.second_sqr_real;
      procedure tgppcinlinenode.second_sqr_real;
        var
        var
          op: tasmop;
          op: tasmop;

+ 1 - 1
compiler/ppcgen/ngppcset.pas

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

+ 5 - 1
compiler/psub.pas

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

+ 3 - 1
compiler/symconst.pas

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

+ 1 - 1
compiler/symdef.pas

@@ -814,7 +814,7 @@ implementation
         if suffix<>'' then
         if suffix<>'' then
           result:=result+'_'+suffix;
           result:=result+'_'+suffix;
         { the Darwin assembler assumes that all symbols starting with 'L' are local }
         { 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[1] = 'L') then
           result := '_' + result;
           result := '_' + result;
       end;
       end;

+ 22 - 2
compiler/systems.pas

@@ -139,9 +139,15 @@ interface
              system_arm_embedded,       { 57 }
              system_arm_embedded,       { 57 }
              system_powerpc64_embedded, { 58 }
              system_powerpc64_embedded, { 58 }
              system_i386_symbian,       { 59 }
              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
        tasm = (as_none
              ,as_gas                   { standard gnu assembler }
              ,as_gas                   { standard gnu assembler }
              ,as_i386_as_aout
              ,as_i386_as_aout
@@ -813,6 +819,10 @@ begin
     default_target(system_x86_64_freebsd);
     default_target(system_x86_64_freebsd);
     {$define default_target_set}
     {$define default_target_set}
    {$endif}
    {$endif}
+   {$ifdef darwin}
+    default_target(system_x86_64_darwin);
+    {$define source_system_set}
+   {$endif}
   {$endif cpux86_64}
   {$endif cpux86_64}
   { default is linux }
   { default is linux }
   {$ifndef default_target_set}
   {$ifndef default_target_set}
@@ -860,9 +870,19 @@ begin
     default_target(source_info.system);
     default_target(source_info.system);
     {$define default_target_set}
     {$define default_target_set}
   {$else cpupowerpc64}
   {$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);
     default_target(system_powerpc64_linux);
     {$define default_target_set}
     {$define default_target_set}
-  {$endif cpupowerpc64}
+  {$endif}
 {$endif POWERPC64}
 {$endif POWERPC64}
 
 
 {$ifdef sparc}
 {$ifdef sparc}

+ 70 - 2
compiler/systems/i_bsd.pas

@@ -512,6 +512,69 @@ unit i_bsd;
             abi         : abi_default;
             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
   implementation
 
 
 initialization
 initialization
@@ -539,12 +602,17 @@ initialization
      set_source_info(system_m68k_NetBSD_info);
      set_source_info(system_m68k_NetBSD_info);
   {$endif NetBSD}
   {$endif NetBSD}
 {$endif cpu68}
 {$endif cpu68}
-{$ifdef cpupowerpc}
+{$ifdef cpupowerpc32}
   {$ifdef Darwin}
   {$ifdef Darwin}
      set_source_info(system_powerpc_darwin_info);
      set_source_info(system_powerpc_darwin_info);
   {$endif Darwin}
   {$endif Darwin}
   {$ifdef NetBSD}
   {$ifdef NetBSD}
      set_source_info(system_powerpc_netbsd_info);
      set_source_info(system_powerpc_netbsd_info);
   {$endif}
   {$endif}
-{$endif cpu68}
+{$endif cpupowerpc32}
+{$ifdef cpupowerpc64}
+  {$ifdef Darwin}
+     set_source_info(system_powerpc64_darwin_info);
+  {$endif Darwin}
+{$endif powerpc64}
 end.
 end.

+ 1 - 1
compiler/systems/i_linux.pas

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

+ 20 - 9
compiler/systems/t_bsd.pas

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

+ 23 - 1
compiler/tgobj.pas

@@ -86,6 +86,7 @@ unit tgobj;
 
 
           function sizeoftemp(list: TAsmList; const ref: treference): longint;
           function sizeoftemp(list: TAsmList; const ref: treference): longint;
           function changetemptype(list: TAsmList; const ref:treference;temptype:ttemptype):boolean;
           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,
           {# Returns TRUE if the reference ref is allocated in temporary volatile memory space,
              otherwise returns FALSE.
              otherwise returns FALSE.
@@ -559,7 +560,7 @@ implementation
       end;
       end;
 
 
 
 
-    function ttgobj.ChangeTempType(list: TAsmList; const ref:treference;temptype:ttemptype):boolean;
+    function ttgobj.changetemptype(list: tasmList; const ref:treference; temptype:ttemptype):boolean;
       var
       var
         hp : ptemprecord;
         hp : ptemprecord;
       begin
       begin
@@ -600,6 +601,27 @@ implementation
       end;
       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);
     procedure ttgobj.UnGetTemp(list: TAsmList; const ref : treference);
       begin
       begin
         FreeTemp(list,ref.offset,[tt_normal,tt_noreuse,tt_persistent]);
         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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst fpcmkcfg
 override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst fpcmkcfg
 endif
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst fpcmkcfg
 override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst fpcmkcfg
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst fpcmkcfg
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst fpcmkcfg
 override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst fpcmkcfg
 endif
 endif
@@ -533,6 +536,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override CLEAN_UNITS+=ppu crc usubst
 override CLEAN_UNITS+=ppu crc usubst
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override CLEAN_UNITS+=ppu crc usubst
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override CLEAN_UNITS+=ppu crc usubst
 override CLEAN_UNITS+=ppu crc usubst
 endif
 endif
@@ -687,6 +693,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=..
 override COMPILER_UNITDIR+=..
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=..
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=..
 override COMPILER_UNITDIR+=..
 endif
 endif
@@ -840,6 +849,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=..
 override COMPILER_SOURCEDIR+=..
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=..
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_SOURCEDIR+=..
 override COMPILER_SOURCEDIR+=..
 endif
 endif
@@ -1743,6 +1755,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif

+ 1 - 1
compiler/version.pas

@@ -28,7 +28,7 @@ interface
     const
     const
        { version string }
        { version string }
        version_nr = '2';
        version_nr = '2';
-       release_nr = '1';
+       release_nr = '3';
        patch_nr   = '1';
        patch_nr   = '1';
        minorpatch = '';
        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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=fv
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=buildfv
 override TARGET_UNITS+=buildfv
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=buildfv
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=buildfv
 override TARGET_UNITS+=buildfv
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 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
 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
 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)
 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
 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
 endif
@@ -688,6 +694,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLEDIRS+=test
 override TARGET_EXAMPLEDIRS+=test
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLEDIRS+=test
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLEDIRS+=test
 override TARGET_EXAMPLEDIRS+=test
 endif
 endif
@@ -843,6 +852,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_TARGETDIR+=.
 override COMPILER_TARGETDIR+=.
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_TARGETDIR+=.
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_TARGETDIR+=.
 override COMPILER_TARGETDIR+=.
 endif
 endif
@@ -1744,6 +1756,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -2501,6 +2516,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_EXAMPLEDIRS_TEST=1
 TARGET_EXAMPLEDIRS_TEST=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_EXAMPLEDIRS_TEST=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_EXAMPLEDIRS_TEST=1
 TARGET_EXAMPLEDIRS_TEST=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_PROGRAMS+=testapp
 override TARGET_PROGRAMS+=testapp
 endif
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=testapp
 override TARGET_PROGRAMS+=testapp
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=testapp
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=testapp
 override TARGET_PROGRAMS+=testapp
 endif
 endif
@@ -1331,6 +1334,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_FV=1
 REQUIRE_PACKAGES_FV=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_FV=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_FV=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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=ide
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifndef NOGDB
 ifndef NOGDB
@@ -404,6 +404,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=compiler
 override TARGET_DIRS+=compiler
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=compiler
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_DIRS+=compiler
 override TARGET_DIRS+=compiler
 endif
 endif
@@ -557,6 +560,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=fp
 override TARGET_PROGRAMS+=fp
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=fp
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=fp
 override TARGET_PROGRAMS+=fp
 endif
 endif
@@ -712,6 +718,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-Sg
 override COMPILER_OPTIONS+=-Sg
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OPTIONS+=-Sg
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OPTIONS+=-Sg
 override COMPILER_OPTIONS+=-Sg
 endif
 endif
@@ -1795,6 +1804,12 @@ REQUIRE_PACKAGES_FV=1
 REQUIRE_PACKAGES_GDBINT=1
 REQUIRE_PACKAGES_GDBINT=1
 REQUIRE_PACKAGES_REGEXPR=1
 REQUIRE_PACKAGES_REGEXPR=1
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_FV=1
 REQUIRE_PACKAGES_FV=1
@@ -2655,6 +2670,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_DIRS_COMPILER=1
 TARGET_DIRS_COMPILER=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_COMPILER=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_DIRS_COMPILER=1
 TARGET_DIRS_COMPILER=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=ide
 PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ide/Makefile.fpc,$(PACKAGESDIR))))))
 PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ide/Makefile.fpc,$(PACKAGESDIR))))))
 COMPILERDIR=$(FPCDIR)/compiler
 COMPILERDIR=$(FPCDIR)/compiler
@@ -402,6 +402,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=compunit
 override TARGET_UNITS+=compunit
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=compunit
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=compunit
 override TARGET_UNITS+=compunit
 endif
 endif
@@ -556,6 +559,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-Ur -dNOCATCH
 override COMPILER_OPTIONS+=-Ur -dNOCATCH
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OPTIONS+=-Ur -dNOCATCH
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OPTIONS+=-Ur -dNOCATCH
 override COMPILER_OPTIONS+=-Ur -dNOCATCH
 endif
 endif
@@ -709,6 +715,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
 override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
 override COMPILER_INCLUDEDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET)
 endif
 endif
@@ -862,6 +871,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
 override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
 override COMPILER_UNITDIR+=$(COMPILERDIR) $(COMPILERDIR)/$(CPU_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
 endif
 endif
@@ -1763,6 +1775,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=ide
 PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ide/Makefile.fpc,$(PACKAGESDIR))))))
 PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ide/Makefile.fpc,$(PACKAGESDIR))))))
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=gdbcon gdbint
 override TARGET_UNITS+=gdbcon gdbint
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=gdbcon gdbint
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=gdbcon gdbint
 override TARGET_UNITS+=gdbcon gdbint
 endif
 endif
@@ -1284,6 +1287,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=installer
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -412,6 +412,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override CLEAN_UNITS+=scroll
 override CLEAN_UNITS+=scroll
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override CLEAN_UNITS+=scroll
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override CLEAN_UNITS+=scroll
 override CLEAN_UNITS+=scroll
 endif
 endif
@@ -587,6 +590,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=../ide
 override COMPILER_UNITDIR+=../ide
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=../ide
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=../ide
 override COMPILER_UNITDIR+=../ide
 endif
 endif
@@ -1588,6 +1594,11 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_FV=1
 REQUIRE_PACKAGES_FV=1
 REQUIRE_PACKAGES_UNZIP=1
 REQUIRE_PACKAGES_UNZIP=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_FV=1
+REQUIRE_PACKAGES_UNZIP=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_FV=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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 endif
@@ -281,6 +281,12 @@ endif
 ifeq ($(FULL_TARGET),i386-wince)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 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)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 endif
@@ -302,6 +308,9 @@ endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 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)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 endif
@@ -320,6 +329,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 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)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 endif
@@ -329,6 +341,9 @@ endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 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)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 endif
@@ -338,6 +353,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 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)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 endif
@@ -350,9 +368,24 @@ endif
 ifeq ($(FULL_TARGET),arm-gba)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 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)
 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
 override TARGET_DIRS+=base fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-web fcl-xml fcl-fpcunit extra
 endif
 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_FPCPACKAGE=y
 override INSTALL_FPCSUBDIR=packages
 override INSTALL_FPCSUBDIR=packages
 ifdef REQUIRE_UNITSDIR
 ifdef REQUIRE_UNITSDIR
@@ -681,6 +714,10 @@ EXEEXT=.gba
 SHAREDLIBEXT=.so
 SHAREDLIBEXT=.so
 SHORTSUFFIX=gba
 SHORTSUFFIX=gba
 endif
 endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
 else
 else
 ifeq ($(OS_TARGET),go32v1)
 ifeq ($(OS_TARGET),go32v1)
 PPUEXT=.pp1
 PPUEXT=.pp1
@@ -1149,7 +1186,7 @@ ifeq ($(CPU_TARGET),powerpc)
 FPCCPUOPT:=-O1r
 FPCCPUOPT:=-O1r
 endif
 endif
 else
 else
-FPCCPUOPT:=-O1r
+FPCCPUOPT:=-O2
 endif
 endif
 override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
 override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
 override FPCOPTDEF+=RELEASE
 override FPCOPTDEF+=RELEASE
@@ -1208,6 +1245,13 @@ ifeq ($(CPU_TARGET),i386)
 override FPCOPT+=-Aas
 override FPCOPT+=-Aas
 endif
 endif
 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
 ifdef LINKSHARED
 endif
 endif
 ifdef OPT
 ifdef OPT
@@ -1638,6 +1682,32 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 TARGET_DIRS_EXTRA=1
 endif
 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)
 ifeq ($(FULL_TARGET),m68k-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1729,6 +1799,19 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 TARGET_DIRS_EXTRA=1
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1807,6 +1890,19 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 TARGET_DIRS_EXTRA=1
 endif
 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)
 ifeq ($(FULL_TARGET),sparc-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1846,6 +1942,19 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 TARGET_DIRS_EXTRA=1
 endif
 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)
 ifeq ($(FULL_TARGET),x86_64-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1885,6 +1994,19 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 TARGET_DIRS_EXTRA=1
 endif
 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)
 ifeq ($(FULL_TARGET),arm-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1937,6 +2059,45 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 TARGET_DIRS_EXTRA=1
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_DIRS_BASE=1
 TARGET_DIRS_BASE=1
 TARGET_DIRS_FCL-BASE=1
 TARGET_DIRS_FCL-BASE=1
@@ -1950,6 +2111,32 @@ TARGET_DIRS_FCL-XML=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_FCL-FPCUNIT=1
 TARGET_DIRS_EXTRA=1
 TARGET_DIRS_EXTRA=1
 endif
 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
 ifdef TARGET_DIRS_BASE
 base_all:
 base_all:
 	$(MAKE) -C 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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)
 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
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd libc
 endif
 endif
@@ -281,6 +281,12 @@ endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  ibase sqlite postgres
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  ibase sqlite postgres
 endif
 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)
 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
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd
 endif
 endif
@@ -302,6 +308,9 @@ endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
 endif
 endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 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
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd
 endif
 endif
@@ -320,6 +329,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 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
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd
 endif
 endif
@@ -329,6 +341,9 @@ endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  libasync mysql ibase postgres oracle odbc sqlite pthreads imagemagick httpd
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  libasync mysql ibase postgres oracle odbc sqlite pthreads imagemagick httpd
 endif
 endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 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
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd libc
 endif
 endif
@@ -338,6 +353,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  mysql ibase odbc sqlite postgres oracle winunits
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  mysql ibase odbc sqlite postgres oracle winunits
 endif
 endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
+endif
 ifeq ($(FULL_TARGET),arm-linux)
 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
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd
 endif
 endif
@@ -350,9 +368,24 @@ endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
 endif
 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)
 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
 override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb  gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph imagemagick dbus httpd
 endif
 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_FPCPACKAGE=y
 override INSTALL_FPCSUBDIR=packages/base
 override INSTALL_FPCSUBDIR=packages/base
 ifdef REQUIRE_UNITSDIR
 ifdef REQUIRE_UNITSDIR
@@ -681,6 +714,10 @@ EXEEXT=.gba
 SHAREDLIBEXT=.so
 SHAREDLIBEXT=.so
 SHORTSUFFIX=gba
 SHORTSUFFIX=gba
 endif
 endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
 else
 else
 ifeq ($(OS_TARGET),go32v1)
 ifeq ($(OS_TARGET),go32v1)
 PPUEXT=.pp1
 PPUEXT=.pp1
@@ -1149,7 +1186,7 @@ ifeq ($(CPU_TARGET),powerpc)
 FPCCPUOPT:=-O1r
 FPCCPUOPT:=-O1r
 endif
 endif
 else
 else
-FPCCPUOPT:=-O1r
+FPCCPUOPT:=-O2
 endif
 endif
 override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
 override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
 override FPCOPTDEF+=RELEASE
 override FPCOPTDEF+=RELEASE
@@ -1208,6 +1245,13 @@ ifeq ($(CPU_TARGET),i386)
 override FPCOPT+=-Aas
 override FPCOPT+=-Aas
 endif
 endif
 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
 ifdef LINKSHARED
 endif
 endif
 ifdef OPT
 ifdef OPT
@@ -1616,6 +1660,20 @@ TARGET_DIRS_IBASE=1
 TARGET_DIRS_SQLITE=1
 TARGET_DIRS_SQLITE=1
 TARGET_DIRS_POSTGRES=1
 TARGET_DIRS_POSTGRES=1
 endif
 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)
 ifeq ($(FULL_TARGET),m68k-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
 TARGET_DIRS_PASZLIB=1
@@ -1708,6 +1766,13 @@ TARGET_DIRS_PASJPEG=1
 TARGET_DIRS_REGEXPR=1
 TARGET_DIRS_REGEXPR=1
 TARGET_DIRS_NETDB=1
 TARGET_DIRS_NETDB=1
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
 TARGET_DIRS_PASZLIB=1
@@ -1782,6 +1847,13 @@ TARGET_DIRS_PASJPEG=1
 TARGET_DIRS_REGEXPR=1
 TARGET_DIRS_REGEXPR=1
 TARGET_DIRS_NETDB=1
 TARGET_DIRS_NETDB=1
 endif
 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)
 ifeq ($(FULL_TARGET),sparc-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
 TARGET_DIRS_PASZLIB=1
@@ -1835,6 +1907,13 @@ TARGET_DIRS_PTHREADS=1
 TARGET_DIRS_IMAGEMAGICK=1
 TARGET_DIRS_IMAGEMAGICK=1
 TARGET_DIRS_HTTPD=1
 TARGET_DIRS_HTTPD=1
 endif
 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)
 ifeq ($(FULL_TARGET),x86_64-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
 TARGET_DIRS_PASZLIB=1
@@ -1889,6 +1968,13 @@ TARGET_DIRS_POSTGRES=1
 TARGET_DIRS_ORACLE=1
 TARGET_DIRS_ORACLE=1
 TARGET_DIRS_WINUNITS=1
 TARGET_DIRS_WINUNITS=1
 endif
 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)
 ifeq ($(FULL_TARGET),arm-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
 TARGET_DIRS_PASZLIB=1
@@ -1933,6 +2019,27 @@ TARGET_DIRS_PASJPEG=1
 TARGET_DIRS_REGEXPR=1
 TARGET_DIRS_REGEXPR=1
 TARGET_DIRS_NETDB=1
 TARGET_DIRS_NETDB=1
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_DIRS_HASH=1
 TARGET_DIRS_HASH=1
 TARGET_DIRS_PASZLIB=1
 TARGET_DIRS_PASZLIB=1
@@ -1953,6 +2060,30 @@ TARGET_DIRS_IMAGEMAGICK=1
 TARGET_DIRS_DBUS=1
 TARGET_DIRS_DBUS=1
 TARGET_DIRS_HTTPD=1
 TARGET_DIRS_HTTPD=1
 endif
 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
 ifdef TARGET_DIRS_HASH
 hash_all:
 hash_all:
 	$(MAKE) -C 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=dbus
 override PACKAGE_VERSION=2.0.4
 override PACKAGE_VERSION=2.0.4
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=dbus
 override TARGET_UNITS+=dbus
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=dbus
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=dbus
 override TARGET_UNITS+=dbus
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLEDIRS+=example
 override TARGET_EXAMPLEDIRS+=example
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLEDIRS+=example
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLEDIRS+=example
 override TARGET_EXAMPLEDIRS+=example
 endif
 endif
@@ -1468,6 +1474,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -2231,6 +2240,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_EXAMPLEDIRS_EXAMPLE=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_PROGRAMS+=busexample
 override TARGET_PROGRAMS+=busexample
 endif
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=busexample
 override TARGET_PROGRAMS+=busexample
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=busexample
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=busexample
 override TARGET_PROGRAMS+=busexample
 endif
 endif
@@ -1363,6 +1366,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_DBUS=1
 REQUIRE_PACKAGES_DBUS=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_DBUS=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_DBUS=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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -92,7 +92,7 @@ endif
 endif
 endif
 export ECHO
 export ECHO
 endif
 endif
-override DEFAULT_FPCDIR=../..
+override DEFAULT_FPCDIR=../../..
 ifndef FPC
 ifndef FPC
 ifdef PP
 ifdef PP
 FPC=$(PP)
 FPC=$(PP)
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=fpmake
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=fpmktype fpmkunit
 override TARGET_UNITS+=fpmktype fpmkunit
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=fpmktype fpmkunit
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=fpmktype fpmkunit
 override TARGET_UNITS+=fpmktype fpmkunit
 endif
 endif
@@ -1284,6 +1287,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=gdbint
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifdef inUnix
 ifdef inUnix
@@ -402,6 +402,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=gdbint gdbcon
 override TARGET_UNITS+=gdbint gdbcon
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=gdbint gdbcon
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=gdbint gdbcon
 override TARGET_UNITS+=gdbint gdbcon
 endif
 endif
@@ -555,6 +558,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testgdb symify
 override TARGET_EXAMPLES+=testgdb symify
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testgdb symify
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testgdb symify
 override TARGET_EXAMPLES+=testgdb symify
 endif
 endif
@@ -709,6 +715,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
 override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
 override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
 endif
 endif
@@ -862,6 +871,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
 override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
 override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
 endif
 endif
@@ -1794,6 +1806,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=graph
 override PACKAGE_VERSION=2.1
 override PACKAGE_VERSION=2.1
 GRAPHDIR=inc
 GRAPHDIR=inc
@@ -446,6 +446,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
 endif
@@ -600,6 +603,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-S2
 override COMPILER_OPTIONS+=-S2
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OPTIONS+=-S2
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OPTIONS+=-S2
 override COMPILER_OPTIONS+=-S2
 endif
 endif
@@ -753,6 +759,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=$(OS_TARGET) inc  unix
 override COMPILER_INCLUDEDIR+=$(OS_TARGET) inc  unix
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=$(OS_TARGET) inc  unix
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=$(OS_TARGET) inc
 override COMPILER_INCLUDEDIR+=$(OS_TARGET) inc
 endif
 endif
@@ -906,6 +915,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=$(OS_TARGET) inc
 override COMPILER_SOURCEDIR+=$(OS_TARGET) inc
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=$(OS_TARGET) inc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_SOURCEDIR+=$(OS_TARGET) inc
 override COMPILER_SOURCEDIR+=$(OS_TARGET) inc
 endif
 endif
@@ -1840,6 +1852,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=hash
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=md5 crc ntlm uuid  unixcrypt
 override TARGET_UNITS+=md5 crc ntlm uuid  unixcrypt
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=md5 crc ntlm uuid
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=md5 crc ntlm uuid
 override TARGET_UNITS+=md5 crc ntlm uuid
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=mdtest
 override TARGET_EXAMPLES+=mdtest
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=mdtest
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=mdtest
 override TARGET_EXAMPLES+=mdtest
 endif
 endif
@@ -1437,6 +1443,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_DIRS+=httpd-1.3 httpd-2.0 httpd-2.2
 override TARGET_DIRS+=httpd-1.3 httpd-2.0 httpd-2.2
 endif
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=httpd-1.3 httpd-2.0 httpd-2.2
 override TARGET_DIRS+=httpd-1.3 httpd-2.0 httpd-2.2
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=httpd-1.3 httpd-2.0 httpd-2.2
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_DIRS+=httpd-1.3 httpd-2.0 httpd-2.2
 override TARGET_DIRS+=httpd-1.3 httpd-2.0 httpd-2.2
 endif
 endif
@@ -533,6 +536,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLEDIRS+=examples
 override TARGET_EXAMPLEDIRS+=examples
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLEDIRS+=examples
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLEDIRS+=examples
 override TARGET_EXAMPLEDIRS+=examples
 endif
 endif
@@ -1879,6 +1885,11 @@ TARGET_DIRS_HTTPD-1.3=1
 TARGET_DIRS_HTTPD-2.0=1
 TARGET_DIRS_HTTPD-2.0=1
 TARGET_DIRS_HTTPD-2.2=1
 TARGET_DIRS_HTTPD-2.2=1
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_DIRS_HTTPD-1.3=1
 TARGET_DIRS_HTTPD-1.3=1
 TARGET_DIRS_HTTPD-2.0=1
 TARGET_DIRS_HTTPD-2.0=1
@@ -2169,6 +2180,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_EXAMPLEDIRS_EXAMPLES=1
 TARGET_EXAMPLEDIRS_EXAMPLES=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_EXAMPLEDIRS_EXAMPLES=1
 TARGET_EXAMPLEDIRS_EXAMPLES=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_PROGRAMS+=mod_example  mod_hello  mod_spelling  testmodule
 override TARGET_PROGRAMS+=mod_example  mod_hello  mod_spelling  testmodule
 endif
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=mod_example  mod_hello  mod_spelling  testmodule
 override TARGET_PROGRAMS+=mod_example  mod_hello  mod_spelling  testmodule
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=mod_example  mod_hello  mod_spelling  testmodule
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=mod_example  mod_hello  mod_spelling  testmodule
 override TARGET_PROGRAMS+=mod_example  mod_hello  mod_spelling  testmodule
 endif
 endif
@@ -533,6 +536,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=minimain
 override TARGET_UNITS+=minimain
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=minimain
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=minimain
 override TARGET_UNITS+=minimain
 endif
 endif
@@ -1516,6 +1522,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
 REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=httpd-1.3
 override PACKAGE_VERSION=2.0.4
 override PACKAGE_VERSION=2.0.4
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=httpd
 override TARGET_UNITS+=httpd
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=httpd
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=httpd
 override TARGET_UNITS+=httpd
 endif
 endif
@@ -1315,6 +1318,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=httpd-2.0
 override PACKAGE_VERSION=2.0.4
 override PACKAGE_VERSION=2.0.4
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 endif
 endif
@@ -1315,6 +1318,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=httpd-2.2
 override PACKAGE_VERSION=2.0.4
 override PACKAGE_VERSION=2.0.4
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 override TARGET_UNITS+=apr/apr apriconv/apriconv aprutil/aprutil httpd
 endif
 endif
@@ -1315,6 +1318,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=ibase
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=ibase40 ibase60 ibase60dyn
 override TARGET_UNITS+=ibase40 ibase60 ibase60dyn
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=ibase40 ibase60 ibase60dyn
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=ibase40 ibase60 ibase60dyn
 override TARGET_UNITS+=ibase40 ibase60 ibase60dyn
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testib40 testib60
 override TARGET_EXAMPLES+=testib40 testib60
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testib40 testib60
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testib40 testib60
 override TARGET_EXAMPLES+=testib40 testib60
 endif
 endif
@@ -1470,6 +1476,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=gtk2
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=buildim
 override TARGET_UNITS+=buildim
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=buildim
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=buildim
 override TARGET_UNITS+=buildim
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_IMPLICITUNITS+=magick_wand imagemagick
 override TARGET_IMPLICITUNITS+=magick_wand imagemagick
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_IMPLICITUNITS+=magick_wand imagemagick
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_IMPLICITUNITS+=magick_wand imagemagick
 override TARGET_IMPLICITUNITS+=magick_wand imagemagick
 endif
 endif
@@ -690,6 +696,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=magick wand
 override COMPILER_UNITDIR+=magick wand
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=magick wand
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=magick wand
 override COMPILER_UNITDIR+=magick wand
 endif
 endif
@@ -1624,6 +1633,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=libasync
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=libasync
 override TARGET_UNITS+=libasync
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=libasync
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=libasync
 override TARGET_UNITS+=libasync
 endif
 endif
@@ -446,6 +449,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=unix
 override COMPILER_SOURCEDIR+=unix
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=unix
+endif
 ifdef REQUIRE_UNITSDIR
 ifdef REQUIRE_UNITSDIR
 override UNITSDIR+=$(REQUIRE_UNITSDIR)
 override UNITSDIR+=$(REQUIRE_UNITSDIR)
 endif
 endif
@@ -1344,6 +1350,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=libc
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=kerneldefs kernelioctl libc
 override TARGET_UNITS+=kerneldefs kernelioctl libc
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=kerneldefs kernelioctl libc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=kerneldefs kernelioctl libc
 override TARGET_UNITS+=kerneldefs kernelioctl libc
 endif
 endif
@@ -1317,6 +1320,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=mysql
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 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
 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
 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)
 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
 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
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testdb4 testdb3
 override TARGET_EXAMPLES+=testdb4 testdb3
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testdb4 testdb3
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testdb4 testdb3
 override TARGET_EXAMPLES+=testdb4 testdb3
 endif
 endif
@@ -1470,6 +1476,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=netdb
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=uriparser  netdb
 override TARGET_UNITS+=uriparser  netdb
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=uriparser  netdb
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=uriparser
 override TARGET_UNITS+=uriparser
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testuri  testdns testhst testsvc testnet testhosts
 override TARGET_EXAMPLES+=testuri  testdns testhst testsvc testnet testhosts
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testuri  testdns testhst testsvc testnet testhosts
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testuri
 override TARGET_EXAMPLES+=testuri
 endif
 endif
@@ -1437,6 +1443,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=odbc
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=odbcsql odbcsqldyn
 override TARGET_UNITS+=odbcsql odbcsqldyn
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=odbcsql odbcsqldyn
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=odbcsql odbcsqldyn
 override TARGET_UNITS+=odbcsql odbcsqldyn
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testodbc
 override TARGET_EXAMPLES+=testodbc
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testodbc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testodbc
 override TARGET_EXAMPLES+=testodbc
 endif
 endif
@@ -1470,6 +1476,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=oracle
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=oci ocidyn oratypes oraoci
 override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=oci ocidyn oratypes oraoci
 override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLEDIRS+=example
 override TARGET_EXAMPLEDIRS+=example
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLEDIRS+=example
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLEDIRS+=example
 override TARGET_EXAMPLEDIRS+=example
 endif
 endif
@@ -1470,6 +1476,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -2233,6 +2242,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_EXAMPLEDIRS_EXAMPLE=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_UNITS+=oraclew
 override TARGET_UNITS+=oraclew
 endif
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=oraclew
 override TARGET_UNITS+=oraclew
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=oraclew
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=oraclew
 override TARGET_UNITS+=oraclew
 endif
 endif
@@ -533,6 +536,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=test01
 override TARGET_EXAMPLES+=test01
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=test01
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=test01
 override TARGET_EXAMPLES+=test01
 endif
 endif
@@ -1315,7 +1321,7 @@ else
 TAROPT=vz
 TAROPT=vz
 TAREXT=.tar.gz
 TAREXT=.tar.gz
 endif
 endif
-override REQUIRE_PACKAGES=rtl oracle fcl
+override REQUIRE_PACKAGES=rtl oracle fcl-base fcl-db fcl-xml
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
@@ -1324,8 +1330,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1337,9 +1344,10 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1347,8 +1355,10 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1361,8 +1371,9 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=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
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1372,8 +1383,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1385,9 +1397,10 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 ifeq ($(FULL_TARGET),i386-netbsd)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1396,8 +1409,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1412,26 +1426,29 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
 ifeq ($(FULL_TARGET),i386-qnx)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 ifeq ($(FULL_TARGET),i386-netware)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1440,8 +1457,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1453,9 +1471,10 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1465,8 +1484,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1479,26 +1499,29 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=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
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
 ifeq ($(FULL_TARGET),i386-netwlibc)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1506,8 +1529,9 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_SQLITE=1
 REQUIRE_PACKAGES_SQLITE=1
@@ -1517,18 +1541,20 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
 ifeq ($(FULL_TARGET),i386-symbian)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1538,8 +1564,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1554,8 +1581,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1569,8 +1597,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1582,18 +1611,20 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
 ifeq ($(FULL_TARGET),m68k-atari)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 ifeq ($(FULL_TARGET),m68k-openbsd)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1602,8 +1633,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1615,18 +1647,20 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
 ifeq ($(FULL_TARGET),m68k-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1636,8 +1670,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1651,8 +1686,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1664,18 +1700,20 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
 ifeq ($(FULL_TARGET),powerpc-macos)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1685,8 +1723,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1698,18 +1737,20 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1719,8 +1760,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1734,8 +1776,9 @@ REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1750,17 +1793,19 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
 ifeq ($(FULL_TARGET),sparc-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1770,8 +1815,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1786,8 +1832,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1800,17 +1847,20 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=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
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 ifeq ($(FULL_TARGET),x86_64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1820,8 +1870,9 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1833,9 +1884,10 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1843,8 +1895,9 @@ REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_SQLITE=1
 REQUIRE_PACKAGES_SQLITE=1
@@ -1854,36 +1907,40 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),arm-nds)
 ifeq ($(FULL_TARGET),arm-nds)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
 ifeq ($(FULL_TARGET),arm-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
 ifeq ($(FULL_TARGET),arm-symbian)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
@@ -1893,8 +1950,26 @@ REQUIRE_PACKAGES_PASZLIB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_NETDB=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_LIBASYNC=1
 REQUIRE_PACKAGES_PTHREADS=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_IBASE=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_POSTGRES=1
 REQUIRE_PACKAGES_MYSQL=1
 REQUIRE_PACKAGES_MYSQL=1
@@ -1906,9 +1981,10 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_ORACLE=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_PASZLIB=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_NETDB=1
-REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_FCL-XML=1
 endif
 endif
 ifdef REQUIRE_PACKAGES_RTL
 ifdef REQUIRE_PACKAGES_RTL
 PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
 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)
 override COMPILER_UNITDIR+=$(UNITDIR_PTHREADS)
 endif
 endif
 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
 else
-UNITDIR_FCL=$(PACKAGEDIR_FCL)
+UNITDIR_FCL-BASE=$(PACKAGEDIR_FCL-BASE)
 endif
 endif
 ifdef CHECKDEPEND
 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
 endif
 else
 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
 else
-UNITDIR_FCL=
+UNITDIR_FCL-BASE=
 endif
 endif
 endif
 endif
-ifdef UNITDIR_FCL
-override COMPILER_UNITDIR+=$(UNITDIR_FCL)
+ifdef UNITDIR_FCL-BASE
+override COMPILER_UNITDIR+=$(UNITDIR_FCL-BASE)
 endif
 endif
 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
 else
-UNITDIR_PASJPEG=$(PACKAGEDIR_PASJPEG)
+UNITDIR_FCL-DB=$(PACKAGEDIR_FCL-DB)
 endif
 endif
 ifdef CHECKDEPEND
 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
 endif
 else
 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
 else
-UNITDIR_PASJPEG=
+UNITDIR_FCL-DB=
 endif
 endif
 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
 endif
 endif
 ifdef REQUIRE_PACKAGES_IBASE
 ifdef REQUIRE_PACKAGES_IBASE
@@ -2274,6 +2376,32 @@ ifdef UNITDIR_SQLITE
 override COMPILER_UNITDIR+=$(UNITDIR_SQLITE)
 override COMPILER_UNITDIR+=$(UNITDIR_SQLITE)
 endif
 endif
 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
 ifndef NOCPUDEF
 override FPCOPTDEF=$(CPU_TARGET)
 override FPCOPTDEF=$(CPU_TARGET)
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=pasjpeg
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=buildpasjpeg
 override TARGET_UNITS+=buildpasjpeg
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=buildpasjpeg
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=buildpasjpeg
 override TARGET_UNITS+=buildpasjpeg
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 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
 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
 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)
 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
 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
 endif
@@ -688,6 +694,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=cjpeg demo djpeg jpegtran rdjpgcom
 override TARGET_EXAMPLES+=cjpeg demo djpeg jpegtran rdjpgcom
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=cjpeg demo djpeg jpegtran rdjpgcom
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=cjpeg demo djpeg jpegtran rdjpgcom
 override TARGET_EXAMPLES+=cjpeg demo djpeg jpegtran rdjpgcom
 endif
 endif
@@ -1590,6 +1599,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=paszlib
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=paszlib adler gzio infblock infcodes inffast inftrees infutil trees zcompres zdeflate zinflate zbase zuncompr
 override TARGET_UNITS+=paszlib adler gzio infblock infcodes inffast inftrees infutil trees zcompres zdeflate zinflate zbase zuncompr
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=paszlib adler gzio infblock infcodes inffast inftrees infutil trees zcompres zdeflate zinflate zbase zuncompr
 override TARGET_UNITS+=paszlib adler gzio infblock infcodes inffast inftrees infutil trees zcompres zdeflate zinflate zbase zuncompr
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=example minigzip
 override TARGET_EXAMPLES+=example minigzip
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=example minigzip
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=example minigzip
 override TARGET_EXAMPLES+=example minigzip
 endif
 endif
@@ -1487,6 +1493,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HASH=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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=postgres
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=dllist dllistdyn postgres postgres3 postgres3dyn
 override TARGET_UNITS+=dllist dllistdyn postgres postgres3 postgres3dyn
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=dllist dllistdyn postgres postgres3 postgres3dyn
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=dllist dllistdyn postgres postgres3 postgres3dyn
 override TARGET_UNITS+=dllist dllistdyn postgres postgres3 postgres3dyn
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testpg1 testpg2
 override TARGET_EXAMPLES+=testpg1 testpg2
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testpg1 testpg2
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testpg1 testpg2
 override TARGET_EXAMPLES+=testpg1 testpg2
 endif
 endif
@@ -1470,6 +1476,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=pthreads
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=pthreads
 override TARGET_UNITS+=pthreads
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=pthreads
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=pthreads
 override TARGET_UNITS+=pthreads
 endif
 endif
@@ -1284,6 +1287,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=regexpr
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=regexpr
 override TARGET_UNITS+=regexpr
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=regexpr
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=regexpr
 override TARGET_UNITS+=regexpr
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=testreg1
 override TARGET_EXAMPLES+=testreg1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=testreg1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=testreg1
 override TARGET_EXAMPLES+=testreg1
 endif
 endif
@@ -689,6 +695,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-S2
 override COMPILER_OPTIONS+=-S2
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OPTIONS+=-S2
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OPTIONS+=-S2
 override COMPILER_OPTIONS+=-S2
 endif
 endif
@@ -1590,6 +1599,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=sqlite
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -283,6 +283,12 @@ endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 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)
 ifeq ($(FULL_TARGET),m68k-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 endif
@@ -304,6 +310,9 @@ endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 endif
@@ -322,6 +331,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 endif
@@ -331,6 +343,9 @@ endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 endif
@@ -340,6 +355,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
+endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 endif
@@ -352,9 +370,24 @@ endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 override TARGET_UNITS+=sqlite sqlite3 sqlitedb sqlite3db
 endif
 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 INSTALL_FPCPACKAGE=y
 override SHARED_BUILD=n
 override SHARED_BUILD=n
 override SHARED_BUILD=n
 override SHARED_BUILD=n
@@ -684,6 +717,10 @@ EXEEXT=.gba
 SHAREDLIBEXT=.so
 SHAREDLIBEXT=.so
 SHORTSUFFIX=gba
 SHORTSUFFIX=gba
 endif
 endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
 else
 else
 ifeq ($(OS_TARGET),go32v1)
 ifeq ($(OS_TARGET),go32v1)
 PPUEXT=.pp1
 PPUEXT=.pp1
@@ -1153,6 +1190,12 @@ endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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)
 ifeq ($(FULL_TARGET),m68k-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -1174,6 +1217,9 @@ endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -1192,6 +1238,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -1201,6 +1250,9 @@ endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -1210,6 +1262,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -1222,9 +1277,24 @@ endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 ifdef REQUIRE_PACKAGES_RTL
 PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
 PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
 ifneq ($(PACKAGEDIR_RTL),)
 ifneq ($(PACKAGEDIR_RTL),)
@@ -1302,7 +1372,7 @@ ifeq ($(CPU_TARGET),powerpc)
 FPCCPUOPT:=-O1r
 FPCCPUOPT:=-O1r
 endif
 endif
 else
 else
-FPCCPUOPT:=-O1r
+FPCCPUOPT:=-O2
 endif
 endif
 override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
 override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
 override FPCOPTDEF+=RELEASE
 override FPCOPTDEF+=RELEASE
@@ -1361,6 +1431,13 @@ ifeq ($(CPU_TARGET),i386)
 override FPCOPT+=-Aas
 override FPCOPT+=-Aas
 endif
 endif
 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
 ifdef LINKSHARED
 endif
 endif
 ifdef OPT
 ifdef OPT

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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)
 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
 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
 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
 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
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 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
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
 override TARGET_DIRS+=os2units rexx unzip zlib x11 gtk libpng tcl imlib fpgtk
 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
 override TARGET_DIRS+=amunits
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 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
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 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
 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)
 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
 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
 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_FPCPACKAGE=y
 override INSTALL_FPCSUBDIR=packages/extra
 override INSTALL_FPCSUBDIR=packages/extra
 ifdef REQUIRE_UNITSDIR
 ifdef REQUIRE_UNITSDIR
@@ -1603,10 +1606,10 @@ TARGET_DIRS_FPGTK=1
 TARGET_DIRS_TCL=1
 TARGET_DIRS_TCL=1
 TARGET_DIRS_IMLIB=1
 TARGET_DIRS_IMLIB=1
 TARGET_DIRS_GNOME1=1
 TARGET_DIRS_GNOME1=1
-TARGET_DIRS_UNIVINT=1
 TARGET_DIRS_OPENSSL=1
 TARGET_DIRS_OPENSSL=1
 TARGET_DIRS_LIBCURL=1
 TARGET_DIRS_LIBCURL=1
 TARGET_DIRS_CAIRO=1
 TARGET_DIRS_CAIRO=1
+TARGET_DIRS_UNIVINT=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
 TARGET_DIRS_OS2UNITS=1
 TARGET_DIRS_OS2UNITS=1
@@ -1835,10 +1838,10 @@ TARGET_DIRS_FPGTK=1
 TARGET_DIRS_TCL=1
 TARGET_DIRS_TCL=1
 TARGET_DIRS_IMLIB=1
 TARGET_DIRS_IMLIB=1
 TARGET_DIRS_GNOME1=1
 TARGET_DIRS_GNOME1=1
-TARGET_DIRS_UNIVINT=1
 TARGET_DIRS_OPENSSL=1
 TARGET_DIRS_OPENSSL=1
 TARGET_DIRS_LIBCURL=1
 TARGET_DIRS_LIBCURL=1
 TARGET_DIRS_CAIRO=1
 TARGET_DIRS_CAIRO=1
+TARGET_DIRS_UNIVINT=1
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 TARGET_DIRS_UNZIP=1
 TARGET_DIRS_UNZIP=1
@@ -2088,6 +2091,30 @@ TARGET_DIRS_PCAP=1
 TARGET_DIRS_LIBCURL=1
 TARGET_DIRS_LIBCURL=1
 TARGET_DIRS_CAIRO=1
 TARGET_DIRS_CAIRO=1
 endif
 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
 ifdef TARGET_DIRS_UNZIP
 unzip_all:
 unzip_all:
 	$(MAKE) -C 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 \
              x11 opengl gtk gtk2 syslog \
              forms libpng libgd \
              forms libpng libgd \
              utmp bfd gdbm ncurses fpgtk tcl imlib gnome1 \
              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 \
 dirs_solaris= unzip zlib fftw \
              x11 opengl gtk gtk2 syslog \
              x11 opengl gtk gtk2 syslog \
              forms svgalib ggi libpng libgd \
              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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=a52
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=a52
 override TARGET_UNITS+=a52
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=a52
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=a52
 override TARGET_UNITS+=a52
 endif
 endif
@@ -1284,6 +1287,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=amunits
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_DIRS+=units utilunits
 override TARGET_DIRS+=units utilunits
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=units utilunits
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_DIRS+=units utilunits
 override TARGET_DIRS+=units utilunits
 endif
 endif
@@ -536,6 +539,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=inc
 override COMPILER_INCLUDEDIR+=inc
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=inc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=inc
 override COMPILER_INCLUDEDIR+=inc
 endif
 endif
@@ -689,6 +695,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=units utilunits
 override COMPILER_SOURCEDIR+=units utilunits
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=units utilunits
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_SOURCEDIR+=units utilunits
 override COMPILER_SOURCEDIR+=units utilunits
 endif
 endif
@@ -2117,6 +2126,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_DIRS_UNITS=1
 TARGET_DIRS_UNITS=1
 TARGET_DIRS_UTILUNITS=1
 TARGET_DIRS_UTILUNITS=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_UNITS=1
+TARGET_DIRS_UTILUNITS=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_DIRS_UNITS=1
 TARGET_DIRS_UNITS=1
 TARGET_DIRS_UTILUNITS=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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=amunits
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 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
 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
 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)
 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
 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
 endif
@@ -536,6 +539,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=../inc
 override COMPILER_INCLUDEDIR+=../inc
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=../inc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=../inc
 override COMPILER_INCLUDEDIR+=../inc
 endif
 endif
@@ -689,6 +695,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=../utilunits
 override COMPILER_UNITDIR+=../utilunits
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=../utilunits
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=../utilunits
 override COMPILER_UNITDIR+=../utilunits
 endif
 endif
@@ -842,6 +851,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=.
 override COMPILER_SOURCEDIR+=.
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=.
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_SOURCEDIR+=.
 override COMPILER_SOURCEDIR+=.
 endif
 endif
@@ -1743,6 +1755,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=amunits
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=amigautils consoleio deadkeys doublebuffer easyasl hisoft linklist longarray msgbox pastoc pcq systemvartags tagsarray timerutils vartags wbargs
 override TARGET_UNITS+=amigautils consoleio deadkeys doublebuffer easyasl hisoft linklist longarray msgbox pastoc pcq systemvartags tagsarray timerutils vartags wbargs
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=amigautils consoleio deadkeys doublebuffer easyasl hisoft linklist longarray msgbox pastoc pcq systemvartags tagsarray timerutils vartags wbargs
 override TARGET_UNITS+=amigautils consoleio deadkeys doublebuffer easyasl hisoft linklist longarray msgbox pastoc pcq systemvartags tagsarray timerutils vartags wbargs
 endif
 endif
@@ -536,6 +539,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=../inc
 override COMPILER_INCLUDEDIR+=../inc
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=../inc
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=../inc
 override COMPILER_INCLUDEDIR+=../inc
 endif
 endif
@@ -689,6 +695,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_UNITDIR+=../units
 override COMPILER_UNITDIR+=../units
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=../units
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_UNITDIR+=../units
 override COMPILER_UNITDIR+=../units
 endif
 endif
@@ -842,6 +851,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=.
 override COMPILER_SOURCEDIR+=.
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=.
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_SOURCEDIR+=.
 override COMPILER_SOURCEDIR+=.
 endif
 endif
@@ -1743,6 +1755,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=bfd
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=bfd
 override TARGET_UNITS+=bfd
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=bfd
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=bfd
 override TARGET_UNITS+=bfd
 endif
 endif
@@ -1286,6 +1289,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=cairo
 override TARGET_UNITS+=cairo
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=cairo
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=cairo
 override TARGET_UNITS+=cairo
 endif
 endif
@@ -1677,6 +1680,18 @@ REQUIRE_PACKAGES_PTHREADS=1
 REQUIRE_PACKAGES_FCL-BASE=1
 REQUIRE_PACKAGES_FCL-BASE=1
 REQUIRE_PACKAGES_FCL-IMAGE=1
 REQUIRE_PACKAGES_FCL-IMAGE=1
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_X11=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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=cdrom
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=cdrom discid
 override TARGET_UNITS+=cdrom discid
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=cdrom discid
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=cdrom discid
 override TARGET_UNITS+=cdrom discid
 endif
 endif
@@ -559,6 +562,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLES+=showcds getdiscid
 override TARGET_EXAMPLES+=showcds getdiscid
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLES+=showcds getdiscid
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLES+=showcds getdiscid
 override TARGET_EXAMPLES+=showcds getdiscid
 endif
 endif
@@ -1461,6 +1467,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=dts
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=dts
 override TARGET_UNITS+=dts
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=dts
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=dts
 override TARGET_UNITS+=dts
 endif
 endif
@@ -1284,6 +1287,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=fftw
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=fftw_s
 override TARGET_UNITS+=fftw_s
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=fftw_s
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=fftw_s
 override TARGET_UNITS+=fftw_s
 endif
 endif
@@ -1286,6 +1289,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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_NAME=forms
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_PROGRAMS+=fd2pascal
 override TARGET_PROGRAMS+=fd2pascal
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=fd2pascal
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_PROGRAMS+=fd2pascal
 override TARGET_PROGRAMS+=fd2pascal
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=xforms
 override TARGET_UNITS+=xforms
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=xforms
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=xforms
 override TARGET_UNITS+=xforms
 endif
 endif
@@ -688,6 +694,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLEDIRS+=demo
 override TARGET_EXAMPLEDIRS+=demo
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLEDIRS+=demo
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_EXAMPLEDIRS+=demo
 override TARGET_EXAMPLEDIRS+=demo
 endif
 endif
@@ -1673,6 +1682,10 @@ ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_X11=1
 REQUIRE_PACKAGES_X11=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_X11=1
 REQUIRE_PACKAGES_X11=1
@@ -2480,6 +2493,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_EXAMPLEDIRS_DEMO=1
 TARGET_EXAMPLEDIRS_DEMO=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_EXAMPLEDIRS_DEMO=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 TARGET_EXAMPLEDIRS_DEMO=1
 TARGET_EXAMPLEDIRS_DEMO=1
 endif
 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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -229,7 +229,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 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)
 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
 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
 endif
@@ -380,6 +380,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 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
 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
 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)
 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
 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
 endif
@@ -1413,6 +1416,11 @@ REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_X11=1
 REQUIRE_PACKAGES_X11=1
 REQUIRE_PACKAGES_FORMS=1
 REQUIRE_PACKAGES_FORMS=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_FORMS=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_X11=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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -382,6 +382,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_UNITS+=fpglib fpgtk fpgtkext
 override TARGET_UNITS+=fpglib fpgtk fpgtkext
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=fpglib fpgtk fpgtkext
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=fpglib fpgtk fpgtkext
 override TARGET_UNITS+=fpglib fpgtk fpgtkext
 endif
 endif
@@ -535,6 +538,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_RSTS+=fpgtk fpgtkext
 override TARGET_RSTS+=fpgtk fpgtkext
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_RSTS+=fpgtk fpgtkext
+endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_RSTS+=fpgtk fpgtkext
 override TARGET_RSTS+=fpgtk fpgtkext
 endif
 endif
@@ -1798,6 +1804,18 @@ REQUIRE_PACKAGES_GTK=1
 REQUIRE_PACKAGES_X11=1
 REQUIRE_PACKAGES_X11=1
 REQUIRE_PACKAGES_OPENGL=1
 REQUIRE_PACKAGES_OPENGL=1
 endif
 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)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HASH=1
 REQUIRE_PACKAGES_HASH=1

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott