annotate mini-native.sh @ 52:6d6551a37687

Add make to mini-native (required one more option switched on in uClibc), add bash and to mini-native (tweak symlink creation code to handle bash-2.04b), clean busybox source after build properly.
author Rob Landley <rob@landley.net>
date Wed, 20 Dec 2006 01:36:36 -0500
parents f96f7a24642a
children 3fd961e31444
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/sh
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 # Get lots of predefined environment variables and shell functions.
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 source include.sh
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
6 TOOLS="${NATIVE}/tools"
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 mkdir -p "${TOOLS}/bin" || dienow
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
8
50
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
9 # Purple. And why not?
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
10 echo -e "\e[35m"
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
11
50
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
12 # Build and install Linux kernel.
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
13
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
14 setupfor linux
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
15 # Install Linux kernel headers (for use by uClibc).
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
16 make headers_install ARCH="${KARCH}" INSTALL_HDR_PATH="${TOOLS}" &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
17 # build bootable kernel for target
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
18 mv "${WORK}/config-linux" .config &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
19 (yes "" | make ARCH="${KARCH}" oldconfig) &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 make ARCH="${KARCH}" CROSS_COMPILE="${ARCH}-" &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
21 cp "${KERNEL_PATH}" "${NATIVE}/zImage-${ARCH}" &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
22 cd .. &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
23 $CLEANUP linux-*
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
24
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 [ $? -ne 0 ] && dienow
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
26
50
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
27 # Build and install uClibc. (We could just copy the one from the compiler
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
28 # toolchain, but this is cleaner.)
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
29
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
30 setupfor uClibc
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
31 cp "${WORK}"/config-uClibc .config &&
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
32 (yes "" | make CROSS="${ARCH}-" oldconfig) > /dev/null &&
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
33 make CROSS="${ARCH}-" KERNEL_HEADERS="${TOOLS}/include" \
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
34 RUNTIME_PREFIX="${TOOLS}/" DEVEL_PREFIX="${TOOLS}/" \
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
35 all install_runtime install_dev install_utils &&
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
36 cd .. &&
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
37 $CLEANUP uClibc*
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
38
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
39 [ $? -ne 0 ] && dienow
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
40
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
41 # Build and install busybox
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
42
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
43 setupfor busybox
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
44 make defconfig &&
50
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
45 make CROSS="${ARCH}-" &&
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
46 cp busybox "${TOOLS}/bin"
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
47 [ $? -ne 0 ] && dienow
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
48 for i in $(sed 's@.*/@@' busybox.links)
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
49 do
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
50 ln -s busybox "${TOOLS}/bin/$i" || dienow
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
51 done
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
52 cd .. &&
52
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
53 $CLEANUP busybox-*
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
54
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
55 [ $? -ne 0 ] && dienow
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
56
50
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
57 if [ -z "${BUILD_SHORT}" ]
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
58 then
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
59
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
60 # Build and install native binutils
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
61
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
62 setupfor binutils build-binutils
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
63 CC="${ARCH}"-gcc AR="${ARCH}"-ar "${CURSRC}/configure" --prefix="${TOOLS}" \
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
64 --build="${CROSS_HOST}" --host=${CROSS_TARGET} --target=${CROSS_TARGET} \
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
65 --disable-nls --disable-shared --disable-multilib $BINUTILS_FLAGS &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
66 make configure-host &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
67 make &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
68 make install &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
69 cd .. &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
70 mkdir -p "${TOOLS}/include" &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
71 cp binutils-*/include/libiberty.h "${TOOLS}/include" &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
72 $CLEANUP binutils-* build-binutils
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
73
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
74 [ $? -ne 0 ] && dienow
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
75
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
76 # Build and install native gcc, with c++ support this time.
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
77
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
78 setupfor gcc-core build-gcc gcc-
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
79 echo -n "Adding c++" &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
80 (tar xvjCf "${WORK}" "${LINKDIR}/gcc-g++.tar.bz2" || dienow ) | dotprogress &&
50
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
81 # GCC tries to "help out in the kitchen" by screwing up the linux include
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
82 # files. Cut out those bits with sed and throw them away.
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
83 sed -i 's@\./fixinc\.sh@-c true@' "${CURSRC}/gcc/Makefile.in" &&
46
eeddef87a747 Still doesn't work, but doesn't work better.
Rob Landley <rob@landley.net>
parents: 44
diff changeset
84 # GCC has some deep assumptions about the name of the cross-compiler it should
eeddef87a747 Still doesn't work, but doesn't work better.
Rob Landley <rob@landley.net>
parents: 44
diff changeset
85 # be using. These assumptions are wrong, and lots of redundant corrections
eeddef87a747 Still doesn't work, but doesn't work better.
Rob Landley <rob@landley.net>
parents: 44
diff changeset
86 # are required to make it stop.
eeddef87a747 Still doesn't work, but doesn't work better.
Rob Landley <rob@landley.net>
parents: 44
diff changeset
87 CC="${ARCH}-gcc" GCC_FOR_TARGET="${ARCH}-gcc" CC_FOR_TARGET="${ARCH}-gcc" \
eeddef87a747 Still doesn't work, but doesn't work better.
Rob Landley <rob@landley.net>
parents: 44
diff changeset
88 AR="${ARCH}-ar" AR_FOR_TARGET="${ARCH}-ar" AS="${ARCH}-ar" LD="${ARCH}-ld" \
eeddef87a747 Still doesn't work, but doesn't work better.
Rob Landley <rob@landley.net>
parents: 44
diff changeset
89 NM="${ARCH}-nm" NM_FOR_TARGET="${ARCH}-nm" \
eeddef87a747 Still doesn't work, but doesn't work better.
Rob Landley <rob@landley.net>
parents: 44
diff changeset
90 "${CURSRC}/configure" \
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
91 --prefix="${TOOLS}" --disable-multilib \
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
92 --build="${CROSS_HOST}" --host="${CROSS_TARGET}" --target="${CROSS_TARGET}" \
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
93 --enable-long-long --enable-c99 --enable-shared --enable-threads=posix \
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
94 --enable-__cxa_atexit --disable-nls --enable-languages=c,c++ \
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
95 --disable-libstdcxx-pch &&
46
eeddef87a747 Still doesn't work, but doesn't work better.
Rob Landley <rob@landley.net>
parents: 44
diff changeset
96 make all-gcc &&
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
97 make install-gcc &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
98 ln -s gcc "${TOOLS}/bin/cc" &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
99 cd .. &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
100 $CLEANUP gcc-* build-gcc
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
101
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
102 [ $? -ne 0 ] && dienow
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
103
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
104 # Move the gcc internal libraries and headers somewhere sane.
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
105
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
106 mkdir -p "${TOOLS}"/gcc &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
107 mv "${TOOLS}"/lib/gcc/*/*/include "${TOOLS}"/gcc/include &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
108 mv "${TOOLS}"/lib/gcc/*/* "${TOOLS}"/gcc/lib &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
109 $CLEANUP "${TOOLS}"/{lib/gcc,gcc/lib/install-tools} &&
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
110
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
111 # Build and install gcc wrapper script.
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
112
51
f96f7a24642a A native compiler doesn't have a cross-prefix.
Rob Landley <rob@landley.net>
parents: 50
diff changeset
113 mv "${TOOLS}/bin/gcc" "${TOOLS}/bin/gcc-unwrapped" &&
44
41e82517e123 Helps to check in something that isn't _obviously_ broken. :)
Rob Landley <rob@landley.net>
parents: 43
diff changeset
114 gcc "${TOP}"/sources/toys/gcc-uClibc.c -Os -s -o "${TOOLS}/bin/${ARCH}-gcc"
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
115
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
116 [ $? -ne 0 ] && dienow
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
117
52
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
118 # Build and install make
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
119
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
120 setupfor make
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
121 CC="${ARCH}-gcc" ./configure --prefix="${TOOLS}" --build="${CROSS_HOST}" \
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
122 --host="${CROSS_TARGET}" &&
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
123 make &&
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
124 make install &&
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
125 cd .. &&
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
126 $CLEANUP make-*
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
127
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
128 [ $? -ne 0 ] && dienow
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
129
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
130 # Build and install bash. (Yes, this is an old version. I prefer it.)
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
131 # I plan to replace it with toysh anyway.
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
132
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
133 setupfor bash
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
134 # wire around some tests ./configure can't run when cross-compiling.
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
135 cat > config.cache << EOF &&
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
136 ac_cv_func_setvbuf_reversed=no
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
137 bash_cv_sys_named_pipes=yes
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
138 bash_cv_have_mbstate_t=yes
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
139 EOF
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
140 CC="${ARCH}-gcc" ./configure --prefix="${TOOLS}" --build="${CROSS_HOST}" \
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
141 --host="${CROSS_TARGET}" --cache-file=config.cache \
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
142 --without-bash-malloc --disable-readline &&
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
143 make &&
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
144 make install &&
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
145 # Make bash the default shell.
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
146 ln -s bash "${TOOLS}/bin/sh" &&
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
147 cd .. &&
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
148 $CLEANUP bash-*
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
149
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
150 [ $? -ne 0 ] && dienow
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
151
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
152
50
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
153 fi
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
154
50
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
155 # Packaging goes here
43
6d16887ec084 Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff changeset
156
50
5aeba79b8f5f Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents: 46
diff changeset
157 # Color back to normal
52
6d6551a37687 Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents: 51
diff changeset
158 echo -e "\e[0mBuild complete"