From bdefdc936a6c2be8f6c814c82ef9b36a432051e4 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Fri, 26 Apr 2019 00:36:06 -0700 Subject: Replace config.def.h with a configure script --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 693d13f..0e87989 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,20 @@ one is currently required as well. ## Building -You will need to create a `config.h` appropriate for the target system. If -missing, a default version will be created from `config.def.h`, -which should work for most glibc systems, or musl systems with -`-D 'DYNAMICLINKER="/lib/ld-musl-x86_64.so.1"'`. +Run `./configure` to create a `config.h` and `config.mk` appropriate for +your system. If your system is not supported by the configure script, +you can create these files manually. `config.h` should define several +string arrays (`static char *[]`): + +- **`startfiles`**: Objects to pass to the linker at the beginning of + the link command. +- **`endfiles`**: Objects to pass to the linker at the end of the link + command (including libc). +- **`preprocesscmd`**: The preprocessor command, and any necessary flags + for the target system. +- **`codegencmd`**: The QBE command, and possibly explicit target flags. +- **`assemblecmd`**: The assembler command. +- **`linkcmd`**: The linker command. You may also want to customize your environment or `config.mk` with the appropriate `CC`, `CFLAGS` and `LDFLAGS`. -- cgit v1.2.3