summaryrefslogtreecommitdiff
path: root/docs/DIETCC.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/DIETCC.txt')
-rw-r--r--docs/DIETCC.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/DIETCC.txt b/docs/DIETCC.txt
new file mode 100644
index 0000000..2b3762f
--- /dev/null
+++ b/docs/DIETCC.txt
@@ -0,0 +1,19 @@
+The basic idea is to replace
+
+ gcc ... file.c ...
+
+with
+
+ gcc -E ... file.c ... -o preproc.c
+ dietc preproc.c > diet.c
+ pass1 diet.c > diet.c
+ pass2 diet.c > diet.c
+ ...
+ gcc ... diet.c ...
+
+To assist with this, we provide `scripts/dietcc`, which provides a drop-in
+replacement for `gcc` that can run your patches. In your build scripts, simply
+replace `gcc` with the path of `dietcc`.
+
+You can insert your own compilation pass into dietcc; read its Python source
+for examples.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback