Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2000-09

crosscompiling

7 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Javier Ros

From the manuals it seems that fpc is itself a croscompiler. I would like to generate win32 executables from linux using v1.0 of the fpc compiler.

Is it posible?

At this moment I'm using the -Twin32 directive, but ppc386-Twin32 helloworld.pp complains about syswin32 unit missing.

So I supouse that I have to install? (generate?) the win32 units. and thats all?

How can this be done?. Having installed the sources, I suppouse that I have to go to
some directory an then do some special kind of make?

Can you help me please?.

Thanks

Javier.

Reply by email

Sebastian Günther
to Javier Ros
Javier Ros wrote 7 lines
>From the manuals it seems that fpc is itself a croscompiler. I would like to generate win32 executables from linux using v1.0 of the fpc compiler. Is it posible?

It is possible, I did it for myself some time ago, but it would be nice if one of the other core developers could repeat the necessary changes, as I've forgot them for myself :) Especially as I wanted to test some things on Windows for myself, but Linux is my primary development platform. The things I can remember can be found downwards.

Show quoted text 5 lines
At this moment I'm using the -Twin32 directive, but ppc386-Twin32 helloworld.pp complains about syswin32 unit missing. So I supouse that I have to install? (generate?) the win32 units. and thats all?

No, you need to have the assembler, linker etc. for Win32 installed. There are rumours that a cross-compiling package is available somewhere, but I never found it... But you can compile the GNU linker and similar tools for cross-compiling/linking for yourself, there are instructions for doing this in the according package. (binutils, I think). But be careful, the assembler must have the name 'asw', and so on.

(The following stuff may be outdated:)
Another problem is that FPC itself doesn't have the COFF writer included in the Linux version. When compiling a new compiler for yourself, undefine some symbols by appending "-uNOAG386INT -uNOAG386BIN" to the command line. I.e. do something like this:
make OPT="-uNOAG386INT -uNOAG386BIN" clean all install

But as I would had to try this out for myself within the next few days anyway, perhaps we can find a working solution even today. I'll post another mail then...

- Sebastian

Reply by email

Pavel V. Ozerski
to Sebastian Günther
Show quoted text 7 lines
No, you need to have the assembler, linker etc. for Win32 installed. There are rumours that a cross-compiling package is available somewhere, but I never found it... But you can compile the GNU linker and similar tools for cross-compiling/linking for yourself, there are instructions for doing this in the according package. (binutils, I think). But be careful, the assembler must have the name 'asw', and so on.

Earlier I sent information about urls to cross-tools. I can remind (and enlarge) them (but all are not tested some links can be obsolete, some contain only C sources, also you must extract from them only necessary utils):

Linux>Win32, several variants:
cygwin-b20_glibc-2.i386.rpm [ftp://ftp.coda.cs.cmu.edu/pub/tools/win32/cygwin-b20_glibc-2.i386.rpm] crossmingw32-990111-1.src.rpm [ftp://ftp.task.gda.pl/pub/linux/redhat-contrib/libc6/SRPMS/crossmingw32-990111-1.src.rpm] cross32-linux-x86-glibc-2.1.tar.gz [http://www.devolution.com/~slouken/SDL/Xmingw32/cross32-linux-x86-glibc-2.1.tar.gz]. crossgcc-x86-glibc-2.1.tar.gz [http://www.devolution.com/~slouken/SDL/Xmingw32/crossgcc-x86-glibc-2.1.tar.gz]

DOS>M68K at ftp://ftp.lysator.liu.se/pub/msdos/gnu/gcc-dos-m68k/

Win32>M68K at http://fiddes.net/coldfire/download.htm

BTW, now I try to find cross-utils DOS>Linux (ELF) or Win32>Linux (ELF) but not successfully. Can somebody help me?

Pavel

Reply by email

Marco van de Voort
to Sebastian Günther: It is possible, I did it for myself some time ago, but it would be nice if one of the…
Show quoted text 12 lines
things on Windows for myself, but Linux is my primary development platform. The things I can remember can be found downwards. > At this moment I'm using the -Twin32 directive, but ppc386-Twin32 > helloworld.pp complains about syswin32 unit missing. > > So I supouse that I have to install? (generate?) the win32 units. and > thats all? No, you need to have the assembler, linker etc. for Win32 installed. There are rumours that a cross-compiling package is available somewhere, but I never found it...

It used to be in pub/fpc/contrib, and was called ldlinux.zip. I might still have it on CD somewhere.

Reply by email

Unknown author
Show quoted text 6 lines
(The following stuff may be outdated:) Another problem is that FPC itself doesn't have the COFF writer included in the Linux version. When compiling a new compiler for yourself, undefine some symbols by appending "-uNOAG386INT -uNOAG386BIN" to the command line. I.e. do something like this: make OPT="-uNOAG386INT -uNOAG386BIN" clean all install

FYI: The 1.0.2 release will have it included. The 1.1 has it ofcourse also included as it's needed for the ELF writer.

Peter

Reply by email