Check-in [8efaf47298]
Overview
Comment:Added more cross-compilers

Updated cross-compiling to use a fake "uname" to deal with Tcl's broken-ness with respect to cross-compiling

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:8efaf472980c85b72e387d25eb8c98e088c1bf95
User & Date: rkeene on 2011-08-03 19:53:24
Other Links: manifest | tags
Context
2011-08-03
19:56
Added more build targets to the test check-in: 3cff1ace94 user: rkeene tags: trunk
19:53
Added more cross-compilers

Updated cross-compiling to use a fake "uname" to deal with Tcl's broken-ness with respect to cross-compiling check-in: 8efaf47298 user: rkeene tags: trunk

2011-08-02
23:49
Added more cross-compiler build scripts

Added more cross-compiled tests check-in: 250028d1d6 user: rkeene tags: trunk

Changes

Added build/fake-bin/uname version [239d77eb58].

            1  +#! /bin/bash
            2  +
            3  +if [ "$1" == "--fake" ]; then
            4  +	echo "true"
            5  +
            6  +	exit 0
            7  +fi
            8  +
            9  +if [ -z "${CROSS}" ]; then
           10  +	# If not cross compiling, revert to system uname
           11  +	while [ "$(uname --fake 2>/dev/null)" == "true" -a -n "${PATH}" ]; do
           12  +		PATH="$(echo "${PATH}" | /usr/bin/sed 's@^[^:]*$@@;s@^[^:]*:@@')"
           13  +
           14  +		export PATH
           15  +	done
           16  +
           17  +	if [ -z "${PATH}" ]; then
           18  +		exit 1
           19  +	fi
           20  +
           21  +	exec uname "$@"
           22  +fi
           23  +
           24  +CROSS="$(echo "${CROSS}" | sed 's@-*$@@')"
           25  +
           26  +# Determine release information
           27  +case "${CROSS}" in
           28  +	*-hpux11*)
           29  +		sysname="HP-UX"
           30  +		sysrelease="$(echo "${CROSS}" | sed 's@^.*-hpux@@')"
           31  +		;;
           32  +	*-solaris2*)
           33  +		sysname="SunOS"
           34  +		sysrelease="$(echo "${CROSS}" | sed 's@^.*-solaris@@;s@^2@5@')"
           35  +		;;
           36  +	*-linux*)
           37  +		sysname="Linux"
           38  +		sysrelease="2.6.5"
           39  +		;;
           40  +	*-netbsd*)
           41  +		sysname="NetBSD"
           42  +		sysrelease="$(echo "${CROSS}" | sed 's@^.*-netbsd@@;s@$@.0@')"
           43  +		;;
           44  +	*-freebsd*)
           45  +		sysname="FreeBSD"
           46  +		sysrelease="$(echo "${CROSS}" | sed 's@^.*-freebsd@@;s@$@.0-RELEASE@')"
           47  +		;;
           48  +esac
           49  +
           50  +# Determine machine information
           51  +case "${CROSS}" in
           52  +	hppa64-*-hpux*)
           53  +		sysmachine="9000/859"
           54  +		;;
           55  +	i386-*-solaris*)
           56  +		sysmachine="i86pc"
           57  +		;;
           58  +	sparc-*-solaris*)
           59  +		sysmachine="sun4u"
           60  +		;;
           61  +	x86_64-*)
           62  +		sysmachine="x86_64"
           63  +		;;
           64  +	i?86-*)
           65  +		sysmachine="i686"
           66  +		;;
           67  +	ia64-*)
           68  +		sysmachine="ia64"
           69  +		;;
           70  +esac
           71  +
           72  +for arg in $(echo "$@" | sed 's@.@ & @g'); do
           73  +	case "${arg}" in
           74  +		-)
           75  +			continue
           76  +			;;
           77  +		r)
           78  +			retval="${retval} ${sysrelease}"
           79  +			;;
           80  +		s)
           81  +			retval="${retval} ${sysname}"
           82  +			;;
           83  +		m)
           84  +			retval="${retval} ${sysmachine}"
           85  +			;;
           86  +		p)
           87  +			# XXX
           88  +			retval="${retval} ${syscpu}"
           89  +			;;
           90  +		n)
           91  +			retval="${retval} $(hostname)"
           92  +			;;
           93  +		a)
           94  +			retval="${sysname} $(hostname) ${sysrelease} ${sysversion} ${sysmachine} ${syscpu}"
           95  +			;;
           96  +	esac
           97  +done
           98  +
           99  +echo "${retval}" | sed 's@^  *@@;s@  *$@@'

Modified build/make-kit-crosscompile from [b27dfe1f7d] to [36d16f76ac].

     1         -#! /bin/sh
            1  +#! /bin/bash
     2      2   
     3      3   if [ -z "${CROSS}" ]; then
     4      4   	echo 'Error: Environment variable CROSS is empty/unset.  Aborting.' >&2
     5      5   
     6      6   	exit 1
     7      7   fi
     8      8   
     9         -PATH="${PATH}:${HOME}/root/cross-compilers/${CROSS}/bin"
            9  +PATH="$(pwd)/build/fake-bin:${HOME}/root/cross-compilers/${CROSS}/${CROSS}/bin:${PATH}:${HOME}/root/cross-compilers/${CROSS}/bin"
    10     10   AR="${CROSS}-ar"
    11     11   CC="${CROSS}-gcc ${CC_ADD}"
    12     12   CXX="${CROSS}-g++ ${CC_ADD}"
    13     13   RANLIB="${CROSS}-ranlib"
    14     14   STRIP="${CROSS}-strip"
    15     15   export PATH AR CC CXX RANLIB STRIP
    16     16   
    17     17   ./kitcreator "$@" --host="${CROSS}"

Added build/make-kit-freebsd-amd64 version [633dca9cb7].

            1  +#! /bin/sh
            2  +
            3  +CROSS="x86_64-unknown-freebsd8"
            4  +export CROSS
            5  +
            6  +./build/make-kit-crosscompile "$@" --enable-64bit

Added build/make-kit-netbsd-amd64 version [3a556fa537].

            1  +#! /bin/sh
            2  +
            3  +CROSS="x86_64-unknown-netbsd5"
            4  +export CROSS
            5  +
            6  +./build/make-kit-crosscompile "$@" --enable-64bit

Added build/make-kit-netbsd-i386 version [82d2d99ec2].

            1  +#! /bin/sh
            2  +
            3  +CROSS="x86_64-unknown-netbsd5"
            4  +CC_ADD="-m32"
            5  +export CROSS CC_ADD
            6  +
            7  +./build/make-kit-crosscompile "$@"