Sign in Join

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

Mailing lists / fpc-pascal / 2003-06

gnu binutils cross compiler/linker for linux from windows

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Harald Houppermans

Hi,

I want to create a pascal compiler which can cross compile for linux from windows.

( So I can develop server programs on windows and then later run then on linux server's )

It seems there are 2 pascal compilers which might be able to do that:

1. free pascal.
2. gnu pascal.

I am trying to get free pascal working as a cross compiler.

I have been told by a user of free pascal that I need a cross compiler and a cross linker also websites say that.

It also seems that gnu binutils 2.14 contain a cross compiler and a cross linker ? ( or what is a cross assembler ? )

So I need to compile/link/build the gnu binutils. ( I think?: working on windows and compiling for linux )

I already tried compiling gnu binutils the simple way: ./configure
make

It gives this error:

/bin/sh ./../ylwrap "" deffilep.y y.tab.c deffilep.c y.tab.h deffilep.h -- -d ./../ylwrap: -d: command not found

ylwrap seems to be a script.

I have been told to install bison and flex.

My questions are the following:

Compiling binutils:

1. Which parameters to use for ./configure ?
2. How to install binutils ?

Installing flex:

1. Where do I extract the zipfile too ? does it matter ?
2. How should I compile it
3. How to install it and where ?

Same questions for bison

I'll try and post this same message to the free pascal mailing list as well.

What I am trying to do seems rather complex... I have almost no experience with linux !

I also have msys installed.

Any help would be great.

Skybuck.

Earnie Boyd
to Harald Houppermans
Harald Houppermans wrote 8 lines
My questions are the following: Compiling binutils: 1. Which parameters to use for ./configure ? 2. How to install binutils ?

cd binutils
mkdir build
cd build
../configure --prefix=/mingw --target=i686-pc-gnu-linux make
make install

Show quoted text 6 lines
Installing flex: 1. Where do I extract the zipfile too ? does it matter ? 2. How should I compile it 3. How to install it and where ?

cd flex
mkdir build
cd build
../configure --prefix=/mingw
make
make install

Same questions for bison

cd bison
mkdir build
../configure --prefix=/mingw
make
make install

Earnie.

Marco van de Voort
to Harald Houppermans: I want to create a pascal compiler which can cross compile for linux from windows. ( So I…
Show quoted text 10 lines
I want to create a pascal compiler which can cross compile for linux from windows. ( So I can develop server programs on windows and then later run then on linux server's ) It seems there are 2 pascal compilers which might be able to do that: 1. free pascal. 2. gnu pascal. I am trying to get free pascal working as a cross compiler.

FPC has in principle a compiler per architecture. So for Windows/x86->linux/x86 you don't need a separate crosscompiler.

I have been told by a user of free pascal that I need a cross compiler and a cross linker also websites say that.

You also need FPC cross libraries. However these can be made using the compiler and source of the normal FPC distribution.

(recompile with make all OS_TARGET=<target> in the top level and cross-binutils set with -FD option or in the path.

If you link to non-FPC libraries (or use FPC libraries that do, like the GTK headers) you'll also need the suitable Linux libs on your windows machine.

It also seems that gnu binutils 2.14 contain a cross compiler and a cross linker ? ( or what is a cross assembler ? )

cross assembler and linker.

So I need to compile/link/build the gnu binutils. ( I think?: working on windows and compiling for linux )

Maybe you can download them somewhere.

I already tried compiling gnu binutils the simple way: ./configure

This will probably become something like

./configure -target=<platform to compiler for>

Show quoted text 5 lines
I'll try and post this same message to the free pascal mailing list as well. What I am trying to do seems rather complex... I have almost no experience with linux !

I think there are win32 cross-binutils for the usual targets available on the net somewhere. I think that'd be easier than setting up an gcc environment to compile them corss.