This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Configuring a cross-compiling gcc
- From: Pieter Thysebaert <pieter dot thysebaert at intec dot ugent dot be>
- To: The Arrow <arrow at pileborg dot org>, gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 23 Oct 2003 10:27:25 +0200
- Subject: Re: Configuring a cross-compiling gcc
- References: <1066887506.3725.87.camel@error>
On Thursday 23 October 2003 07:38, The Arrow wrote:
> I have a "hypotethical" question...
>
> Lets say I'm making a new operating system (called somenewos), and want
> to use GCC to create this new os, and that it will be created by cross-
> compiling from a Linux host.
>
> The parameters to the configure script are:
> --enable-languages=c,c++ \
> --prefix=/some/prefix/toolchain \
> --target=i386-somenewos-elf
>
> I have used the same parameters to binutils (without the --enable-
> languages of course) and it worked ok. It also seems to work ok for GCC
> initially. However, when I try to compile GCC I get some configuration
> errors when trying to configure i386-somenewos-elf/libiberty. When
> looking in i386-somenewos-elf/libiberty/config.log, this error is at the
> bottom:
> /some/prefix/toolchain/i386-somenewos-elf/bin/ld: cannot open crt0.o: No
> such file or directory
>
> So, my question is: What should I do to get past this? Should I create a
> crt0.o and in that case what does GCC need it to do, and where should I
> place it? Am I missing some parameters to the top-level configure
> script?
Some of these crt*.o files are, well, C runtime related (glibc etc)
You haven't specified what you have done with target (=i386-somenewos-elf)
headers and (C) libraries; you will need those to build the full compiler.
You may get away without them if you build gcc with "--without-headers
--with-newlib --enable-languages=c"
That might build something close to a working C-only cross-compiler, that can
be used to build the target's C runtime (if you don't have a copy)
Pieter