On 08 Oct 2008, at 09:15, Brad Campbell wrote:
I'm cross compiling from i386-linux to i386-darwin/powerpc-darwin/
i386-win32. I can't seem to create smartlinkable libraries for
anything other than i386-linux and so all my cross compiled files
are suddenly huge by comparison.
I thought I had this working. Everything is compiled with -CX -XX,
but I only have .a files in my i386-linux directory, and my -va
compile logs from the other architectures all say..
unit STRUTILS can't be smart linked, switching to static
linking
[7.082] Searching file /opt/cross/lib/fpc/2.2.3/units/powerpc-darwin/
rtl/strutils.o... found
Smart linking does not happen using .a files on Darwin. Smart linking
is performed by the Darwin linker (as of the one included with Xcode
1.5 and higher) using the plain .o files. All that needs to be done is
to add ".subsections_via_symbols" at the end of an assembler file
(which FPC does when you use -CX) and pass -dead_strip to the linker
when linking (which FPC does when you use -XX).
Please file a bug to have this warning only shown for Darwin in case a
unit has been compiled without -CX.
I have no idea why it wouldn't work if you cross-compile, since as
explained it's just a matter of having a single line in the assembler
files and passing a parameter to the linker.
Jonas
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal