[fpc-pascal] crosscompiling from win32 to i386-linux and libc linking

Marco van de Voort marcov at stack.nl
Fri Jul 28 16:23:08 CEST 2006


> > 
> > _______________________________________________
> > fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> > http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 
> Thank you for your prompt answer.
> I tried to set the dynamic linker whith the -FL option too, but it 
> didn't help. Anyway, it seems to be a runtime hint, as you give a target 
>   path as an argument, and I don't get the chance to reach this step, as 
> I can't produce any executable.
> 
> I read your doc, and didn't see anything else that could improve the 
> matters.

Also note step 8 it is very treacherous.

The 10th step can nowdays (all versions after medium july) be done by
passing  -XLAc=c,dl and -XLAgtk=gmodule,gtk  or so. Same for step 12.

Note that in the 10th step I do three things, IIRC
- The -FL sets the place where the loader on the target should look for the
dnyamic linker.
- The -Xr causes it to also search /usr/lib for anything it needs.
- The -Fl points to the directory where I stored the copies of the libs.
Note that I sometimes renamed the copied libs a bit to match the names it
searches.

Also note this remark:

----
Making mistakes with renaming is not that bad, there will be chances to fix
it. Make sure all crt* and a file "libc.so" are available, otherwise
generating link.res will go wrong. (Yes, Peter, that was my fault :-)
----

In case you added parameter by parameter, clean, and try to build again with
all relevant parameters. The compiler on Linux makes some decisions based on
the existance of some of these files.





More information about the fpc-pascal mailing list