[fpc-pascal] PowerPC crosscompiler on i386 Mac OS X looks for, wrong assembler and linker
jonas.maebe at elis.ugent.be
Tue Jul 3 10:57:40 CEST 2007
On 3 jul 2007, at 09:45, Adriaan van Os wrote:
>> Maybe you have a ~/.fpc.cfg, or an fpc.cfg in the current directory?
> No, there is only one fpc.cfg on my computer and that's the one in /
Note the spelling of the first file: .fpc.cfg. Anyway, it doesn't
matter, see below.
>> default, no prefix is set, so it has to come from some
>> configuration file
>> you have somewhere.You can also try compiling with -va to see which
>> config files are parsed (and see a lot of other debug information).
>> Also, as far as I know you've cross-compiled successfully in the
> I tried ppcppc, but it turned it to be a PowerPC binary
That's by design (I now see I read your 9165 bug report wrongly).
When doing a cross make all, you create both a cross compiler
(ppcrossXXX) and a native compiler for the selected target platform
(which can be used for bootstrapping on the target platform).
> and it has endian issues <http://www.freepascal.org/mantis/view.php?
I meant before that. Or was that the first time ever you tried to
compile a PowerPC binary on an Intel Mac?
Using ppu files with compilers compiled for a different endianess
than the compiler which generated those ppu files is simply something
which is not supported at this time, because no one does that anymore
nowadays (although Daniel is now trying to fix that -- and yes, we
should have given an error message instead of failing due to reading
invalid data from ppu files, but as I said, nobody even tried that
for a very long time). It is not needed either for cross compiling,
because all ppu files are generated using the cross compiler (and the
created native compiler is only intended for bootstrapping).
>> what changed? Maybe it's better to take this to the mailing list,
>> this doesn't sound like a bug to me but a configuration problem.
> I am doing that now, but I bet it's a bug. Even if not, why is the
> build system so obscure "some configuration file you have
> somewhere" that this can happen ? I am not at all saying that FPC
> should follow GNU conventions, no, but at least the rules are clear
> there. You configure for target, host and build and then the
> Makefile takes cares of the rest.
I'm sorry, but I'm not sure what is obscure here:
a) Under *nix, FPC, like pretty much every other *nix app out there,
supports three different default locations for configuration files,
which are sought in the order current directory, home directory,
global config directory (/etc on e.g. Mac OS X and Linux, /local/etc
under *BSD, ...)
b) when cross compiling, you can configure a prefix which has to be
prepended to the names of the binutils. This is done using the -XP
You indeed cannot do point b) with gcc afaik, because I believe that
there the prefixes are hardcoded in the binary (probably specifiable
as parameter to configure). It's debatable whether this is an advantage.
As I asked, please try to use "-va" to see which config files are
loaded by the compiler and which options it encounters and parses.
And just like you now have a problem with fpc, other people also
sometimes have trouble getting cross gcc to build/install properly.
The number of howto's on how to build, install and use a cross-gcc is
> If a configuration is not supported or if there is a problem, you
> get a clear error message.
More information about the fpc-pascal