cproc.sh (671B)
- #!/bin/sh
- set -ex
- die() {
- echo "die: $@"
- exit 1
- }
- tar xof /distfiles/cproc-*.tar.gz
- cd cproc-*/
- ./configure \
- --prefix=/usr \
- --with-cpp=@TCC_CPP@ \
- --with-as=@TCCAS@ \
- --with-ld=@TCCLD@
- # strip out manual musl linking in startfiles / endfiles
- # setup assemblecmd / linkcmd against tcc
- ed config.h <<'EOF'
- /startfiles
- s;{.*};{};p
- /endfiles
- s;{.*};{};p
- /@TCC_CPP@
- c
- "tcc",
- "-E",
- .
- /assemblecmd
- s;{.*};{"tcc", "-c", "-xa", "-"};p
- /linkcmd
- s;{.*};{"tcc", "-xb"};p
- w
- q
- EOF
- # tcc -Os -Wall -Wextra -c -o driver.c
- # tcc: error: no input files
- ed Makefile <<'EOF'
- g/$(stagedeps) ;/s/;/#;/
- w
- q
- EOF
- pdpmake CC=$CC
- pdpmake PREFIX=/usr install
- cd ..
- rm -fr cproc-*/