summaryrefslogtreecommitdiff
path: root/util/crossgcc/buildgcc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2010-01-29 17:40:52 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2010-01-29 17:40:52 +0000
commit6bba29f84a725c67f548290bb3a9832c793797cc (patch)
tree9e0bfe361ecf639c2a55a975576b4f39bd281a6d /util/crossgcc/buildgcc
parentcccbb898e2568178ea251b9c19242809a79efc62 (diff)
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 <patrick.georgi@coresystems.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5063 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/crossgcc/buildgcc')
-rwxr-xr-xutil/crossgcc/buildgcc6
1 files changed, 5 insertions, 1 deletions
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