From 36156ffa1e86c10456c3ce915705c5a71b8cd708 Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Fri, 28 Sep 2012 16:18:58 +0800 Subject: crossgcc: Allow the non-gnu tar and patch work on XxxBSD For BSD, patch and tar are not default GNU. Add a work around to let the non-gun patch and tar work. Change-Id: I0a9d0bb0e535aa5e0dde146db330c3c8d7b4d8cb Signed-off-by: Zheng Bao Signed-off-by: Zheng Bao Reviewed-on: http://review.coreboot.org/1502 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/crossgcc/buildgcc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'util') diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index b79c5f6ac9..71f4e16b1d 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -99,6 +99,15 @@ searchgnu() fi fi done + # A workaround for XxxBSD, whose nongnu patch and tar also work. + if [ `uname` = "FreeBSD" -o `uname` = "NetBSD" ]; then + if [ $1 != "make" ]; then + if test -x "`which $1 2>/dev/null`"; then + echo $1 + return + fi + fi + fi printf "${RED}ERROR:${red} Missing toolchain: $1${NC}\n" >&2 exit 1 } -- cgit v1.2.3