kumquat-buildroot/toolchain
Thomas Petazzoni 3c77bab2ee Create <tuple>/lib -> <sysroot>/lib symlink before installing cross gcc
This commit solves bug #1051. The problem in this bug in that WebKit
compiles a sample C program, which uses WebKit. As WebKit is written
in C++, even though the program it built with CROSS-gcc, it must be
linked with libstdc++. However, CROSS-gcc can't find the libstdc++ has
it's hidden inside <sysroot>/<tuple>/lib.

Therefore, this commit creates a symbolic link <sysroot>/<tuple>/lib
-> <sysroot>/lib before running the CROSS-gcc installation. While this
may look like a hack, this is the solution used by both Crosstool-NG
and OpenWRT.

Moreover, with this symbolic link in place, I think bug #1741 may also
be solved. The problem in this bug is that the linker tries to link
against /lib/libc.so.0. This is due to the fact that the linker finds
a libc.so script file in the original toolchain location and not
inside the copy of the toolchain sysroot in $(STAGING_DIR). As the
script file is found outside of the current toolchain sysroot, ld
considers the script has non-sysrooted, and therefore doesn't prefix
all paths found in the script file (such as /lib/libc.so.0) with the
sysroot path, leading to the failure.

So, in details, this commit :

 * Adds a BR2_ARCH_IS_64 invisible config knob that is used to know if
   the arch is a 64 bits architecture or not.

 * Creates the <sysroot>/<tuple>/lib -> <sysroot>/lib symbolic link,
   and the <sysroot>/<tuple>/lib64 -> <sysroot>/lib64 symbolic link if
   needed.

 * Fixes the external toolchain sysroot detection code so that the
   'sed' replacement is done *after* the readlink -f evaluation.

I have tested this by building ARM, x86 and x86_64 toolchains with
Buildroot, and then use these toolchains as external toolchains to
build a full X.org/Gtk/WebKit/Midori stack. I have also done a
complete ARM Buildroot internal toolchain build with the same full
X.org/Gtk/WebKit/Midori stack.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-27 22:49:36 +02:00
..
binutils toolchain: remove unused special detection of old toolchains 2010-07-02 09:13:30 +02:00
ccache ccache: fix ccache-target dependencies 2010-05-03 15:13:19 +02:00
dependencies check-host-sed.sh: use mktemp for temporary file 2010-06-21 23:02:31 +02:00
elf2flt get rid of broken nios2 support 2010-03-30 17:19:59 +02:00
external-toolchain Create <tuple>/lib -> <sysroot>/lib symlink before installing cross gcc 2010-07-27 22:49:36 +02:00
gcc Create <tuple>/lib -> <sysroot>/lib symlink before installing cross gcc 2010-07-27 22:49:36 +02:00
gdb Update all packages to quote $(TARGET_CC) 2010-07-07 08:20:21 +02:00
kernel-headers kernel-headers: bump 2.6.31-34 stable versions 2010-07-06 00:38:54 +02:00
mklibs
sstrip sstrip: fix section length corruption bug 2010-07-13 13:10:39 +02:00
uClibc Merge branch 'misc-fixes' of git://git.busybox.net/~tpetazzoni/git/buildroot 2010-07-08 10:21:16 +02:00
Config.in toolchain: get rid of "binary" for external toolchain 2010-02-08 11:01:04 +01:00
Config.in.1 Use BR2_TOOLCHAIN_BUILDROOT instead of BR2_TOOLCHAIN_SOURCE 2009-12-14 23:54:47 +01:00
Config.in.2 toolchain: remove gcc 4.1.2 and non-sysroot support 2010-06-15 23:16:55 +02:00
Makefile.in Rework sysroot option handling 2010-07-07 08:14:40 +02:00
patch-kernel.sh toolchain/patch-kernel.sh: xtensa directory overlay support 2009-07-24 02:31:34 +02:00
wget-show-external-deps.sh