Updated Documentation to reflect new M2libc changes

This commit is contained in:
Jeremiah Orians 2021-01-21 18:37:59 -05:00
parent 818784228c
commit 5dd81d871e
No known key found for this signature in database
GPG Key ID: 6B3A3F198708F894
1 changed files with 29 additions and 18 deletions

View File

@ -20,29 +20,32 @@ to make a more powerful C compiler. (with a few extras for convience)
Those core primitives being: if (with continue), while (with
break), asm, structs (with -> support) gotos (with labels) and return.
With do and for loops, arrays and function pointers as nice extras
With do and for loops, arrays, function pointers and simple macro support
as nice extras
.br
The supported ARCHITECTURES are as follows: knight-native,
knight-posix, x86, amd64, armv7l, aarch64.
Unofficially all tested armv7l binaries have also worked on armv6l
hosts that have thus far been tested but no promise of compatibilty
until someone is willing to put in the work.
(with planned ports to z80 and 6502)
If you fail to specify an architecture, the default of knight-native
will be used.
The option --bootstrap-mode exists purely for testing C code for cc_*
compatibility
.br
As M2-Planet's libc is literally only a half-dozen lines of assembly
you will likely need to import libc primitives when building or
having previously built them seperately.
The minimal libc required to work with M2-Planet generated output is
literally only a half-dozen lines of assembly and to simplify use
M2libc (https://github.com/oriansj/M2libc.git) was created with the
goal of providing commonly desired C library functionality.
You can find examples for such primitives in:
test/common_x86/functions/
test/common_amd64/functions/
test/common_armv7l/functions/
test/common_aarch64/functions/
test/common_knight/functions/
with the default libc implementations and elf-headers in the
parent directories correspondingly.
with architecture specific elf-headers and functions in the
directories matching the architecture name.
.br
@ -60,12 +63,12 @@ with blood-elf generating dwarf stubs if additional debug info is
desired.
.br
# M1 -f test/common_x86/x86_defs.M1 -f test/common_x86/libc-core.M1 \
-f return.M1 --LittleEndian --architecture x86 -o return.hex2
# M1 -f M2libc/x86/x86_defs.M1 -f M2libc/x86/libc-full.M1 \
-f return.M1 --little-endian --architecture x86 -o return.hex2
# hex2 -f test/common_x86/ELF-i386.hex2 -f return.hex2 --LittleEndian \
--architecture x86 --BaseAddress 0x8048000 -o example --exec_enable
# hex2 -f M2libc/x86/ELF-x86.hex2 -f return.hex2 --little-endian \
--architecture x86 --base-address 0x8048000 -o example
.br
.SH COMPATIBILITY
@ -77,12 +80,20 @@ even the ones that try to be Turing complete -1
Jeremiah Orians <Jeremiah@pdp10.guru>
.br
Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
.br
deesix <deesix@tuta.io>
.br
Sanne Wouda <sanne.wouda@gmail.com>
.SH COPYRIGHT
Copyright 2016-2019 Jeremiah Orians <Jeremiah@pdp10.guru>
Copyright 2016-2021 Jeremiah Orians <Jeremiah@pdp10.guru>
.br
Copyright 2017 Jan Nieuwenhuizen <janneke@gnu.org>
.br
Copyright 2020-2021 deesix <deesix@tuta.io>
.br
Copyright 2020-2021 Sanne Wouda <sanne.wouda@gmail.com>
.br
License GPLv3+.
.SH "SEE ALSO"