From 6bba29f84a725c67f548290bb3a9832c793797cc Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Fri, 29 Jan 2010 17:40:52 +0000 Subject: Add the BSD-licensed getopt tool to crossgcc, to use if there's no native getopt around. Use $PATCH instead of the hardcoded "patch" for patching files (after we already looked it up) Ignore various temporary files via svn:ignore Signed-off-by: Patrick Georgi Acked-by: Ronald G. Minnich git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5063 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/crossgcc/buildgcc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'util/crossgcc/buildgcc') diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 7174bf90a7..427af4d5f3 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -132,6 +132,10 @@ EOF printf "${blue}Welcome to the ${red}coresystems${blue} cross toolchain builder v$CROSSGCC_VERSION ($CROSSGCC_DATE)${NC}\n\n" +# Look if we have getopt. If not, build it. +export PATH=$PATH:. +getopt - > /dev/null 2>/dev/null || gcc -o getopt getopt.c + # parse parameters.. try to find out whether we're running GNU getopt getoptbrand="`getopt -V`" if [ "${getoptbrand:0:6}" == "getopt" ]; then @@ -205,7 +209,7 @@ for PACKAGE in GMP MPFR GCC BINUTILS GDB $MINGW_PACKAGES; do for patch in patches/${!dir}_*.patch; do test -r $patch || continue printf " o `basename $patch`\n" - patch -s -N -p0 < `echo $patch` + $PATCH -s -N -p0 < `echo $patch` done ) done -- cgit v1.2.3