Re: Configuring a cross-compiling gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux