Merge change I6b913ab8 into eclair
* changes: Fix toolchain scripts for Darwin and Cygwin.
This commit is contained in:
@@ -135,8 +135,6 @@ case "$HOST_OS" in
|
|||||||
HOST_EXE=.exe
|
HOST_EXE=.exe
|
||||||
if [ "x$OSTYPE" = xcygwin ] ; then
|
if [ "x$OSTYPE" = xcygwin ] ; then
|
||||||
HOST_OS=cygwin
|
HOST_OS=cygwin
|
||||||
HOST_CFLAGS="$CFLAGS -mno-cygwin"
|
|
||||||
HOST_LDFLAGS="$LDFLAGS -mno-cygwin"
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -212,10 +212,35 @@ if [ "$A_MD5" != "bf072e9119077b4e76437a93986787ef" ] ; then
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Find if a given shell program is available.
|
||||||
|
# We need to take care of the fact that the 'which <foo>' command
|
||||||
|
# may return either an empty string (Linux) or something like
|
||||||
|
# "no <foo> in ..." (Darwin). Also, we need to redirect stderr
|
||||||
|
# to /dev/null for Cygwin
|
||||||
|
#
|
||||||
|
# $1: variable name
|
||||||
|
# $2: program name
|
||||||
|
#
|
||||||
|
# Result: set $1 to the full path of the corresponding command
|
||||||
|
# or to the empty/undefined string if not available
|
||||||
|
#
|
||||||
|
find_program ()
|
||||||
|
{
|
||||||
|
local PROG
|
||||||
|
PROG=`which $2 2>/dev/null`
|
||||||
|
if [ -n "$PROG" ] ; then
|
||||||
|
echo "$PROG" | grep -q -e '^no '
|
||||||
|
if [ $? = 0 ] ; then
|
||||||
|
PROG=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
eval $1="$PROG"
|
||||||
|
}
|
||||||
|
|
||||||
# And wget too
|
# And wget too
|
||||||
WGET=`which wget`
|
find_program WGET wget
|
||||||
CURL=`which curl`
|
find_program CURL curl
|
||||||
SCP=`which scp`
|
find_program SCP scp
|
||||||
|
|
||||||
# download a file with either 'curl', 'wget' or 'scp'
|
# download a file with either 'curl', 'wget' or 'scp'
|
||||||
# $1: source
|
# $1: source
|
||||||
|
|||||||
@@ -185,8 +185,9 @@ toolchain_clone mpfr
|
|||||||
# We only keep one version of gcc and binutils
|
# We only keep one version of gcc and binutils
|
||||||
|
|
||||||
# we clearly don't need this
|
# we clearly don't need this
|
||||||
log "getting rid of obsolete gcc 4.3.1 sources"
|
log "getting rid of obsolete sources: gcc-4.3.1 gdb-6.8"
|
||||||
rm -rf $TMPDIR/gcc/gcc-4.3.1
|
rm -rf $TMPDIR/gcc/gcc-4.3.1
|
||||||
|
rm -rf $TMPDIR/gcc/gdb-6.8
|
||||||
|
|
||||||
# create the package
|
# create the package
|
||||||
PACKAGE=/tmp/$PKGNAME.tar.bz2
|
PACKAGE=/tmp/$PKGNAME.tar.bz2
|
||||||
|
|||||||
Reference in New Issue
Block a user