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]

 



17.3.2011 20:15, Kai Ruottu kirjoitti:

17.3.2011 16:13, David Paterson kirjoitti:
I thought the directory structure in the install location was set
up by the configure and build system to keep the host and target
versions of things separate.

For the "system targets" there is nowadays the '--with-sysroot=$sysroot'
to point to the place where the "native" stuff for the $target system
is installed on the cross $host, in its "native" install scheme. For
instance:

$sysroot/etc
$sysroot/bin
$sysroot/lib
$sysroot/sbin
$sysroot/usr/bin
$sysroot/usr/include
$sysroot/usr/lib
$sysroot/usr/sbin

for some Linux distro. Imagining the "native install scheme" for an
embedded system may however be hard, so the traditional $tooldir
aka $prefix/$target install place is still used in these cases. So
the 'bin' there has executables for the $host and targeted to $target.
But 'include' and 'lib' have headers and library binaries for $target.
Only the last two are moved into the $sysroot in the new scheme...
The $prefix/bin then has those '$prefix-<tool>'s (with the default
names, these can be changes via the GCC configure options
'--program-suffix=something' and '--program-prefix=something').

For some it of course could be possible to imagine some "native GCC
installation" for the $target where the "native" C library headers
are in the '/usr/include' and the native libraries in '/usr/lib'.
One then wants to make "another incarnation" of this GCC on some
cross $host and copies its "native C library" into some suitable
$sysroot. Then there would not be that stupid 'sys-include' issue!
Something to try for some brave person :) I really cannot tell where
the newlib headers and libraries would be installed in the
'--with-sysroot=$sysroot' case, hopefully not to the '/usr/include'
and '/usr/lib' :( Does the newlib configure really understand and
use the $sysroot or does the main configury give right install
places for 'newlib' and 'libgloss'? One tries, one sees, there is
the bravery...

I had that bravery, almost...

After installing with :

  make DESTDIR=/opt/temp install

I saw that the newlib(-1.18.0) installs didn't notice the used
'--with-sysroot=$sysroot' in any way, the newlib headers
and libraries still were installed into the '$prefix/$target' !


[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