kumquat-buildroot/toolchain/gcc
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
..
4.2.0 - for -Os, turn switch statements into if-else chains 2007-06-25 09:44:12 +00:00
4.2.1 Remove avr32 gcc patches duplicating external source 2008-03-29 11:07:12 +00:00
4.2.2-avr32-2.1.5 gcc: add 4.2.2-avr32-2.1.5 patches 2009-12-14 23:54:42 +01:00
4.2.3 * Removed GCC 4.2.0, added GCC 4.2.3 (take 2) 2008-03-30 08:12:22 +00:00
4.2.4 toolchain: gcc 4.2.4 support 2008-06-13 11:49:42 +00:00
4.3.2 toolchain/gcc: 4.3.x: fix for arm pr37436 2009-05-24 07:34:09 +02:00
4.3.3 toolchain/gcc: 4.3.x: fix for arm pr37436 2009-05-24 07:34:09 +02:00
4.3.4 toolchain/gcc: add 4.3.4 2009-08-05 10:34:34 +02:00
4.3.5 toolchain: bump gcc 4.3.x series to 4.3.5 2010-06-15 22:54:44 +02:00
4.4.4 toolchain/gcc: bump 4.4.x version to 4.4.4 2010-05-02 23:22:26 +02:00
Config.in java: mark as broken 2010-07-26 22:25:19 +02:00
Config.in.2 gcc: native toolchain needs BR2_HAVE_DEVFILES 2009-12-11 23:55:17 +01:00
gcc-uclibc-4.x.mk Create <tuple>/lib -> <sysroot>/lib symlink before installing cross gcc 2010-07-27 22:49:36 +02:00
Makefile.in toolchain/gcc: cleanup softfloat selection 2010-07-09 09:20:58 +02:00