cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit 6f565ecfc1a223b206ac1e7365b822fc340a4fbd
parent 8b425349642dcebefa26541930235a302a51e657
Author: Michael Forney <mforney@mforney.org>
Date:   Fri,  5 Jul 2019 23:45:15 -0700

Rename to cproc

Fixes #4

Diffstat:
M.builds/alpine-aarch64.yml | 4++--
M.builds/alpine.yml | 4++--
M.builds/debian-aarch64.yml | 6+++---
M.builds/debian.yml | 4++--
M.builds/freebsd.yml | 4++--
M.builds/nixos.yml | 4++--
M.builds/openbsd.yml | 6+++---
MMakefile | 18+++++++++---------
MREADME.md | 10+++++-----
Mdoc/software.md | 2+-
Mdriver.c | 4++--
Mmain.c | 2+-
Mruntests | 2+-
13 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/.builds/alpine-aarch64.yml b/.builds/alpine-aarch64.yml @@ -3,7 +3,7 @@ packages: - qemu-aarch64 - qemu-openrc sources: -- https://git.sr.ht/~mcf/cc +- https://git.sr.ht/~mcf/cproc - https://git.sr.ht/~mcf/qbe environment: PATH: $HOME/qbe/obj:$HOME/aarch64-linux-musl-cross/bin:$PATH @@ -26,4 +26,4 @@ tasks: --target=aarch64-linux-musl \ --with-ldso="$HOME/aarch64-linux-musl-cross/aarch64-linux-musl/lib/libc.so" make all check bootstrap - file stage2/cc stage2/cc-qbe + file stage2/cproc stage2/cproc-qbe diff --git a/.builds/alpine.yml b/.builds/alpine.yml @@ -1,12 +1,12 @@ image: alpine/edge sources: -- https://git.sr.ht/~mcf/cc +- https://git.sr.ht/~mcf/cproc - git://c9x.me/qbe.git environment: PATH: $HOME/qbe/obj:$PATH tasks: - build: | make -C qbe - cd cc + cd cproc ./configure make all check bootstrap diff --git a/.builds/debian-aarch64.yml b/.builds/debian-aarch64.yml @@ -3,7 +3,7 @@ packages: - gcc-aarch64-linux-gnu - qemu-user sources: -- https://git.sr.ht/~mcf/cc +- https://git.sr.ht/~mcf/cproc - https://git.sr.ht/~mcf/qbe environment: PATH: $HOME/qbe/obj:$PATH @@ -15,11 +15,11 @@ tasks: #define Deftgt T_arm64 EOF make - cd ../cc + cd ../cproc ./configure \ --target=aarch64-linux-gnu \ --with-ldso=/usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 \ --with-gcc-libdir=/usr/lib/gcc-cross/aarch64-linux-gnu/8 make all check make bootstrap LDFLAGS='-Wl,-rpath,/usr/aarch64-linux-gnu/lib' - file stage2/cc stage2/cc-qbe + file stage2/cproc stage2/cproc-qbe diff --git a/.builds/debian.yml b/.builds/debian.yml @@ -1,12 +1,12 @@ image: debian/stretch sources: -- https://git.sr.ht/~mcf/cc +- https://git.sr.ht/~mcf/cproc - git://c9x.me/qbe.git environment: PATH: $HOME/qbe/obj:$PATH tasks: - build: | make -C qbe - cd cc + cd cproc ./configure make all check bootstrap diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml @@ -1,6 +1,6 @@ image: freebsd/latest sources: -- https://git.sr.ht/~mcf/cc +- https://git.sr.ht/~mcf/cproc - git://c9x.me/qbe.git packages: - gmake @@ -9,6 +9,6 @@ environment: tasks: - build: | gmake -C qbe - cd cc + cd cproc ./configure make all check bootstrap diff --git a/.builds/nixos.yml b/.builds/nixos.yml @@ -1,6 +1,6 @@ image: nixos/latest sources: -- https://git.sr.ht/~mcf/cc +- https://git.sr.ht/~mcf/cproc - git://c9x.me/qbe.git repositories: nixpkgs: https://nixos.org/channels/nixpkgs-unstable @@ -12,6 +12,6 @@ environment: tasks: - build: | make -C qbe - cd cc + cd cproc ./configure --with-ldso= make all check bootstrap diff --git a/.builds/openbsd.yml b/.builds/openbsd.yml @@ -1,6 +1,6 @@ image: openbsd/latest sources: -- https://git.sr.ht/~mcf/cc +- https://git.sr.ht/~mcf/cproc - git://c9x.me/qbe.git packages: - gmake @@ -9,9 +9,9 @@ environment: tasks: - setup: | # avoid __asm__ on non __GNUC__ compilers - doas patch -d /usr/include/amd64 < cc/.builds/openbsd.diff + doas patch -d /usr/include/amd64 < cproc/.builds/openbsd.diff - build: | gmake -C qbe - cd cc + cd cproc ./configure make all check bootstrap diff --git a/Makefile b/Makefile @@ -6,7 +6,7 @@ objdir=. -include config.mk .PHONY: all -all: $(objdir)/cc $(objdir)/cc-qbe +all: $(objdir)/cproc $(objdir)/cproc-qbe DRIVER_SRC=\ driver.c\ @@ -16,7 +16,7 @@ DRIVER_OBJ=$(DRIVER_SRC:%.c=$(objdir)/%.o) config.h: ./configure -$(objdir)/cc: $(DRIVER_OBJ) +$(objdir)/cproc: $(DRIVER_OBJ) $(CC) $(LDFLAGS) -o $@ $(DRIVER_OBJ) SRC=\ @@ -39,7 +39,7 @@ SRC=\ $(BACKEND).c OBJ=$(SRC:%.c=$(objdir)/%.o) -$(objdir)/cc-qbe: $(OBJ) +$(objdir)/cproc-qbe: $(OBJ) $(CC) $(LDFLAGS) -o $@ $(OBJ) $(objdir)/decl.o : decl.c util.h cc.h $(stagedeps) ; $(CC) $(CFLAGS) -c -o $@ decl.c @@ -68,21 +68,21 @@ $(objdir)/util.o : util.c util.h $(stagedeps) ; $(CC) $(CFLAGS) .PHONY: stage2 stage2: all @mkdir -p $@ - $(MAKE) objdir=$@ stagedeps='cc cc-qbe' CC=$(objdir)/cc LDFLAGS='$(LDFLAGS) -s' + $(MAKE) objdir=$@ stagedeps='cproc cproc-qbe' CC=$(objdir)/cproc LDFLAGS='$(LDFLAGS) -s' .PHONY: stage3 stage3: stage2 @mkdir -p $@ - $(MAKE) objdir=$@ stagedeps='stage2/cc stage2/cc-qbe' CC=$(objdir)/stage2/cc LDFLAGS='$(LDFLAGS) -s' + $(MAKE) objdir=$@ stagedeps='stage2/cproc stage2/cproc-qbe' CC=$(objdir)/stage2/cproc LDFLAGS='$(LDFLAGS) -s' .PHONY: bootstrap bootstrap: stage2 stage3 - cmp stage2/cc stage3/cc - cmp stage2/cc-qbe stage3/cc-qbe + cmp stage2/cproc stage3/cproc + cmp stage2/cproc-qbe stage3/cproc-qbe .PHONY: check check: all - @CCQBE=./cc-qbe ./runtests + @CCQBE=./cproc-qbe ./runtests .PHONY: qbe qbe: @@ -91,4 +91,4 @@ qbe: .PHONY: clean clean: - rm -rf cc $(DRIVER_OBJ) cc-qbe $(OBJ) stage2 stage3 + rm -rf cproc $(DRIVER_OBJ) cproc-qbe $(OBJ) stage2 stage3 diff --git a/README.md b/README.md @@ -1,9 +1,9 @@ (mirrored on [GitHub][GitHub mirror]) -[![builds.sr.ht status](https://builds.sr.ht/~mcf/cc.svg)](https://builds.sr.ht/~mcf/cc) +[![builds.sr.ht status](https://builds.sr.ht/~mcf/cproc.svg)](https://builds.sr.ht/~mcf/cproc) -This is a [C11] compiler using [QBE] as a backend. It is released under -the [ISC] license. +`cproc` is a [C11] compiler using [QBE] as a backend. It is released +under the [ISC] license. Several GNU C [extensions] are also implemented. @@ -110,7 +110,7 @@ be created, which will then become the preferred form of contribution. [QBE]: https://c9x.me/compile/ [C11]: http://port70.net/~nsz/c/c11/n1570.html -[ISC]: https://git.sr.ht/~mcf/cc/blob/master/LICENSE +[ISC]: https://git.sr.ht/~mcf/cproc/blob/master/LICENSE [extensions]: https://man.sr.ht/~mcf/cc/doc/extensions.md [building software]: https://man.sr.ht/~mcf/cc/doc/software.md [8cc]: https://github.com/rui314/8cc @@ -127,4 +127,4 @@ be created, which will then become the preferred form of contribution. [#7]: https://todo.sr.ht/~mcf/cc-issues/7 [#35]: https://todo.sr.ht/~mcf/cc-issues/35 [#44]: https://todo.sr.ht/~mcf/cc-issues/44 -[GitHub mirror]: https://github.com/michaelforney/cc +[GitHub mirror]: https://github.com/michaelforney/cproc diff --git a/doc/software.md b/doc/software.md @@ -90,7 +90,7 @@ index 5f0923fc..10dd7d7f 100644 Build with - make CC=/path/to/cc CFLAGS='-DZDICT_DISABLE_DEPRECATE_WARNINGS -DZBUFF_DISABLE_DEPRECATE_WARNINGS' zstd + make CC=cproc CFLAGS='-DZDICT_DISABLE_DEPRECATE_WARNINGS -DZBUFF_DISABLE_DEPRECATE_WARNINGS' zstd ## st diff --git a/driver.c b/driver.c @@ -216,7 +216,7 @@ buildobj(struct input *input, char *output, enum phaseid last) return; if (last == LINK) { last = ASSEMBLE; - output = strdup("/tmp/cc-XXXXXX"); + output = strdup("/tmp/cproc-XXXXXX"); if (!output) fatal("strdup:"); fd = mkstemp(output); @@ -380,7 +380,7 @@ main(int argc, char *argv[]) arrayaddptr(&phases[CODEGEN].cmd, "-t"); arrayaddptr(&phases[CODEGEN].cmd, qbearch); - argv0 = progname(argv[0], "cc"); + argv0 = progname(argv[0], "cproc"); for (;;) { ++argv, --argc; arg = *argv; diff --git a/main.c b/main.c @@ -20,7 +20,7 @@ main(int argc, char *argv[]) bool pponly = false; char *output = NULL, *target = NULL; - argv0 = progname(argv[0], "cc-qbe"); + argv0 = progname(argv[0], "cproc-qbe"); ARGBEGIN { case 'E': pponly = true; diff --git a/runtests b/runtests @@ -8,7 +8,7 @@ exitstatus=0 out=$(mktemp) trap 'rm "$out"' EXIT for test ; do - if ${CCQBE:=./cc-qbe} -o $out $test && diff -Nu "${test%.c}.qbe" "$out" ; then + if ${CCQBE:=./cproc-qbe} -o $out $test && diff -Nu "${test%.c}.qbe" "$out" ; then result="PASS" else result="FAIL"