From 96d6ad855914dffdb4dca6015b0e576629151208 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 10 Dec 2015 00:25:54 +0100 Subject: detect BSD bc and use our own to avoid linux kernel compile breakage --- scripts/scan-tools.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index 42a4e0a1d..8557179df 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -215,11 +215,15 @@ fi # always required, but can be provided by host host_build_bc=0 if which bc >/dev/null 2>&1; then - if ! echo quit|bc -q 2>/dev/null >/dev/null;then - host_build_bc=1 - fi + if ! echo quit|bc -q 2>/dev/null >/dev/null; then + host_build_bc=1 + else + if bc -v 2>&1| grep -q BSD >/dev/null 2>&1; then + host_build_bc=1 + fi + fi else - host_build_bc=1 + host_build_bc=1 fi host_build_bison=0 -- cgit v1.2.3