ext-tool.mk: fix SUPPORT_LIB_DIR calculation for toolchains without libstdc++
authorPeter Korsgaard <jacmet@sunsite.dk>
Tue, 15 May 2012 20:44:17 +0000 (22:44 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 15 May 2012 20:44:17 +0000 (22:44 +0200)
commitd8e1ecb8557eb223f12d7d0c989fd799723211aa
treee9ad6dbca9f60ee2e4bac3e1f44fab1550acc585
parent1abaa98d9242799605fc8d91e238fc1e929b6414
ext-tool.mk: fix SUPPORT_LIB_DIR calculation for toolchains without libstdc++

SUPPORT_LIB_DIR would get resolved to the main buildroot directory for
external toolchains without C++ support, as:

 - gcc -print-file-name=<nonexisting-file> returns <nonexisting-file>
 - readlink -f <nonexisting-file> returns $PWD/<nonexisting-file>

So fix it by ensuring output of gcc -print-file-name actually exists
before using it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
toolchain/toolchain-external/ext-tool.mk