Check-in [8efaf47298]
Overview
SHA1:8efaf472980c85b72e387d25eb8c98e088c1bf95
Date: 2011-08-03 19:53:24
User: rkeene
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

Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2011-08-03
19:56
[3cff1ace94] Added more build targets to the test (user: rkeene, tags: trunk)
19:53
[8efaf47298] Added more cross-compilers

Updated cross-compiling to use a fake "uname" to deal with Tcl's broken-ness with respect to cross-compiling (user: rkeene, tags: trunk)

2011-08-02
23:49
[250028d1d6] Added more cross-compiler build scripts

Added more cross-compiled tests (user: rkeene, tags: trunk)

Changes

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







































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#! /bin/bash

if [ "$1" == "--fake" ]; then
	echo "true"

	exit 0
fi

if [ -z "${CROSS}" ]; then
	# If not cross compiling, revert to system uname
	while [ "$(uname --fake 2>/dev/null)" == "true" -a -n "${PATH}" ]; do
		PATH="$(echo "${PATH}" | /usr/bin/sed 's@^[^:]*$@@;s@^[^:]*:@@')"

		export PATH
	done

	if [ -z "${PATH}" ]; then
		exit 1
	fi

	exec uname "$@"
fi

CROSS="$(echo "${CROSS}" | sed 's@-*$@@')"

# Determine release information
case "${CROSS}" in
	*-hpux11*)
		sysname="HP-UX"
		sysrelease="$(echo "${CROSS}" | sed 's@^.*-hpux@@')"
		;;
	*-solaris2*)
		sysname="SunOS"
		sysrelease="$(echo "${CROSS}" | sed 's@^.*-solaris@@;s@^2@5@')"
		;;
	*-linux*)
		sysname="Linux"
		sysrelease="2.6.5"
		;;
	*-netbsd*)
		sysname="NetBSD"
		sysrelease="$(echo "${CROSS}" | sed 's@^.*-netbsd@@;s@$@.0@')"
		;;
	*-freebsd*)
		sysname="FreeBSD"
		sysrelease="$(echo "${CROSS}" | sed 's@^.*-freebsd@@;s@$@.0-RELEASE@')"
		;;
esac

# Determine machine information
case "${CROSS}" in
	hppa64-*-hpux*)
		sysmachine="9000/859"
		;;
	i386-*-solaris*)
		sysmachine="i86pc"
		;;
	sparc-*-solaris*)
		sysmachine="sun4u"
		;;
	x86_64-*)
		sysmachine="x86_64"
		;;
	i?86-*)
		sysmachine="i686"
		;;
	ia64-*)
		sysmachine="ia64"
		;;
esac

for arg in $(echo "$@" | sed 's@.@ & @g'); do
	case "${arg}" in
		-)
			continue
			;;
		r)
			retval="${retval} ${sysrelease}"
			;;
		s)
			retval="${retval} ${sysname}"
			;;
		m)
			retval="${retval} ${sysmachine}"
			;;
		p)
			# XXX
			retval="${retval} ${syscpu}"
			;;
		n)
			retval="${retval} $(hostname)"
			;;
		a)
			retval="${sysname} $(hostname) ${sysrelease} ${sysversion} ${sysmachine} ${syscpu}"
			;;
	esac
done

echo "${retval}" | sed 's@^  *@@;s@  *$@@'

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/sh

if [ -z "${CROSS}" ]; then
	echo 'Error: Environment variable CROSS is empty/unset.  Aborting.' >&2

	exit 1
fi

PATH="${PATH}:${HOME}/root/cross-compilers/${CROSS}/bin"
AR="${CROSS}-ar"
CC="${CROSS}-gcc ${CC_ADD}"
CXX="${CROSS}-g++ ${CC_ADD}"
RANLIB="${CROSS}-ranlib"
STRIP="${CROSS}-strip"
export PATH AR CC CXX RANLIB STRIP

./kitcreator "$@" --host="${CROSS}"
|







|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/bash

if [ -z "${CROSS}" ]; then
	echo 'Error: Environment variable CROSS is empty/unset.  Aborting.' >&2

	exit 1
fi

PATH="$(pwd)/build/fake-bin:${HOME}/root/cross-compilers/${CROSS}/${CROSS}/bin:${PATH}:${HOME}/root/cross-compilers/${CROSS}/bin"
AR="${CROSS}-ar"
CC="${CROSS}-gcc ${CC_ADD}"
CXX="${CROSS}-g++ ${CC_ADD}"
RANLIB="${CROSS}-ranlib"
STRIP="${CROSS}-strip"
export PATH AR CC CXX RANLIB STRIP

./kitcreator "$@" --host="${CROSS}"

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













>
>
>
>
>
>
1
2
3
4
5
6
#! /bin/sh

CROSS="x86_64-unknown-freebsd8"
export CROSS

./build/make-kit-crosscompile "$@" --enable-64bit

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













>
>
>
>
>
>
1
2
3
4
5
6
#! /bin/sh

CROSS="x86_64-unknown-netbsd5"
export CROSS

./build/make-kit-crosscompile "$@" --enable-64bit

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















>
>
>
>
>
>
>
1
2
3
4
5
6
7
#! /bin/sh

CROSS="x86_64-unknown-netbsd5"
CC_ADD="-m32"
export CROSS CC_ADD

./build/make-kit-crosscompile "$@"