<feed xmlns='http://www.w3.org/2005/Atom'>
<title>buildroot-novena/toolchain/external-toolchain, branch 2010.05_rc2</title>
<subtitle>build system for the novena open hardware laptop board</subtitle>
<id>https://git.bnewbold.net/buildroot-novena/atom?h=2010.05_rc2</id>
<link rel='self' href='https://git.bnewbold.net/buildroot-novena/atom?h=2010.05_rc2'/>
<link rel='alternate' type='text/html' href='https://git.bnewbold.net/buildroot-novena/'/>
<updated>2010-04-17T00:09:38+00:00</updated>
<entry>
<title>external-toolchain: Support for multilib toolchains</title>
<updated>2010-04-17T00:09:38+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2009-08-21T23:13:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.bnewbold.net/buildroot-novena/commit/?id=05c75314c9f8f06522d520d2ea9e6d84d3db3668'/>
<id>urn:sha1:05c75314c9f8f06522d520d2ea9e6d84d3db3668</id>
<content type='text'>
Multilib toolchains provide different versions of the base libraries
for different architecture variants. For example, the ARM Codesourcery
toolchain provides base libraries for ARMv5 (default), ARMv4t and
Thumb2.

Depending on the -march= argument passed to gcc, the sysroot used by
the compiler is therefore different. This means that the sysroot
location in CROSS-gcc -v cannot be used. Instead, we must use
CROSS-gcc -print-sysroot when available and fall back to the old way
if unavailable.

Moreover, we cannot simply copy the full sysroot as we used to do,
because the sysroot organization of multilib toolchain is more
complicated. In Codesourcery toolchains, we have :

 /
   etc      -- for ARMv5
   lib      -- for ARMv5
   sbin     -- for ARMv5
   usr      -- for ARMv5 (includes headers)
   armv4t
     etc    -- for ARMv4t
     lib    -- for ARMv4t
     sbin   -- for ARMv4t
     usr    -- for ARMv4t (no headers!)
   thumb2
     etc    -- for Thumb2
     lib    -- for Thumb2
     sbin   -- for Thumb2
     usr    -- for Thumb2 (no headers!)

So we have the default ARMv5 architecture variant that is installed in
the main directory, and we have subdirectories for the ARMv4t and
Thumb2 architecture variants.

Copying the full sysroot to the staging directory doesn't work. All
our packages are based on the fact that they should install libraries
in staging/usr/lib. But if ARMv4t is used, the compiler would only
look in staging/armv4t/usr/lib for libraries (even when overriding the
sysroot with the --sysroot option, the multilib compiler suffixes the
sysroot directory with the architecture variant if it matches a
recognized one).

Therefore, we have to copy only the sysroot that we are interested
in. This is rendered a little bit complicated by the fact that the
armv4t and thumb2 sysroot do not contain the headers since they are
shared with the armv5 sysroot.

So, this patch :

 * Modifies how we compute SYSROOT_DIR in order to use -print-sysroot
   if it exists. SYSROOT_DIR contains the location of the main sysroot
   directory, i.e the sysroot for the default architecture variant.

 * Defines ARCH_SUBDIR as the subdirectory in the main sysroot for the
   currently selected architecture variant (in our case, it can be
   ".", "armv4t" or "thumb2"). ARCH_SYSROOT_DIR is defined as the full
   path to the sysroot of the currently selected architecture variant.

 * Modifies copy_toolchain_lib_root (which copies a library to the
   target/ directory) so that libraries are taken from
   ARCH_SYSROOT_DIR instead of SYSROOT_DIR. This ensures that
   libraries for the correct architecture variant are properly copied
   to the target.

 * Modifies copy_toolchain_sysroot (which copies the sysroot to the
   staging/ directory), so that it copies the contents of
   ARCH_SYSROOT_DIR, and if needed, adds the headers from the main
   sysroot directory and a symbolic link (armv4t -&gt; . or thumb2 -&gt; .)
   to make the compiler believe that its sysroot is really in armv4t/
   or thumb2/.

Tested with Codesourcery 2009q1 ARM toolchain, Crosstool-NG ARM glibc
and ARM uClibc toolchains.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>external-toolchain: support libraries outside of /lib</title>
<updated>2010-04-17T00:09:38+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2010-02-09T20:34:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.bnewbold.net/buildroot-novena/commit/?id=ea2505ee567f716f6b2aeae45ccfe2555c0bcb97'/>
<id>urn:sha1:ea2505ee567f716f6b2aeae45ccfe2555c0bcb97</id>
<content type='text'>
The copy_toolchain_lib_root function was making the assumption that
all libraries were stored inside the /lib directory of the sysroot
directory. However, this isn't true for certain toolchains,
particularly for the libstdc++ library.

The function is therefore reworked to find the library and its related
symlink either in /lib or /usr/lib in the sysroot, and copies it at
the same location in the target directory.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>toolchain: fix using external toolchains built with buildroot</title>
<updated>2010-04-07T07:49:20+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@anciens.enib.fr</email>
</author>
<published>2010-04-06T22:50:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.bnewbold.net/buildroot-novena/commit/?id=6db57c69360087b3b7b8fc2b7764d2911ec24d43'/>
<id>urn:sha1:6db57c69360087b3b7b8fc2b7764d2911ec24d43</id>
<content type='text'>
The toolchains built with buildroot use specially crafted paths for their
sysroot and prefix. Fix that by asking gcc where it finds a file we
know by relative path to the sysroot.

This has the side effect of greatly simplifying the sysroot detection
in every cases tested so far (BR toolchains, CT-NG toolchains, and
CodeSourcery toolchains).

Fixes bug #851.

Thanks Thomas Petazzoni for the hint and some testings.
Thanks Grant Edwards for the report and the comments.

Signed-off-by: Yann E. MORIN &lt;yann.morin.1998@anciens.enib.fr&gt;
Acked-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
<entry>
<title>external toolchain: fix sysroot location if the toolchain was moved</title>
<updated>2010-03-31T08:50:40+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@anciens.enib.fr</email>
</author>
<published>2010-03-24T22:42:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.bnewbold.net/buildroot-novena/commit/?id=3b7aee23f2ab732f06b8a090ca002fb102d547ee'/>
<id>urn:sha1:3b7aee23f2ab732f06b8a090ca002fb102d547ee</id>
<content type='text'>
Sysrooted toolchain can be relocated. In this case, the sysroot is no
longer located at the place it was configured at.

Signed-off-by: Yann E. MORIN &lt;yann.morin.1998@anciens.enib.fr&gt;
Acked-By: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
<entry>
<title>DNS resolv problem with glibc</title>
<updated>2009-09-15T06:50:12+00:00</updated>
<author>
<name>Anders Darander</name>
<email>anders.darander@gmail.com</email>
</author>
<published>2009-09-15T06:13:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.bnewbold.net/buildroot-novena/commit/?id=b96253a63e67e45d015e249473765953044004d2'/>
<id>urn:sha1:b96253a63e67e45d015e249473765953044004d2</id>
<content type='text'>
Fix problem with dns resolv, by copying the libnss_dns.so to the rootfs.

Using glibc from external toolchain, name resolving does not work,
unless libnss_dns.so is available on the target.

Signed-off-by: Anders Darander &lt;ad@datarespons.se&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
<entry>
<title>Fix PROGRAM_INVOCATION handling with external toolchains</title>
<updated>2009-07-31T09:40:34+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2009-07-31T09:40:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.bnewbold.net/buildroot-novena/commit/?id=8d880c3e5c68bea752c2a075d0ef0c64805df93f'/>
<id>urn:sha1:8d880c3e5c68bea752c2a075d0ef0c64805df93f</id>
<content type='text'>
BR2_UCLIBC_PROGRAM_INVOCATION is a toolchain configuration option,
like BR2_INET_IPV6, BR2_INET_RPC, on which some packages
depend. Therefore, it should be handled like BR2_INET_IPV6 and
BR2_INET_RPC in order to work properly with external toolchains.

Since we move it out of toolchain/uClibc/Config.in into
toolchain/Config.in.2, we rename the option to BR2_PROGRAM_INVOCATION
(since BR2_INET_RPC and others don't have UCLIBC in their name).

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>external toolchain: check cross-compiler existence</title>
<updated>2009-07-17T06:53:55+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2009-07-17T06:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.bnewbold.net/buildroot-novena/commit/?id=901b468e24ff546760ffdf6456d731f6388bad00'/>
<id>urn:sha1:901b468e24ff546760ffdf6456d731f6388bad00</id>
<content type='text'>
As a minimal test to the external toolchain, check that $(TARGET_CC)
is actually an existing executable file. That way, if the user
misconfigures the toolchain path and/or prefix, a meaningful error
message will be shown.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>external toolchain: respect $(Q)</title>
<updated>2009-07-17T06:48:35+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2009-07-17T06:48:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.bnewbold.net/buildroot-novena/commit/?id=82bf777ed73f449587aea59a6ce5b41164a6819f'/>
<id>urn:sha1:82bf777ed73f449587aea59a6ce5b41164a6819f</id>
<content type='text'>
Use $(Q) in external toolchain support so that the user can get the
full output by passing V=1 to make, and still get a nice and clean
output by default.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>external toolchain: copy the C++ standard library if needed</title>
<updated>2009-07-17T06:46:51+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2009-07-16T22:26:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.bnewbold.net/buildroot-novena/commit/?id=28aa0b47fb5bcb46ddcc24fdb5cc5466c094024f'/>
<id>urn:sha1:28aa0b47fb5bcb46ddcc24fdb5cc5466c094024f</id>
<content type='text'>
Obey the BR2_INSTALL_LIBSTDCPP configuration option to copy the C++
standard library to the target. Suggested by Lionel Landwerlin
&lt;lionel.landwerlin@openwide.fr&gt;.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>external toolchain: do not copy useless symbolic links</title>
<updated>2009-07-17T06:46:43+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2009-07-16T22:25:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.bnewbold.net/buildroot-novena/commit/?id=3026e9930eaf9b287aa69c4ed7adfe34913afda3'/>
<id>urn:sha1:3026e9930eaf9b287aa69c4ed7adfe34913afda3</id>
<content type='text'>
Do not copy .so symbolic links to target when not needed. Only copy
.so.X symbolic links and the library itself.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
</feed>
