Skip to contentSkip to conversation

toolchain/helpers.mk: don't discard check_arm_abi stderr

PATCH New Baruch Siach 3 participants 3 messages Jul 3, 2014 – Jul 4, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain/helpers.mk: don't discard check_arm_abi stderr

Since we are only need to know whether the compiler runs successfully, and stderr is empty for the success case, there is no need to redirect stderr to /dev/null. Moreover, stderr output of the failing case reveals valuable information on the real failure reason.

Cc Thomas Petazzoni <[email protected]>
---
 toolchain/helpers.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
toolchain/helpers.mk +1 -1
index c85968054012..8eb71efc19eb 100644
@@ -298,7 +298,7 @@ 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 - 2>/dev/null; then \
+	if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o /dev/null - ; then \
 		abistr_$(BR2_ARM_EABI)='EABI'; \
 		abistr_$(BR2_ARM_EABIHF)='EABIhf'; \
 		echo "Incorrect ABI setting: $${abistr_y} selected, but toolchain is incompatible"; \
Signature · 1 line
2.0.0
#1 lore raw

PATCH 1/1 toolchain/helpers.mk: don't discard check_arm_abi stderr

Dear Baruch Siach,

Quoted 1 line · Baruch Siach

Since we are only need to know whether the compiler runs successfully, and

s/are//

Quoted 6 lines

stderr is empty for the success case, there is no need to redirect stderr to /dev/null. Moreover, stderr output of the failing case reveals valuable information on the real failure reason.

Cc Thomas Petazzoni <[email protected]>

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 toolchain/helpers.mk: don't discard check_arm_abi stderr

In reply to Baruch Siach
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Since we are only need to know whether the compiler runs successfully, and stderr is empty for the success case, there is no need to redirect stderr to /dev/null. Moreover, stderr output of the failing case reveals valuable information on the real failure reason.

Cc Thomas Petazzoni <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard