building cross compiler in OS X?
Geoff Oltmans
oltmansg@bellsouth.net
Fri May 29 17:11:00 GMT 2009
configure for binutils complains that it can't find gmp.h. I haven't
built this yet. Does this also need to be built as a cross-platform
library?
On May 29, 2009, at 11:24 AM, Kai Ruottu wrote:
> Geoff Oltmans wrote:
>> Well that must have been part of the problem. I can't recall giving
>> any options to configure in binutils. I went back and did that with
>> the following:
>> /configure --target=m68k-elf --program-prefix=cf-
>> however now I get the following build error with binutils
>> checking whether the C compiler (gcc -g -O2 ) works... no
>> configure: error: installation or configuration problem: C compiler
>> cannot create executables.
>
> Should this 'gcc' be your normal 'CC' ? If so then it seems like
> you couldn't compile and link anything with your system compiler...
>
> But your GCC build went to the 'libgcc' phase which means that your
> system GCC could create executables like 'xgcc', 'cc1',... for the
> crosscompiler...
>
>> There was a comment before this that said the following:
>> checking whether the C compiler (gcc -g -O2 ) is a cross-
>> compiler... no
>> Does the gcc I build with need to be a cross compiler in order to
>> build binutils for another target? Chicken and egg problem?
>
> Of course not, the results should be 'm68k-elf-as', 'm68k-elf-ld'
> etc.,
> in '$prefix/bin', here '/usr/local/bin', and the bare name copies of
> them in '$prefix/$target/bin', here '/usr/local/m68k-elf/bin', "binary
> utilities" which can handle 'm68k-elf' binaries on your OS X host...
>
More information about the Gcc-help
mailing list