external-toolchain: adjust tests on TARGET_CC and TARGET_CXX
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 5 Jul 2010 22:03:35 +0000 (00:03 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 7 Jul 2010 06:18:42 +0000 (08:18 +0200)
commit08235f7144d08bc111b07d3523ac6439f6fd0b94
tree2abd55a9351868e2cd8a5315401cf307b1449fcb
parent9d6610f58fd8ab9afb677ccef2dc73dd0a7c187c
external-toolchain: adjust tests on TARGET_CC and TARGET_CXX

Following the changes to TARGET_CC/TARGET_CXX to include the --sysroot
option, these variables not only contain the path to the compiler, but
also the --sysroot option. For that reason, we cannot anymore just use
"test -x" to test for the compiler presence. Instead, we see if
$(TARGET_CC) -v and $(TARGET_CXX) -v return a zero status.

Moreover, --sysroot now needs to be filtered out of $(TARGET_CC) and
not $(TARGET_CFLAGS) when asking the toolchain for its original
sysroot and arch sysroot.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
toolchain/external-toolchain/ext-tool.mk