Move diffutils after musl.

This commit is contained in:
Andrius Štikonas 2021-02-06 00:16:32 +00:00
parent 209c60e092
commit e20ce6fdca
7 changed files with 73 additions and 86 deletions

View file

@ -89,53 +89,47 @@ cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# Part 11: diffutils
pkg="diffutils-2.7"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# Part 12: patch
# Part 11: patch
pkg="patch-2.5.9"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# Part 13: mes-libc-patched
# Part 12: mes-libc-patched
cd tcc-0.9.27
kaem --file mes-libc-patched.kaem
cd ..
# Part 14: tcc-patched
# Part 13: tcc-patched
cd tcc-0.9.27
kaem --file tcc-patched.kaem
cd ..
# Part 15: make
# Part 14: make
pkg="make-3.80"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# Part 16: bzip2
# Part 15: bzip2
pkg="bzip2-1.0.8"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# Part 17: coreutils
# Part 16: coreutils
pkg="coreutils-5.0"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# Part 18: heirloom-devtools
# Part 17: heirloom-devtools
pkg="heirloom-devtools-070527"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# Part 19: bash
# Part 18: bash
pkg="bash-2.05b"
cd ${pkg}
kaem --file ${pkg}.kaem

View file

@ -1,44 +0,0 @@
#!/bin/sh
set -ex
cd build
# Extract
gunzip ../src/${pkg}.tar.gz
tar xf ../src/${pkg}.tar
cd ${pkg}
# Touch config.h file
catm config.h
# Compile
tcc -c -I. -DNULL_DEVICE=\"/dev/null\" cmp.c
tcc -c -I. cmpbuf.c
tcc -c -I. error.c
tcc -c -I. getopt.c
tcc -c -I. getopt1.c
tcc -c -I. xmalloc.c
tcc -c -I. version.c
tcc -c -I. diff.c
tcc -c -I. analyze.c
tcc -c -I. -DHAVE_DIRENT_H dir.c
tcc -c -I. io.c
tcc -c -I. -DHAVE_DUP2 -DHAVE_FORK=0 util.c
tcc -c -I. context.c
tcc -c -I. ed.c
tcc -c -I. ifdef.c
tcc -c -I. normal.c
tcc -c -I. side.c
tcc -c -I. fnmatch.c
tcc -c -I. regex.c
# Link
tcc -static -o ${bindir}/cmp cmp.o cmpbuf.o error.o getopt.o getopt1.o xmalloc.o version.o
tcc -static -o ${bindir}/diff diff.o analyze.o cmpbuf.o dir.o io.o util.o context.o ed.o ifdef.o normal.o side.o fnmatch.o getopt.o getopt1.o regex.o version.o
# Test
cmp --version
diff --version
cd ../..

View file

@ -0,0 +1,5 @@
src_prepare() {
default_src_prepare
touch config.h
}

View file

@ -0,0 +1,29 @@
CC = tcc
CFLAGS = -I . \
-DNULL_DEVICE=\"/dev/null\" \
-DHAVE_STRERROR=1 \
-DREGEX_MALLOC=1 \
-DHAVE_DIRENT_H \
-DHAVE_DUP2=1 \
-DHAVE_FORK=1
.PHONY: all
CMP_SRC = cmp cmpbuf error getopt getopt1 xmalloc version
CMP_OBJECTS = $(addsuffix .o, $(CMP_SRC))
DIFF_SRC = diff alloca analyze cmpbuf dir io util context ed ifdef normal side fnmatch getopt getopt1 regex version
DIFF_OBJECTS = $(addsuffix .o, $(DIFF_SRC))
all: cmp diff
cmp: $(CMP_OBJECTS)
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
diff: $(DIFF_OBJECTS)
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
install: all
install cmp $(PREFIX)/bin
install diff $(PREFIX)/bin

View file

@ -9,22 +9,25 @@ set -e
export PREFIX=/after
# Part 20
# Part 19
build m4-1.4.4
# Part 21
# Part 20
build flex-2.5.11
# Part 22
# Part 21
build musl-1.1.24
# Part 23
# Part 22
build tcc-0.9.27 tcc-musl.sh
# Part 24
# Part 23
build flex-2.6.4
# Part 25
# Part 24
build grep-2.4
# Part 25
build diffutils-2.7
echo "Bootstrapping completed."