toolchain: fix using external toolchains built with buildroot
authorYann E. MORIN <yann.morin.1998@anciens.enib.fr>
Tue, 6 Apr 2010 22:50:10 +0000 (00:50 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 7 Apr 2010 07:49:20 +0000 (09:49 +0200)
commit6db57c69360087b3b7b8fc2b7764d2911ec24d43
treecfc88eee4f085d3dc7a82b5807ce92707cbfea71
parent3e7de2af675e24e8a33495ccbd1515854d490122
toolchain: fix using external toolchains built with buildroot

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 <yann.morin.1998@anciens.enib.fr>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
toolchain/external-toolchain/ext-tool.mk