[fpc-devel] FPC_HAS_FEATURE_SUPPORT
Michael Van Canneyt
michael at freepascal.org
Thu Oct 23 22:01:28 CEST 2008
On Thu, 23 Oct 2008, Mattias Gaertner wrote:
> On Thu, 23 Oct 2008 08:53:27 +0200 (CEST)
> "Peter Vreman" <peter at freepascal.org> wrote:
>
> > > On Wed, 22 Oct 2008 10:32:36 +0200 (CEST)
> > > "Peter Vreman" <peter at freepascal.org> wrote:
> > >
> > >> > As of version 2.3.1, the compiler by itself indicates all the
> > >> > various features it supports with FPC_HAS_FEATURE_XXX defines.
> > >> > Exactly which defines are defines depends on the compiler binary.
> > >> > For normal platforms, all features are enabled.
> > >> >
> > >> > To indicate the use of this system, it defines
> > >> > FPC_HAS_FEATURE_SUPPORT.
> > >> >
> > >> > To be able to compile the RTL with version 2.2.0, The systemh.inc
> > >> > checks for the presence of FPC_HAS_FEATURE_SUPPORT. If it is not
> > >> > defined then it assumes the version is below 2.3.0 and all the
> > >> > FPC_HAS_FEATURE_XXX confitionals are defined in the systemh.inc
> > >> > source.
> > >> >
> > >> > For lazarus this means that it should either
> > >> > - Not define FPC_HAS_FEATURE_SUPPORT
> > >> > - Or define all FPC_HAS_FEATURE_XXX constants.
> > >> > - Or maybe even check the compiler binary using the above
> > >> > method...
> > >>
> > >> The best solution is using the PPUs instead of sources.
> > >
> > > Using which PPU reader?
> >
> > See the mail thread in june 2008 with a proposal to create a fcl-ppu
> > package independent of the compiler.
> >
> > http://www.hu.freepascal.org/lists/fpc-pascal/2008-June/017744.html
>
> I started a platform independent ppu reader in the codetools. Writing a
> simple parser is easy, writing a ppu find declaration is a lot of work
> and does not solve all problems. So this is a good solution and for some
> cases the best solution, but it is a long term solution and not
> available in the foreseeable future.
And did you fix the 'TObject not found' with a short-term solution ? :-)
Michael.
More information about the fpc-devel
mailing list