New Zealand




Last active 5 days ago

#30 Add tests that must execute a month ago

Comment by ~ach on ~mcf/cproc

Just to prune, I think running real world programs (like gcc bootstrap) is a better test.


#6 Implement the preprocessor 3 months ago

Comment by ~ach on ~mcf/cproc

I think the chibicc preprocessor is another good one: https://github.com/rui314/chibicc/blob/main/preprocess.c

It is very small and handles a lot of real programs.

#10 Build oasis core 2 years ago

Comment by ~ach on ~mcf/cproc

fantastic work.

#219 period '.' in github pull request title causes build failure 2 years ago

Ticket created by ~ach on ~sircmpwn/builds.sr.ht

see the build log https://builds.sr.ht/~ach/job/62505

/home/build/.buildenv: line 10: export: `macos.': not a valid identifier

#41 Build gcc 4.7.4 2 years ago

Comment by ~ach on ~mcf/cproc

amazing :D. I wonder how far away you are from building an openbsd kernel :P

#61 Support macOS 2 years ago

Comment by ~ach on ~mcf/cproc

Let me know if you find a good CI system for macos. I know zig uses azure pipelines, but I really don't want to set that up ><.

Not even sure if sr.ht will ever support mac.

#27 Improve config.h 2 years ago

Comment by ~ach on ~mcf/cproc

Those solutions would work - I should perhaps make a bug report to nixos for the wrapper script.

I just did some testing and I can get the unwrapped nixos binutils and the proper dynamic linker path from:

[ac@black:~/src/cc]$ cat $(dirname $(realpath $(which ld)))/../nix-support/orig-bintools

[ac@black:~/src/cc]$ cat $(dirname $(realpath $(which ld)))/../nix-support/dynamic-linker

Probably not necessary for the configure script to be aware of this crap.

#27 Improve config.h 2 years ago

Comment by ~ach on ~mcf/cproc

I still have two problems with this, on nixos the dynamic linker is not installed at /lib64/ld-linux-x86-64.so.2 , So i need to either detect this, or pass it in somehow.

The related second problem is on nixos, gcc is actually a wrapper script that already specifies --dynamic-linker on it's own, so I get warnings about this flag being passed more than once.

Nixos is a bit of an oddity, so maybe it could have it it's own section in the configure script, however it is not visible from -dumpmachine , as it just appears as x86_64-unknown-linux-gnu.

I know it is a bit of a pain, but I only use nixos, which is why I care about this.

#54 Bundled qbe 2 years ago

Ticket created by ~ach on ~mcf/cproc

I wonder if it would be helpful to have a script that fetches the correct qbe version and stashes it in a local dir.

I can see an argument for not doing this too, so I'm not sure what is best.

For example, gcc has a script in contrib/ that can download gmp and some other things.

#51 Bit-field sign extension in assignment expression result 2 years ago

Ticket created by ~ach on ~mcf/cproc

void printf();
struct {
  signed a : 6;
} b;
int c;
unsigned char d;
char e;
int main() {
  e = -1;
  d = e;
  c = b.a = d;
  printf("%d\n", c);

--- output.expected     2019-04-25 09:55:31.819073470 +0000
+++ output.actual       2019-04-25 09:55:31.904073452 +0000
@@ -1 +1 @@