----- Original Message ----- From: "Nikolay Nikolov" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, June 29, 2003 1:08 AM Subject: Re: [fpc-pascal]cross compiler potential ?
> Harald Houppermans wrote: > > > A step by step tutorial how to create such a cross compiler would be > > quite handy :D > > > > 1. Where do I get binutils from windows to linux ? Compiling it myself > > seems impossible... so many errors I am ready to give up on that. > > ( I tried mingw and cygwin, both with no luck ) > > > > 2. What do I do after I have bin utils from windows to linux. ? > > > > Later. > > > > Never done that, but in theory it should happen this way (I think :) ) > > you need binutils for linux (elf) target, compiled for windows. you > don't need all of the binutils, only the linker - "ld". (and also "as" - > the assembler, but it's not really necessary since free pascal can use > NASM instead, you can download it from nasm.sourceforge.net) > > suppose you have ld.exe (for linux target), and nasm, you should install > free pascal for win32, then download free pascal for linux, extract it > to some directory and copy the RTL and the other units to > c:\pp\units\linux (suppose fpc is installed in c:\pp which is the default) > > then compile for linux with: > fpc -TLINUX -Anasmelf filename.pas > > I have only cross-compiled units this way, not programs, since I don't > have the linker from binutils - "ld", and fpc needs it to create an > executable binary for linux. > > Isn't it just simpler to install linux on your pc? (I mean linux is > free, etc... that's why there are many resources on the web for > cross-compiling from linux to windows or even from linux to dos and > (almost) nothing for windows-->linux) > And you'll need linux for testing your programs anyway, because there > are differences. :) > > for tcp/ip you can use the sockets unit which is implemented on both > windows and linux. Ok, I have now compiled the binutils-2.14 successfully I believe. ( using cygwin ) I need exact instructions what to do now... What do I do with the new ld.exe and as.exe ? Overwrite old, save them ? replace ? what ??? :) Ok... I already have linux source of free pascal etc... I go do that... _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal