diff options
author | Guido MartÃnez <guido@vanguardiasur.com.ar> | 2015-06-26 14:33:20 -0300 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-06-28 14:32:40 +0200 |
commit | 375bc18850f0f8fec90e1e478c0e9d2159377a64 (patch) | |
tree | 2b8c51e36f47a762a327ac0faedca3eead65febe /toolchain/helpers.mk | |
parent | 9971ebfe9d17efeddec76b40bf4b3714d175680b (diff) |
toolchain: allow for stupid toolchains
check_arm_abi builds a test C file to check that the toolchain is
working correctly, with the output redirected to /dev/null.
However, some toolchains (OSELAS 2014.12.0, for instance) foolishly
append ".gdb" to the output filename for an intermediate file, causing
an attempt to write to /dev/null.gdb, which obviously fails.
Fix this by adding changing the output to a temporary file, which is
later removed along with any other "suffixed" files.
Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Guido MartÃnez <guido@vanguardiasur.com.ar>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'toolchain/helpers.mk')
-rw-r--r-- | toolchain/helpers.mk | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index 30eb065e1..0dc1864bb 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -308,12 +308,14 @@ check_arm_abi = \ echo "External toolchain uses the unsuported OABI" ; \ exit 1 ; \ fi ; \ - if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o /dev/null - ; then \ + if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o $(BUILD_DIR)/.br-toolchain-test.tmp - ; then \ + rm -f $(BUILD_DIR)/.br-toolchain-test.tmp*; \ abistr_$(BR2_ARM_EABI)='EABI'; \ abistr_$(BR2_ARM_EABIHF)='EABIhf'; \ echo "Incorrect ABI setting: $${abistr_y} selected, but toolchain is incompatible"; \ exit 1 ; \ - fi + fi ; \ + rm -f $(BUILD_DIR)/.br-toolchain-test.tmp* # # Check that the external toolchain supports C++ |