diff options
author | Zheng Bao <fishbaozi@gmail.com> | 2012-09-28 16:18:58 +0800 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-10-14 20:15:46 +0200 |
commit | 36156ffa1e86c10456c3ce915705c5a71b8cd708 (patch) | |
tree | 7e8a26a00e122956d868545c943b07249d9ea481 /util/crossgcc/buildgcc | |
parent | d357e6283631ce8e3279ef825f677482f1056e50 (diff) | |
download | coreboot-36156ffa1e86c10456c3ce915705c5a71b8cd708.tar.xz |
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 <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/1502
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/crossgcc/buildgcc')
-rwxr-xr-x | util/crossgcc/buildgcc | 9 |
1 files changed, 9 insertions, 0 deletions
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 } |