aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-04-26 00:36:06 -0700
committerMichael Forney <mforney@mforney.org>2019-04-26 18:24:19 -0700
commitbdefdc936a6c2be8f6c814c82ef9b36a432051e4 (patch)
tree65ab15fbab5c5d794ace7d91813362c56577aac7 /README.md
parentabc80f19c55ae45742cf7d2bc54c2c4a4dc8236c (diff)
Replace config.def.h with a configure script
Diffstat (limited to 'README.md')
-rw-r--r--README.md18
1 files changed, 14 insertions, 4 deletions
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`.