Check-in [2655d453ea]
Overview
Comment:Updated to use "fake-uname" when building Tcl if cross-compiling
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:2655d453ea5b5913688b55a9e852a850c646a527
User & Date: rkeene on 2014-05-19 03:32:27
Other Links: manifest | tags
Context
2014-05-19
17:01
Updated to supply licensing information in build check-in: 4f493878e3 user: rkeene tags: trunk
03:32
Updated to use "fake-uname" when building Tcl if cross-compiling check-in: 2655d453ea user: rkeene tags: trunk
03:29
Removed extra whitespace check-in: 0d0e6831fe user: rkeene tags: trunk
Changes

Modified server/buildpkgs/build_all.sh from [4bef3a5bc6] to [c3ccff1f0c].

    70     70   			echo '' > "${TCLPRIVATE}/win/tclWinReg.c"
    71     71   
    72     72   			## Long-standing bug in Tcl
    73     73   			echo '#undef strtod' > "${TCLPRIVATE}/compat/strtod.c.new"
    74     74   			cat "${TCLPRIVATE}/compat/strtod.c" >> "${TCLPRIVATE}/compat/strtod.c.new"
    75     75   			cat "${TCLPRIVATE}/compat/strtod.c.new" > "${TCLPRIVATE}/compat/strtod.c"
    76     76   			rm -f "${TCLPRIVATE}/compat/strtod.c.new"
           77  +
           78  +			## Update to call fake "uname" since Tcl insists on
           79  +			## using "uname" to determine HOST information
           80  +			case "${CC}" in
           81  +				*-*-*)
           82  +					sed 's|`uname |`'"${PROJROOTDIR}"'/fake-uname |g' "${TCLPRIVATE}/unix/configure" > "${TCLPRIVATE}/unix/configure.new"
           83  +					cat "${TCLPRIVATE}/unix/configure.new" > "${TCLPRIVATE}/unix/configure"
           84  +					rm -f "${TCLPRIVATE}/unix/configure.new"
           85  +					;;
           86  +			esac
    77     87   
    78     88   			tcl_platform_dir='unix win macosx'
    79     89   
    80     90   			case "${CC}" in
    81     91   				*mingw*)
    82     92   					# If the compiler looks like Mingw, use Windows
    83     93   					tcl_platform_dir='win'

Added server/buildpkgs/fake-uname version [bed70cf53f].

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