<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Sam Liddicott wrote:
<blockquote cite="mid:475A52E6.9030501@liddicott.com" type="cite">
  <meta content="text/html;charset=US-ASCII" http-equiv="Content-Type">
* Marco van de Voort wrote, On 07/12/07 08:20:
  <blockquote cite="mid:20071207082010.C012B2289B@snail.stack.nl"
 type="cite">
    <blockquote type="cite">
      <pre wrap="">I'm modifying the lazarus packaging scripts to make building debs of 
lazarus, fpc and cross-fpc variants simpler than it is. (Cross is not 
simple right now)

I've read the buildfaq (thanks Marco) and various fpc build scripts but 
am still puzzled in this respect:

Why does:

$ cd fpc
$make clean all OS_TARGET=win32  FPC=/usr/bin/ppc386

make:
./compiler/ppc386.exe

I thought I was building a cross-compiler, not cross-compiling one - or 
is it a side effect of building the rtl etc?
    </pre>
    </blockquote>
    <pre wrap=""><!---->
The thing you are missing (read buildfaq better :-) is that FPC doesn't have
to be cross for platforms on the same architecture.
  </pre>
  </blockquote>
  <br>
:-(<br>
I used 386-win32 for testing the script because FPC-SVN won't compile
for arm-wince - I'll try a ppc build for the test then.<br>
  <br>
So... because the makefile knew it was compiling for the same
architecture it decided that I wasn't building an fpc cross compiler
but cross building an fpc compiler? That's a bit unexpectedly clever...<br>
</blockquote>
So... this time:<br>
$ make clean all CPU_TARGET=powerpc OS_TARGET=linux FPC=/usr/bin/ppc386
BINUTILSPREFIX=/usr/bin/powerpc-linux-gnu-<br>
<br>
And, just like before, it has created a load of powerpc binaries:<br>
<br>
$ file /tmp/fpc_patchdir/fpc_build/usr/bin/postw32 <br>
/tmp/fpc_patchdir/fpc_build/usr/bin/postw32: ELF 32-bit MSB executable,
PowerPC or cisco 4500, version 1 (SYSV), statically linked, stripped<br>
<br>
<br>
So I'm still puzzled that the recipe for creating a cross compiler is
actually cross-compiling a compiler and cross-compiling the tools.<br>
<br>
Of course,  compiler/ppcrossppc was created, but it seems as a
precursor to creating all the powerpc binaries.<br>
<br>
So I still think I'm doing it wrong; was my make command line correct
to produce an fpc instance that will cross-compile for powerpc-linux?<br>
<br>
Sam<br>
</body>
</html>