building cross compiler in OS X?
Geoff Oltmans
oltmansg@bellsouth.net
Fri May 29 16:17:00 GMT 2009
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.
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?
Thanks for your help?
On May 29, 2009, at 12:57 AM, Kai Ruottu wrote:
> Geoff Oltmans wrote:
>> Hello!
>> I'm trying to build a gcc cross compiler for a coldfire target on a
>> Intel OS X (10.5.7) machine. I get the following error when trying
>> to build (in libgcc):
>> checking for suffix of object files... configure: error: cannot
>> compute suffix of object files: cannot compile
>> This is while compiling under: i686-apple-darwin9-gcc-4.0.1 (GCC)
>> 4.0.1 (Apple Inc. build 5490)
>> I'm building gcc-4.3.3, using mpfr-2.4.1 and gmp-4.1.4.
>> Here's the configure line I used:
>> ./gcc-4.3.3/configure --target=m68k-elf --program-prefix=cf- --with-
>> arch=cf
>
> What was the configure command with GNU binutils? An assembler for
> m68k-elf and a linker for m68k-elf are separate from the native
> i686-apple-darwin9 ones... Having the target binutils and the target
> C library installed before starting to build GCC are the default
> prerequisites...
>
> The GCC build tries to check the target C library unless one uses
> the '--with-newlib' in the GCC configure. Then only the newlib
> headers (from 'newlib/libc/include' in the newlib sources) will
> be needed to seen in '$prefix/$target/include' and
> '$prefix/$target/sys-include' (the second a symlink to the first).
> In your case the $prefix will be '/usr/local' when no '--prefix=
> $prefix'
> was given...
>
>> /Users/Oltmans/Downloads/gccbuild/./gcc/xgcc -B/Users/Oltmans/
>> Downloads/gccbuild/./gcc/
> > -B/usr/local/m68k-elf/bin/
>
> The target 'as' and 'ld' should be here...
>
>> -B/usr/local/m68k-elf/lib/
>
> The target C library binaries could be here...
>
> > -isystem /usr/local/m68k-elf/include
> > -isystem /usr/local/m68k-elf/sys-include
>
> The target C library headers should be here...
>
>> /Users/Oltmans/Downloads/gccbuild/./gcc/as: line 77: exec: : not
>> found
>
> Probaly this script points to the native i686 'as'...
>
More information about the Gcc-help
mailing list