On 23 Feb 2015, at 11:40, Mattias Gaertner wrote:
What are the differences between ppc386 and ppcross386?
ppcross386 gets compiled as part of a cross build (e.g. when
performing "make all OS_TARGET=win32" on a Linux/i386 machine), but
other than that it is the same as ppc386. The reason is that a cross
build always compiles both a cross-compiler (a Linux/i386-native
ppcross386 in the above scenario) and a native compiler for the target
(a Win32/i386-native ppc386 in the above scenario), and obviously both
binaries can't have the same name since they're both located in the
compiler directory after buidling.
Related question:
When calling "fpc -Pi386" it searches for ppc386, but not for
ppcross386. Why is that?
It will search for ppcross386 if the fpc binary has been compiled for
an architecture that is not i386, except on Darwin. From fpc.pp:
{$ifndef darwin}
ppcbin:='ppcross'+cpusuffix;
{$else not darwin}
{ the mach-o format supports "fat"
binaries whereby }
{ a single executable contains machine
code for }
{ several architectures -> it is counter-
intuitive }
{ and non-standard to use different binary
names }
{ for cross-compilers vs. native
compilers }
ppcbin:='ppc'+cpusuffix;
{$endif not darwin}
In hindsight (the above is from 2008), I should have simply changed
this for all platforms, because "fpc" is only used for installed
compilers and it doesn't make sense to install both a native and cross-
compiler into the same prefix (and even if you do, you'd still get
binary name conflicts for e.g. an x86-64 -> ARM and an i386 -> ARM
cross-compiler). It also causes confusion that build their own Darwin
compiler, because make (cross)install will still install ppcross*
(they are renamed by a script I use to package the official releases).
Jonas
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal