[Buildroot] Issue for the integration of Codesourcery external toolchains

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Jan 12 10:54:41 UTC 2010


On Wed, 6 Jan 2010 08:59:53 +0200
Baruch Siach <baruch at tkos.co.il> wrote:

> >  * Build a more normal sysroot in $(STAGING_DIR) by combining the
> >    contents of armv4t and the header files. But this would require
> >    telling gcc that the libraries aren't in armv4t anymore. This is
> >    probably possible using a custom spec file, but is quite
> >    complicated.
> 
> How about generating symlinks in the staging directory:
> 
> armv4t/usr/include -> ../../usr/include
> thumb2/usr/include -> ../../usr/include
> 
> and then using the output of -print-sysroot for each target?

Because everything in Buildroot assumes that the libraries and headers
must be installed in $(STAGING_DIR)/usr/include and
$(STAGING_DIR)/usr/lib, not in $(STAGING_DIR)/armv4/usr/include and
$(STAGING_DIR)/armv4/usr/lib.

See the following part of my original e-mail:

==============================================
When the armv5t architecture is selected, everything works as
expected: the includes are in $(STAGING_DIR)/usr/include, the
libraries in $(STAGING_DIR)/lib and $(STAGING_DIR)/usr/lib.

When armv4t is selected, the include files are in
$(STAGING_DIR)/usr/include, but the libraries are in
$(STAGING_DIR)/armv4t/lib and $(STAGING_DIR)/armv4t/usr/lib. And the
linker *only* looks in these directories for the libraries.

Unfortunately, all Buildroot packages install their libraries in
$(STAGING_DIR)/lib and $(STAGING_DIR)/usr/lib, so the linker doesn't
find them.

For example, compiling zlib works, but compiling libpng fails because
it cannot find zlib. This is because zlib has been installed in
$(STAGING_DIR)/usr/lib and not in $(STAGING_DIR)/armv4t/usr/lib.
==============================================

Thanks for the feedback!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the buildroot mailing list