So I've got cross-compilation working but I have one last problem.
I can't seem to get fpc to drive the linker to search the SDK path
BEFORE the default paths. Specifically, i386-darwin-ld finds
/usr/lib/crt1.o
and NOT
/opt/MacOSX10.5.sdk/usr/lib/crt1.o
despite fpc being passed the option
-k-L/opt/MacOSX10.5.sdk/usr/lib
on the command line. I'm using Free Pascal Compiler version 2.4.2
[2011/06/07] for i386 and the complete command line is:
fpc \
-MDelphi \
-Scagi \
-O3 \
-Tdarwin \
-Pi386 \
-k-L/opt/MacOSX10.5.sdk/usr/lib \
-vew \
-l \
-Fi${BUILD}/i386/darwin/carbon \
-Fl/opt/MacOSX10.5.sdk/usr/lib \
-Fusrc \
-Fu${LAZARUS}/lcl/units/i386-darwin \
-Fu${LAZARUS}/lcl/units/i386-darwin/carbon \
-Fu${LAZARUS}/packager/units/i386-darwin \
-FU${BUILD}/i386/darwin/carbon/ \
-FE${BUILD}/ \
-oProject \
-gw \
-godwarfsets \
-dLCL \
-dLCLcarbon \
Project.lpr
I know it works because if I temporarily rename /usr/lib/crt1.o the
linker finds the correct SDK version and links the project properly.
What am I doing wrong that fpc does not appear to put the path
/opt/MacOSX10.5.sdk/usr/lib
ahead of the default paths when calling i386-darwin-ld?
Many thanks, Bruce.
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal