summaryrefslogtreecommitdiffstats
path: root/development/cosmocc/README
blob: a8557c1f29f3458ec679c16a29ff990d9681e607 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cosmocc is a precompiled version of GCC that produces polyglot
executables for the x86_64 / aarch64 architecture using the
Cosmopolitan libc.

Cosmopolitan Libc makes C a build-once run-anywhere language, like Java,
except it doesn't need an interpreter or virtual machine. Instead, it
reconfigures stock GCC and Clang to output a POSIX-approved polyglot
format that runs natively on many operating systems with the best
possible performance and a tiny footprint.

======= Support Vector =======
Platform | Min Version | Circa
==============================
AMD      | K8 Venus    |  2005
Intel    | Core        |  2006
Linux    | 2.6.18      |  2007
Windows  | 8           |  2012
Mac OS X | 15.6        |  2018
OpenBSD  | 7           |  2021
FreeBSD  | 13          |  2020
NetBSD   | 9.2         |  2021
==============================

NOTES:
* on calling APE programs:
  upto zsh version 5.9, it's required to call APE programs
  this way:
     sh -c ./APE-program
  The same case is for Python's subprocess, old versions of fish, etc.
* on reproducible builds:
  The cosmocc compiler is designed to generate deterministic output
  across platforms. Please note that users who need reproducible
  builds may also want to look into explicitly defining environment
  variables like `LC_ALL=C` and `SOURCE_DATE_EPOCH=0`, in addition to
  undefining macros such as `-U__DATE__` and `-U__TIME__`.
* on (un)registering APE with binfmt_misc:
  two simple scripts are included in case you want to register or
  unregister the APE loader with the binfmt_misc kernel facility.
  You may find them in the /opt/cosmocc/scripts/ directory.