[fpc-devel] Second version of FPC for iPhone SDK 2.x available
Jonas Maebe
jonas.maebe at elis.ugent.be
Sat Mar 21 13:58:22 CET 2009
On 21 Mar 2009, at 10:38, dmitry boyarintsev wrote:
> hat do you think about using another fpc.cfg file (i.e. fpcxcode.cfg)
> for iPhone compilation, rather than passing compiler configuration
> through the command line?
> i guess that the ideally, there would be no additional .cfg files, and
> compiler should use common configuration.
> But for now, an additional .cfg file would make compiler
> configuration easier!
No, because it's not enough that the compile can find its units. Xcode
can transparently link together C, C++, Objective-C and Pascal code,
but for this it needs to know all the necessary libraries and object
files. For this reason, the template generates a static library
containing the object files of all units shipped with FPC and tells
Xcode to link this library (it will only link the object files of the
actually used units).
It would be hard to get everything smoothly running if custom fpc.cfg
files were supported for a variety of reasons (no guaranteed order in
which script phases are executed in Xcode, no guaranteed common
directory to use by different targets). What would however be
possible, is to allow easily changing the location of the used
*installed* copy of FPC (so you don't have to install under /usr/
local, but anywhere you want). This requires some changes to the
template though.
> Also, i'm not experienced in compiling fp-cross-compilers, but is it
> possile to build ppcarm (for darwin) from svn trunk?
1) copy /Developer/FreePascalCompiler/iPhoneSnapshot-2.3.1-r12531/
Source/rtl/darwin/arm/sig_cpu.inc to the rtl/darwin/arm directory of
your svn checkout (that file was generated when you installed the FPC
iPhone SDK integration kit)
2) in the top level fpc directory of your checkout, execute the
following (in the first line, replace "/iphone2.1" with the name of
the actual directory where you installed the iPhone SDK):
export IPHONEPLATFORMBASEDIR=/iphone2.1/Platforms/iPhoneOS.platform/
Developer
make FPC=your_ppc386_2.3.1 CPU_TARGET=arm CROSSOPT="-FD$
{IPHONEPLATFORMBASEDIR}/usr/bin -XR${IPHONEPLATFORMBASEDIR}/SDKs/
iPhoneOS2.0.sdk/ -ap" all
Jonas
More information about the fpc-devel
mailing list