Re: Building a cross compiler, and unsure about the use of --without-headers

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

 



On Sun, Mar 20, 2011 at 7:06 PM, Kai Ruottu <kai.ruottu@xxxxxxxxxxx> wrote:
>
> What on earth '$prefix/include' headers?
>
> You seemed to have used the '--with-sysroot=$sysroot' which means
> "making a cross GCC which behaves like a native GCC for the $target".
> Usually people make fully normal cross GCCs for embedded targets,
> because these don't have any native GCCs to mimic, to put the native
> headers and libraries into a $sysroot which follows the native install
> scheme and serves as an image for the native target system...

OK, thanks for that information.  One of the problems with coming at
this exercise for the first time is the difficulty in finding
information.  Documentation, particularly on cross-compilers, is
sparse, hard to find, and often contradictory.  Several sites, and
mailing list threads, indicated that "--with-sysroot" should be used,
so it seemed best to follow their recommendations.  Working out
exactly what should (and, apparently, what shouldn't) be in the
configure and build scripts has taken some time, and a lot of head
scratching :-)

Interestingly, the toolchain I built using my previous multi-step
process compiles and links programs which run when downloaded to our
Sparc-based development/experiment board, so adding that option
doesn't seem to have too much of a dterimental effect.  Perhaps it
only matters when trying to create the toolchain using the single step
process?

> As was told, just provide the 'newlib' and 'libgloss' subdirs in the
> main GCC source dir, for instance as 'gcc-4.5.2/newlib' and
> 'gcc-4.5.2/libgloss' and then they should be built just like
> the 'libiberty', 'libstdc++-v3' and 'libssp' for the target with the
> built 'xgcc', 'cc1' etc.

OK, I'll try that, but what about the rest of the stuff in the
Newlib-1.19.0 directory?  There are 3 other directories and 39 files,
several of which conflict with files and directories already in the
GCC directory.  (For now I'll just ignore them and try to build
without them.  I'll let you know if it succeeds.)

> Maybe all this is too simple to understand... When one expects things
> being complicated then one tries to make them such, like using the
> '--with-sysroot=$sysroot' for something which even shouldn't be there.
> I myself see that "native system with a native GCC, native headers and
> native libraries" quite imaginary for an embedded target...

As I mentioned above, there's a real lack of clear and concise
documentation for first timers like me.  Perhaps for people well
versed in the intricacies of Linux and GCC much of it is well known
and obvious, but not all of us have that experience...

Cheers,

David


[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