Blame


1 9c836066 2024-04-07 benni TOOLS != pwd
2 9c836066 2024-04-07 benni TOP = ${TOOLS}/..
3 9c836066 2024-04-07 benni STAMPS = ${TOOLS}/build/.stamps
4 9c836066 2024-04-07 benni PREFIX = ${TOOLS}
5 d83e2c2b 2024-02-19 benni TARGET = riscv64-unknown-linux-musl
6 556cf3fc 2024-06-11 benni ARCH = rv64ima
7 9c836066 2024-04-07 benni U = ${TOOLS}/util
8 d83e2c2b 2024-02-19 benni
9 9c836066 2024-04-07 benni include ${TOP}/config.mk
10 9c836066 2024-04-07 benni
11 d83e2c2b 2024-02-19 benni BINUTILS_VER = 2.42
12 2dd3f0b2 2024-07-31 benni GCC_VER = 13.3.0
13 2dd3f0b2 2024-07-31 benni MUSL_VER = 1.2.5
14 2dd3f0b2 2024-07-31 benni LINUX_VER = 6.6.43
15 d83e2c2b 2024-02-19 benni LINUX_MAJOR != echo ${LINUX_VER} | cut -d. -f1
16 d83e2c2b 2024-02-19 benni GMP_VER = 6.3.0
17 d83e2c2b 2024-02-19 benni MPFR_VER = 4.2.1
18 d83e2c2b 2024-02-19 benni MPC_VER = 1.3.1
19 6341b1fd 2024-06-15 benni OKSH_VER = 7.5
20 2dd3f0b2 2024-07-31 benni DESTRUCT_VER = 0.4
21 ea4a917c 2024-07-06 benni RVFORTH_VER = 0.1
22 d59ba20c 2024-07-06 benni MCU_VER = 1.2
23 2e0e3a8c 2024-07-06 benni GFORTH_VER = 0.7.9_20240627
24 1e8e3702 2024-07-23 benni BUSYBOX_VER = 1.36.1
25 d83e2c2b 2024-02-19 benni
26 1e8e3702 2024-07-23 benni BBFLAGS = HOSTCC="${CC}" HOSTCXX="${CXX}" CROSS_COMPILE="${PREFIX}/bin/${TARGET}-" CONFIG_PREFIX="${TOP}/rootfs/bb"
27 1e8e3702 2024-07-23 benni
28 9c836066 2024-04-07 benni GMAKE = $U/gmake
29 9c836066 2024-04-07 benni SUDO =
30 d83e2c2b 2024-02-19 benni
31 d83e2c2b 2024-02-19 benni all: build
32 d83e2c2b 2024-02-19 benni
33 1e8e3702 2024-07-23 benni extra: rvforth oksh mcu busybox # gforth (broken)
34 ea4a917c 2024-07-06 benni
35 0375feb6 2024-07-05 benni build: ${STAMPS}/libgcc-install ${STAMPS}/destruct-install
36 d83e2c2b 2024-02-19 benni
37 3528385d 2024-04-06 benni distclean: clean
38 3528385d 2024-04-06 benni rm -rf src
39 3528385d 2024-04-06 benni
40 d83e2c2b 2024-02-19 benni clean:
41 d83e2c2b 2024-02-19 benni rm -rf bin build include lib libexec ${TARGET} share
42 d83e2c2b 2024-02-19 benni
43 d83e2c2b 2024-02-19 benni test:
44 9c836066 2024-04-07 benni ${PREFIX}/bin/${TARGET}-gcc -o /dev/null $U/test.c
45 d83e2c2b 2024-02-19 benni
46 1e8e3702 2024-07-23 benni download: src/binutils.tgz src/gcc.tgz src/musl.tgz src/linux.tgz src/gmp.tgz src/mpfr.tgz src/mpc.tgz src/oksh.tgz src/destruct.tgz src/rvforth.tgz src/mcu.tgz src/gforth.txz src/busybox.tar.bz2
47 1e8e3702 2024-07-23 benni extract: ${STAMPS}/binutils-extract ${STAMPS}/gcc-extract ${STAMPS}/musl-extract ${STAMPS}/linux-extract ${STAMPS}/gmp ${STAMPS}/mpfr ${STAMPS}/mpc ${STAMPS}/oksh ${STAMPS}/destruct ${STAMPS}/rvforth ${STAMPS}/mcu ${STAMPS}/gforth ${STAMPS}/busybox
48 d83e2c2b 2024-02-19 benni
49 d83e2c2b 2024-02-19 benni headers: ${STAMPS}/linux-headers
50 d83e2c2b 2024-02-19 benni install-headers: ${STAMPS}/linux-hdrinst
51 d83e2c2b 2024-02-19 benni binutils: ${STAMPS}/binutils-build
52 d83e2c2b 2024-02-19 benni install-binutils: ${STAMPS}/binutils-install
53 d83e2c2b 2024-02-19 benni
54 d83e2c2b 2024-02-19 benni # DOWNLOAD
55 d83e2c2b 2024-02-19 benni
56 d83e2c2b 2024-02-19 benni src/binutils.tgz:
57 d83e2c2b 2024-02-19 benni mkdir -p src
58 9c836066 2024-04-07 benni $U/download $@ https://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VER}.tar.gz
59 d83e2c2b 2024-02-19 benni
60 d83e2c2b 2024-02-19 benni src/gcc.tgz:
61 d83e2c2b 2024-02-19 benni mkdir -p src
62 9c836066 2024-04-07 benni $U/download $@ https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VER}/gcc-${GCC_VER}.tar.gz
63 d83e2c2b 2024-02-19 benni
64 d83e2c2b 2024-02-19 benni src/musl.tgz:
65 d83e2c2b 2024-02-19 benni mkdir -p src
66 9c836066 2024-04-07 benni $U/download $@ http://musl.libc.org/releases/musl-${MUSL_VER}.tar.gz
67 d83e2c2b 2024-02-19 benni
68 d83e2c2b 2024-02-19 benni src/linux.tgz:
69 d83e2c2b 2024-02-19 benni mkdir -p src
70 9c836066 2024-04-07 benni $U/download $@ https://mirrors.edge.kernel.org/pub/linux/kernel/v${LINUX_MAJOR}.x/linux-${LINUX_VER}.tar.gz
71 d83e2c2b 2024-02-19 benni
72 d83e2c2b 2024-02-19 benni src/gmp.tgz:
73 d83e2c2b 2024-02-19 benni mkdir -p src
74 9c836066 2024-04-07 benni $U/download $@ https://gmplib.org/download/gmp/gmp-${GMP_VER}.tar.gz
75 d83e2c2b 2024-02-19 benni
76 d83e2c2b 2024-02-19 benni src/mpfr.tgz:
77 d83e2c2b 2024-02-19 benni mkdir -p src
78 9c836066 2024-04-07 benni $U/download $@ https://www.mpfr.org/mpfr-current/mpfr-${MPFR_VER}.tar.gz
79 d83e2c2b 2024-02-19 benni
80 d83e2c2b 2024-02-19 benni src/mpc.tgz:
81 d83e2c2b 2024-02-19 benni mkdir -p src
82 9c836066 2024-04-07 benni $U/download $@ https://ftp.gnu.org/gnu/mpc/mpc-${MPC_VER}.tar.gz
83 d83e2c2b 2024-02-19 benni
84 6341b1fd 2024-06-15 benni src/oksh.tgz:
85 6341b1fd 2024-06-15 benni mkdir -p src
86 6341b1fd 2024-06-15 benni $U/download $@ https://github.com/ibara/oksh/releases/download/oksh-${OKSH_VER}/oksh-${OKSH_VER}.tar.gz
87 6341b1fd 2024-06-15 benni
88 0375feb6 2024-07-05 benni src/destruct.tgz:
89 0375feb6 2024-07-05 benni mkdir -p src
90 0375feb6 2024-07-05 benni $U/download $@ https://got.stuerz.xyz/download/destruct-${DESTRUCT_VER}.tgz
91 0375feb6 2024-07-05 benni
92 ea4a917c 2024-07-06 benni src/rvforth.tgz:
93 ea4a917c 2024-07-06 benni mkdir -p src
94 ea4a917c 2024-07-06 benni $U/download $@ https://got.stuerz.xyz/download/rvforth-${RVFORTH_VER}.tgz
95 ea4a917c 2024-07-06 benni
96 d59ba20c 2024-07-06 benni src/mcu.tgz:
97 d59ba20c 2024-07-06 benni mkdir -p src
98 d59ba20c 2024-07-06 benni $U/download $@ https://github.com/riscygeek/microcoreutils/archive/refs/tags/v${MCU_VER}.tar.gz
99 d59ba20c 2024-07-06 benni
100 2e0e3a8c 2024-07-06 benni src/gforth.txz:
101 2e0e3a8c 2024-07-06 benni mkdir -p src
102 2e0e3a8c 2024-07-06 benni $U/download $@ https://www.complang.tuwien.ac.at/forth/gforth/Snapshots/${GFORTH_VER}/gforth-${GFORTH_VER}.tar.xz
103 1e8e3702 2024-07-23 benni
104 1e8e3702 2024-07-23 benni src/busybox.tar.bz2:
105 1e8e3702 2024-07-23 benni mkdir -p src
106 1e8e3702 2024-07-23 benni $U/download $@ https://busybox.net/downloads/busybox-${BUSYBOX_VER}.tar.bz2
107 2e0e3a8c 2024-07-06 benni
108 d83e2c2b 2024-02-19 benni # EXTRACT
109 d83e2c2b 2024-02-19 benni
110 d83e2c2b 2024-02-19 benni ${STAMPS}/binutils-extract: src/binutils.tgz
111 d83e2c2b 2024-02-19 benni mkdir -p ${STAMPS}
112 d83e2c2b 2024-02-19 benni rm -rf build/binutils
113 d83e2c2b 2024-02-19 benni tar -C build -xzf src/binutils.tgz
114 d83e2c2b 2024-02-19 benni mv build/binutils-* build/binutils
115 d83e2c2b 2024-02-19 benni touch $@
116 d83e2c2b 2024-02-19 benni
117 d83e2c2b 2024-02-19 benni ${STAMPS}/gcc-extract: src/gcc.tgz
118 d83e2c2b 2024-02-19 benni mkdir -p ${STAMPS}
119 d83e2c2b 2024-02-19 benni rm -rf build/gcc
120 d83e2c2b 2024-02-19 benni tar -C build -xzf src/gcc.tgz
121 d83e2c2b 2024-02-19 benni mv build/gcc-* build/gcc
122 d83e2c2b 2024-02-19 benni cd build/gcc && ln -sf ../gmp ../mpfr ../mpc .
123 9c836066 2024-04-07 benni $U/fix-gcc ${TOOLS}/build/gcc
124 d83e2c2b 2024-02-19 benni touch $@
125 d83e2c2b 2024-02-19 benni
126 d83e2c2b 2024-02-19 benni ${STAMPS}/musl-extract: src/musl.tgz
127 d83e2c2b 2024-02-19 benni mkdir -p ${STAMPS}
128 d83e2c2b 2024-02-19 benni rm -rf build/musl
129 d83e2c2b 2024-02-19 benni tar -C build -xzf src/musl.tgz
130 d83e2c2b 2024-02-19 benni mv build/musl-* build/musl
131 d83e2c2b 2024-02-19 benni touch $@
132 d83e2c2b 2024-02-19 benni
133 d83e2c2b 2024-02-19 benni ${STAMPS}/linux-extract: src/linux.tgz
134 d83e2c2b 2024-02-19 benni mkdir -p ${STAMPS}
135 d83e2c2b 2024-02-19 benni rm -rf build/linux
136 d83e2c2b 2024-02-19 benni tar -C build -xzf src/linux.tgz
137 d83e2c2b 2024-02-19 benni mv build/linux-* build/linux
138 9c836066 2024-04-07 benni $U/fix-headers ${TOOLS}/build/linux/scripts/headers_install.sh
139 d83e2c2b 2024-02-19 benni touch $@
140 d83e2c2b 2024-02-19 benni
141 d83e2c2b 2024-02-19 benni ${STAMPS}/gmp: src/gmp.tgz
142 d83e2c2b 2024-02-19 benni mkdir -p ${STAMPS}
143 d83e2c2b 2024-02-19 benni tar -C build -xzf src/gmp.tgz
144 d83e2c2b 2024-02-19 benni mv build/gmp-* build/gmp
145 d83e2c2b 2024-02-19 benni touch $@
146 d83e2c2b 2024-02-19 benni
147 d83e2c2b 2024-02-19 benni ${STAMPS}/mpfr: src/mpfr.tgz
148 d83e2c2b 2024-02-19 benni mkdir -p ${STAMPS}
149 d83e2c2b 2024-02-19 benni tar -C build -xzf src/mpfr.tgz
150 d83e2c2b 2024-02-19 benni mv build/mpfr-* build/mpfr
151 d83e2c2b 2024-02-19 benni touch $@
152 d83e2c2b 2024-02-19 benni
153 d83e2c2b 2024-02-19 benni ${STAMPS}/mpc: src/mpc.tgz
154 d83e2c2b 2024-02-19 benni mkdir -p ${STAMPS}
155 d83e2c2b 2024-02-19 benni tar -C build -xzf src/mpc.tgz
156 d83e2c2b 2024-02-19 benni mv build/mpc-* build/mpc
157 d83e2c2b 2024-02-19 benni touch $@
158 d83e2c2b 2024-02-19 benni
159 6341b1fd 2024-06-15 benni ${STAMPS}/oksh: src/oksh.tgz
160 6341b1fd 2024-06-15 benni mkdir -p ${STAMPS}
161 6341b1fd 2024-06-15 benni tar -C build -xzf src/oksh.tgz
162 6341b1fd 2024-06-15 benni mv build/oksh-* build/oksh
163 6341b1fd 2024-06-15 benni touch $@
164 d83e2c2b 2024-02-19 benni
165 0375feb6 2024-07-05 benni ${STAMPS}/destruct: src/destruct.tgz
166 0375feb6 2024-07-05 benni mkdir -p ${STAMPS}
167 0375feb6 2024-07-05 benni tar -C build -xzf src/destruct.tgz
168 0375feb6 2024-07-05 benni mv build/destruct-* build/destruct
169 ea4a917c 2024-07-06 benni touch $@
170 ea4a917c 2024-07-06 benni
171 ea4a917c 2024-07-06 benni ${STAMPS}/rvforth: src/rvforth.tgz
172 ea4a917c 2024-07-06 benni mkdir -p ${STAMPS}
173 ea4a917c 2024-07-06 benni tar -C build -xzf src/rvforth.tgz
174 ea4a917c 2024-07-06 benni mv build/rvforth-* build/rvforth
175 0375feb6 2024-07-05 benni touch $@
176 6341b1fd 2024-06-15 benni
177 d59ba20c 2024-07-06 benni ${STAMPS}/mcu: src/mcu.tgz
178 d59ba20c 2024-07-06 benni mkdir -p ${STAMPS}
179 d59ba20c 2024-07-06 benni tar -C build -xzf src/mcu.tgz
180 d59ba20c 2024-07-06 benni mv build/microcoreutils-* build/mcu
181 d59ba20c 2024-07-06 benni touch $@
182 d59ba20c 2024-07-06 benni
183 2e0e3a8c 2024-07-06 benni ${STAMPS}/gforth: src/gforth.txz
184 2e0e3a8c 2024-07-06 benni mkdir -p ${STAMPS}
185 2e0e3a8c 2024-07-06 benni xzcat src/gforth.txz | tar -C build -xf -
186 2e0e3a8c 2024-07-06 benni mv build/gforth-* build/gforth
187 2e0e3a8c 2024-07-06 benni touch $@
188 2e0e3a8c 2024-07-06 benni
189 1e8e3702 2024-07-23 benni ${STAMPS}/busybox: src/busybox.tar.bz2
190 1e8e3702 2024-07-23 benni mkdir -p ${STAMPS}
191 1e8e3702 2024-07-23 benni tar -C build -xjf src/busybox.tar.bz2
192 1e8e3702 2024-07-23 benni mv build/busybox-* build/busybox
193 1e8e3702 2024-07-23 benni touch $@
194 1e8e3702 2024-07-23 benni
195 d83e2c2b 2024-02-19 benni # KERNEL HEADERS
196 d83e2c2b 2024-02-19 benni
197 d83e2c2b 2024-02-19 benni ${STAMPS}/linux-headers: ${STAMPS}/linux-extract
198 9c836066 2024-04-07 benni (cd ${TOOLS}/build/linux && ${GMAKE} ARCH=riscv HOSTCC="${CC}" headers)
199 9c836066 2024-04-07 benni rm -f ${TOOLS}/build/linux/usr/include/Makefile
200 9c836066 2024-04-07 benni rm -f ${TOOLS}/build/linux/usr/include/headers_check.pl
201 d83e2c2b 2024-02-19 benni touch $@
202 d83e2c2b 2024-02-19 benni
203 d83e2c2b 2024-02-19 benni ${STAMPS}/linux-hdrinst: ${STAMPS}/linux-headers
204 d83e2c2b 2024-02-19 benni mkdir -p ${PREFIX}/${TARGET}
205 9c836066 2024-04-07 benni cd ${TOOLS}/build/linux && ${SUDO} cp -rf ${TOOLS}/build/linux/usr/include ${PREFIX}/${TARGET}/
206 d83e2c2b 2024-02-19 benni touch $@
207 d83e2c2b 2024-02-19 benni
208 d83e2c2b 2024-02-19 benni # BINUTILS
209 d83e2c2b 2024-02-19 benni
210 d83e2c2b 2024-02-19 benni ${STAMPS}/binutils-configure: ${STAMPS}/binutils-extract
211 9c836066 2024-04-07 benni mkdir -p ${TOOLS}/build/binutils/build
212 9c836066 2024-04-07 benni cd ${TOOLS}/build/binutils/build \
213 9c836066 2024-04-07 benni && CC="${CC}" CXX="${CXX}" ../configure \
214 d83e2c2b 2024-02-19 benni --prefix=${PREFIX} \
215 d83e2c2b 2024-02-19 benni --target=${TARGET} \
216 d83e2c2b 2024-02-19 benni --with-system-zlib \
217 d83e2c2b 2024-02-19 benni --with-arch=${ARCH} \
218 9c836066 2024-04-07 benni --without-zstd \
219 d83e2c2b 2024-02-19 benni --disable-nls \
220 d83e2c2b 2024-02-19 benni --disable-werror \
221 d83e2c2b 2024-02-19 benni --disable-multilib
222 d83e2c2b 2024-02-19 benni touch $@
223 d83e2c2b 2024-02-19 benni
224 d83e2c2b 2024-02-19 benni ${STAMPS}/binutils-build: ${STAMPS}/binutils-configure
225 9c836066 2024-04-07 benni (cd ${TOOLS}/build/binutils/build && ${GMAKE})
226 d83e2c2b 2024-02-19 benni touch $@
227 d83e2c2b 2024-02-19 benni
228 d83e2c2b 2024-02-19 benni ${STAMPS}/binutils-install: ${STAMPS}/binutils-build
229 9c836066 2024-04-07 benni (cd ${TOOLS}/build/binutils/build && ${SUDO} ${GMAKE} install)
230 d83e2c2b 2024-02-19 benni touch $@
231 d83e2c2b 2024-02-19 benni
232 d83e2c2b 2024-02-19 benni # GCC
233 d83e2c2b 2024-02-19 benni
234 d83e2c2b 2024-02-19 benni ${STAMPS}/gcc-configure: ${STAMPS}/gcc-extract ${STAMPS}/binutils-install ${STAMPS}/gmp ${STAMPS}/mpfr ${STAMPS}/mpc
235 9c836066 2024-04-07 benni mkdir -p ${TOOLS}/build/gcc/build
236 9c836066 2024-04-07 benni cd ${TOOLS}/build/gcc/build \
237 1927278b 2024-06-15 benni && CC="${CC}" CXX="${CXX}" \
238 1927278b 2024-06-15 benni CXXFLAGS="${CXXFLAGS} -Dvec_step=\"xvec_step\"" \
239 1927278b 2024-06-15 benni ../configure \
240 d83e2c2b 2024-02-19 benni --prefix=${PREFIX} \
241 d83e2c2b 2024-02-19 benni --target=${TARGET} \
242 d83e2c2b 2024-02-19 benni --with-system-zlib \
243 d83e2c2b 2024-02-19 benni --with-arch=${ARCH} \
244 d83e2c2b 2024-02-19 benni --with-newlib \
245 d83e2c2b 2024-02-19 benni --without-headers \
246 d83e2c2b 2024-02-19 benni --enable-languages=c \
247 d83e2c2b 2024-02-19 benni --disable-nls \
248 d83e2c2b 2024-02-19 benni --disable-multilib \
249 d83e2c2b 2024-02-19 benni --disable-libssp \
250 d83e2c2b 2024-02-19 benni --disable-libsanitizer \
251 d83e2c2b 2024-02-19 benni --disable-libstdcxx \
252 d83e2c2b 2024-02-19 benni --disable-libgomp \
253 d83e2c2b 2024-02-19 benni --disable-libquadmath \
254 d83e2c2b 2024-02-19 benni --disable-libvtv \
255 d83e2c2b 2024-02-19 benni --disable-shared \
256 d83e2c2b 2024-02-19 benni --enable-static \
257 d83e2c2b 2024-02-19 benni --disable-threads
258 d83e2c2b 2024-02-19 benni touch $@
259 d83e2c2b 2024-02-19 benni
260 d83e2c2b 2024-02-19 benni ${STAMPS}/gcc-build: ${STAMPS}/gcc-configure
261 9c836066 2024-04-07 benni (cd ${TOOLS}/build/gcc/build && ${GMAKE} all-gcc)
262 d83e2c2b 2024-02-19 benni touch $@
263 d83e2c2b 2024-02-19 benni
264 d83e2c2b 2024-02-19 benni ${STAMPS}/gcc-install: ${STAMPS}/gcc-build
265 9c836066 2024-04-07 benni (cd ${TOOLS}/build/gcc/build && ${SUDO} ${GMAKE} install-gcc)
266 d83e2c2b 2024-02-19 benni touch $@
267 d83e2c2b 2024-02-19 benni
268 d83e2c2b 2024-02-19 benni # MUSL
269 d83e2c2b 2024-02-19 benni
270 d83e2c2b 2024-02-19 benni ${STAMPS}/musl-configure: ${STAMPS}/musl-extract ${STAMPS}/gcc-install
271 9c836066 2024-04-07 benni mkdir -p ${TOOLS}/build/musl/build
272 9c836066 2024-04-07 benni cd ${TOOLS}/build/musl/build && \
273 e46639b3 2024-02-20 benni CROSS_COMPILE=${PREFIX}/bin/${TARGET}- \
274 e46639b3 2024-02-20 benni ../configure \
275 d83e2c2b 2024-02-19 benni --prefix=${PREFIX}/${TARGET} \
276 d83e2c2b 2024-02-19 benni --target=${TARGET} \
277 d83e2c2b 2024-02-19 benni --disable-shared \
278 d83e2c2b 2024-02-19 benni --disable-wrapper \
279 d83e2c2b 2024-02-19 benni --enable-static
280 d83e2c2b 2024-02-19 benni touch $@
281 d83e2c2b 2024-02-19 benni
282 d83e2c2b 2024-02-19 benni ${STAMPS}/musl-build: ${STAMPS}/musl-configure ${STAMPS}/linux-hdrinst
283 9c836066 2024-04-07 benni (cd ${TOOLS}/build/musl/build && ${GMAKE})
284 d83e2c2b 2024-02-19 benni touch $@
285 d83e2c2b 2024-02-19 benni
286 d83e2c2b 2024-02-19 benni ${STAMPS}/musl-install: ${STAMPS}/musl-build
287 9c836066 2024-04-07 benni (cd ${TOOLS}/build/musl/build && ${SUDO} ${GMAKE} install)
288 d83e2c2b 2024-02-19 benni touch $@
289 d83e2c2b 2024-02-19 benni
290 d83e2c2b 2024-02-19 benni # LIBGCC
291 d83e2c2b 2024-02-19 benni
292 d83e2c2b 2024-02-19 benni ${STAMPS}/libgcc-build: ${STAMPS}/gcc-install ${STAMPS}/musl-install
293 9c836066 2024-04-07 benni (cd ${TOOLS}/build/gcc/build && ${GMAKE} all-target-libgcc)
294 d83e2c2b 2024-02-19 benni touch $@
295 d83e2c2b 2024-02-19 benni
296 d83e2c2b 2024-02-19 benni ${STAMPS}/libgcc-install: ${STAMPS}/libgcc-build
297 9c836066 2024-04-07 benni (cd ${TOOLS}/build/gcc/build && ${SUDO} ${GMAKE} install-target-libgcc)
298 d83e2c2b 2024-02-19 benni touch $@
299 6341b1fd 2024-06-15 benni
300 6341b1fd 2024-06-15 benni # OKSH
301 6341b1fd 2024-06-15 benni
302 1e8e3702 2024-07-23 benni ${STAMPS}/oksh-configure: ${STAMPS}/oksh ${STAMPS}/libgcc-install
303 6341b1fd 2024-06-15 benni cd ${TOOLS}/build/oksh && \
304 c21d1989 2024-06-16 benni CFLAGS="-Og -g" ./configure \
305 6341b1fd 2024-06-15 benni --prefix=/ \
306 6341b1fd 2024-06-15 benni --cc=${PREFIX}/bin/${TARGET}-gcc \
307 6341b1fd 2024-06-15 benni --enable-sh \
308 6341b1fd 2024-06-15 benni --enable-ksh \
309 6341b1fd 2024-06-15 benni --enable-static \
310 6341b1fd 2024-06-15 benni --disable-curses \
311 052cd086 2024-07-31 benni --no-strip \
312 6341b1fd 2024-06-15 benni --no-thanks
313 6341b1fd 2024-06-15 benni touch $@
314 6341b1fd 2024-06-15 benni
315 6341b1fd 2024-06-15 benni ${STAMPS}/oksh-build: ${STAMPS}/oksh-configure
316 6341b1fd 2024-06-15 benni (cd ${TOOLS}/build/oksh && ${MAKE})
317 6341b1fd 2024-06-15 benni touch $@
318 6341b1fd 2024-06-15 benni
319 6341b1fd 2024-06-15 benni ${TOP}/rootfs/bin/ksh: ${STAMPS}/oksh-build
320 6341b1fd 2024-06-15 benni mkdir -p ${TOP}/rootfs
321 6341b1fd 2024-06-15 benni (cd ${TOOLS}/build/oksh && ${MAKE} DESTDIR=${TOP}/rootfs install)
322 6341b1fd 2024-06-15 benni
323 6341b1fd 2024-06-15 benni oksh: ${TOP}/rootfs/bin/ksh
324 0375feb6 2024-07-05 benni
325 0375feb6 2024-07-05 benni # DESTRUCT
326 0375feb6 2024-07-05 benni
327 0375feb6 2024-07-05 benni ${STAMPS}/destruct-build: ${STAMPS}/destruct
328 0375feb6 2024-07-05 benni (cd ${TOOLS}/build/destruct && ${MAKE})
329 0375feb6 2024-07-05 benni touch $@
330 0375feb6 2024-07-05 benni
331 0375feb6 2024-07-05 benni ${STAMPS}/destruct-install: ${STAMPS}/destruct-build
332 0375feb6 2024-07-05 benni (cd ${TOOLS}/build/destruct && ${MAKE} PREFIX=${TOOLS} install)
333 0375feb6 2024-07-05 benni touch $@
334 d3dcf18f 2024-07-05 benni
335 d3dcf18f 2024-07-05 benni clean-destruct:
336 d3dcf18f 2024-07-05 benni rm -f bin/destruct ${STAMPS}/destruct*
337 d3dcf18f 2024-07-05 benni rm -rf build/destruct
338 d3dcf18f 2024-07-05 benni
339 d3dcf18f 2024-07-05 benni destruct: ${STAMPS}/destruct-install
340 ea4a917c 2024-07-06 benni
341 ea4a917c 2024-07-06 benni # RVFORTH
342 ea4a917c 2024-07-06 benni
343 1e8e3702 2024-07-23 benni ${STAMPS}/rvforth-build: ${STAMPS}/rvforth ${STAMPS}/libgcc-install
344 ea4a917c 2024-07-06 benni (cd ${TOOLS}/build/rvforth && ${MAKE} CC="${PREFIX}/bin/${TARGET}-gcc")
345 ea4a917c 2024-07-06 benni touch $@
346 ea4a917c 2024-07-06 benni
347 ea4a917c 2024-07-06 benni ${TOP}/rootfs/bin/rvforth: ${STAMPS}/rvforth-build
348 ea4a917c 2024-07-06 benni mkdir -p ${TOP}/rootfs/bin
349 ea4a917c 2024-07-06 benni (cd ${TOOLS}/build/rvforth && ${MAKE} PREFIX=/ DESTDIR=${TOP}/rootfs install)
350 ea4a917c 2024-07-06 benni
351 2e0e3a8c 2024-07-06 benni clean-rvforth:
352 2e0e3a8c 2024-07-06 benni rm -f ${STAMPS}/rvforth*
353 2e0e3a8c 2024-07-06 benni rm -rf build/rvforth
354 ea4a917c 2024-07-06 benni
355 ea4a917c 2024-07-06 benni rvforth: ${TOP}/rootfs/bin/rvforth
356 d59ba20c 2024-07-06 benni
357 d59ba20c 2024-07-06 benni # MICROCOREUTILS
358 d59ba20c 2024-07-06 benni
359 1be22c89 2024-07-23 benni ${STAMPS}/mcu-configure: ${STAMPS}/mcu ${STAMPS}/libgcc-install
360 d59ba20c 2024-07-06 benni cd ${TOOLS}/build/mcu && \
361 d59ba20c 2024-07-06 benni CC=${PREFIX}/bin/${TARGET}-gcc ./configure \
362 d59ba20c 2024-07-06 benni --prefix=/mcu \
363 d59ba20c 2024-07-06 benni --host=${TARGET} \
364 d59ba20c 2024-07-06 benni --enable-extra-progs
365 d59ba20c 2024-07-06 benni touch $@
366 d59ba20c 2024-07-06 benni
367 d59ba20c 2024-07-06 benni ${STAMPS}/mcu-fix: ${STAMPS}/mcu-configure
368 d59ba20c 2024-07-06 benni (cd ${TOOLS}/build/mcu && \
369 d59ba20c 2024-07-06 benni sed '/^#define malloc/d; /^#define realloc/d' config.h > config.h.new && \
370 d59ba20c 2024-07-06 benni mv config.h.new config.h)
371 d59ba20c 2024-07-06 benni touch $@
372 d59ba20c 2024-07-06 benni
373 d59ba20c 2024-07-06 benni ${STAMPS}/mcu-build: ${STAMPS}/mcu-fix
374 d59ba20c 2024-07-06 benni (cd ${TOOLS}/build/mcu && ${MAKE})
375 d59ba20c 2024-07-06 benni touch $@
376 d59ba20c 2024-07-06 benni
377 d59ba20c 2024-07-06 benni ${TOP}/rootfs/mcu/bin/ls: ${STAMPS}/mcu-build
378 d59ba20c 2024-07-06 benni (cd ${TOOLS}/build/mcu && ${MAKE} DESTDIR=${TOP}/rootfs install)
379 d59ba20c 2024-07-06 benni
380 d59ba20c 2024-07-06 benni mcu: ${TOP}/rootfs/mcu/bin/ls
381 2e0e3a8c 2024-07-06 benni
382 2e0e3a8c 2024-07-06 benni # GFORTH
383 2e0e3a8c 2024-07-06 benni
384 2e0e3a8c 2024-07-06 benni ${STAMPS}/gforth-fix: ${STAMPS}/gforth
385 2e0e3a8c 2024-07-06 benni (cd ${TOOLS}/build/gforth && sed '/^CHECKFLAGS=.*$$/d' configure > configure.new && chmod +x configure.new)
386 2e0e3a8c 2024-07-06 benni touch $@
387 2e0e3a8c 2024-07-06 benni
388 1be22c89 2024-07-23 benni ${STAMPS}/gforth-configure: ${STAMPS}/gforth-fix ${STAMPS}/libgcc-install
389 2e0e3a8c 2024-07-06 benni cd ${TOOLS}/build/gforth && \
390 2e0e3a8c 2024-07-06 benni CC=${PREFIX}/bin/${TARGET}-gcc CFLAGS="-O2" ./configure.new \
391 2e0e3a8c 2024-07-06 benni --prefix=/ \
392 2e0e3a8c 2024-07-06 benni --with-arch=riscv \
393 2e0e3a8c 2024-07-06 benni --without-check \
394 2e0e3a8c 2024-07-06 benni --host=${TARGET} \
395 2e0e3a8c 2024-07-06 benni --enable-static \
396 2e0e3a8c 2024-07-06 benni --disable-shared \
397 2e0e3a8c 2024-07-06 benni --disable-version \
398 2e0e3a8c 2024-07-06 benni --disable-lib \
399 2e0e3a8c 2024-07-06 benni --without-pic \
400 2e0e3a8c 2024-07-06 benni ac_cv_sizeof_void_p=8 \
401 2e0e3a8c 2024-07-06 benni ac_cv_sizeof_char_p=8 \
402 2e0e3a8c 2024-07-06 benni ac_cv_sizeof_char=1 \
403 2e0e3a8c 2024-07-06 benni ac_cv_sizeof_short=2 \
404 2e0e3a8c 2024-07-06 benni ac_cv_sizeof_int=4 \
405 2e0e3a8c 2024-07-06 benni ac_cv_sizeof_long=8 \
406 2e0e3a8c 2024-07-06 benni ac_cv_sizeof_long_long=8 \
407 2e0e3a8c 2024-07-06 benni ac_cv_sizeof_intptr_t=8 \
408 2e0e3a8c 2024-07-06 benni ac_cv_sizeof___int128_t=16 \
409 2e0e3a8c 2024-07-06 benni ac_cv_sizeof___uint128_t=16 \
410 2e0e3a8c 2024-07-06 benni ac_cv_sizeof_off_t=8 \
411 2e0e3a8c 2024-07-06 benni ac_cv_c_bigendian=no \
412 2e0e3a8c 2024-07-06 benni ac_cv_func_memcmp_working=yes \
413 2e0e3a8c 2024-07-06 benni ac_cv_func_memmove=yes \
414 2e0e3a8c 2024-07-06 benni ac_cv_func_getpagesize=yes \
415 2e0e3a8c 2024-07-06 benni ac_cv_func_wcwidth=yes \
416 2e0e3a8c 2024-07-06 benni ac_cv_func_mcheck=no \
417 2e0e3a8c 2024-07-06 benni ac_cv_func_dlopen=no \
418 2e0e3a8c 2024-07-06 benni ac_cv_export_dynamic=no
419 2e0e3a8c 2024-07-06 benni (cd ${TOOLS}/build/gforth && \
420 2e0e3a8c 2024-07-06 benni sed 's@\(DITCENGINE\) = \(.*$$\)@\1 = ${TOP}/linurv \2@' Makefile > Makefile.new && \
421 2e0e3a8c 2024-07-06 benni mv Makefile.new Makefile)
422 2e0e3a8c 2024-07-06 benni touch $@
423 2e0e3a8c 2024-07-06 benni
424 2e0e3a8c 2024-07-06 benni ${STAMPS}/gforth-build: ${STAMPS}/gforth-configure
425 2e0e3a8c 2024-07-06 benni (cd ${TOOLS}/build/gforth && ${GMAKE})
426 2e0e3a8c 2024-07-06 benni touch $@
427 2e0e3a8c 2024-07-06 benni
428 2e0e3a8c 2024-07-06 benni ${TOP}/rootfs/bin/gforth: ${STAMPS}/gforth-build
429 2e0e3a8c 2024-07-06 benni (cd ${TOOLS}/build/gforth && ${GMAKE} DESTDIR=${TOP}/rootfs install)
430 2e0e3a8c 2024-07-06 benni touch $@
431 2e0e3a8c 2024-07-06 benni
432 2e0e3a8c 2024-07-06 benni clean-gforth:
433 2e0e3a8c 2024-07-06 benni rm -f ${STAMPS}/gforth*
434 2e0e3a8c 2024-07-06 benni rm -rf build/gforth
435 2e0e3a8c 2024-07-06 benni
436 2e0e3a8c 2024-07-06 benni gforth: ${TOP}/rootfs/bin/gforth
437 1e8e3702 2024-07-23 benni
438 1e8e3702 2024-07-23 benni # BUSYBOX
439 1e8e3702 2024-07-23 benni
440 1e8e3702 2024-07-23 benni ${STAMPS}/busybox-config: ${STAMPS}/busybox ${STAMPS}/libgcc-install
441 1e8e3702 2024-07-23 benni (cd ${TOOLS}/build/busybox \
442 1e8e3702 2024-07-23 benni && ${GMAKE} ${BBFLAGS} defconfig \
443 1e8e3702 2024-07-23 benni && mv .config .config.old \
444 1e8e3702 2024-07-23 benni && sed -e 's/^# CONFIG_DEBUG is not set/CONFIG_DEBUG=y/' \
445 1e8e3702 2024-07-23 benni -e 's/^# CONFIG_DEBUG_PESSIMIZE is not set/CONFIG_DEBUG_PESSIMIZE=y/' \
446 1e8e3702 2024-07-23 benni -e 's/^CONFIG_NO_DEBUG_LIB=y/# CONFIG_NO_DEBUG_LIB is not set/' \
447 1e8e3702 2024-07-23 benni < .config.old > .config)
448 1e8e3702 2024-07-23 benni touch $@
449 1e8e3702 2024-07-23 benni
450 1e8e3702 2024-07-23 benni ${STAMPS}/busybox-build: ${STAMPS}/busybox-config
451 1e8e3702 2024-07-23 benni (cd ${TOOLS}/build/busybox && ${GMAKE} ${BBFLAGS})
452 1e8e3702 2024-07-23 benni touch $@
453 1e8e3702 2024-07-23 benni
454 1e8e3702 2024-07-23 benni ${TOP}/rootfs/bb/bin/busybox: ${STAMPS}/busybox-build
455 1e8e3702 2024-07-23 benni (cd ${TOOLS}/build/busybox && ${GMAKE} ${BBFLAGS} install)
456 1e8e3702 2024-07-23 benni
457 1e8e3702 2024-07-23 benni busybox: ${TOP}/rootfs/bb/bin/busybox
458 1e8e3702 2024-07-23 benni
459 1e8e3702 2024-07-23 benni clean-busybox:
460 1e8e3702 2024-07-23 benni rm -f ${STAMPS}/busybox*
461 1e8e3702 2024-07-23 benni rm -rf build/busybox