Commit graph

37 commits

Author SHA1 Message Date
Justine Tunney
d230a01222 Make build hermetic without shell scripts
- Fix some minor issues in ar.com
- Have execve() look for `ape` command
- Rewrite NT paths using /c/ rather /??/c:/
- Replace broken GCC symlinks with .sym files
- Rewrite $PATH environment variables on startup
- Make $(APE_NO_MODIFY_SELF) the default bootloader
- Add all build command dependencies to build/bootstrap
- Get the repository mostly building from source on non-Linux
2022-05-25 13:55:57 -07:00
Justine Tunney
d44ff6ce1f Make improvements
- Implement openpty()
- Add `--assimilate` flag to APE bootloader
- Restore Linux vDSO clock_gettime() support
- Use `$(APE_NO_MODIFY_SELF)` on more programs
2022-05-24 10:58:48 -07:00
Justine Tunney
f1dfa4bdfa Add some more builtins to chibicc
https://justine.lol/cosmopolitan/documentation.html should now contain a
lot of functions that had been missing previously due to not having them
2022-04-17 13:07:07 -07:00
Justine Tunney
43ba3009b2 Make another minor readme change 2022-04-06 13:07:51 -07:00
Justine Tunney
837ff6cb49 Update readme to recommend nightlies 2022-04-06 12:55:14 -07:00
Justine Tunney
226aaf3547 Improve memory safety
This commit makes numerous refinements to cosmopolitan memory handling.

The default stack size has been reduced from 2mb to 128kb. A new macro
is now provided so you can easily reconfigure the stack size to be any
value you want. Work around the breaking change by adding to your main:

    STATIC_STACK_SIZE(0x00200000);  // 2mb stack

If you're not sure how much stack you need, then you can use:

    STATIC_YOINK("stack_usage_logging");

After which you can `sort -nr o/$MODE/stack.log`. Based on the unit test
suite, nothing in the Cosmopolitan repository (except for Python) needs
a stack size greater than 30kb. There are also new macros for detecting
the size and address of the stack at runtime, e.g. GetStackAddr(). We
also now support sigaltstack() so if you want to see nice looking crash
reports whenever a stack overflow happens, you can put this in main():

    ShowCrashReports();

Under `make MODE=dbg` and `make MODE=asan` the unit testing framework
will now automatically print backtraces of memory allocations when
things like memory leaks happen. Bugs are now fixed in ASAN global
variable overrun detection. The memtrack and asan runtimes also handle
edge cases now. The new tools helped to identify a few memory leaks,
which are fixed by this change.

This change should fix an issue reported in #288 with ARG_MAX limits.
Fixing this doubled the performance of MKDEPS.COM and AR.COM yet again.
2021-10-13 17:27:13 -07:00
Justine Tunney
7cbc2bc083 Cosmopolitan 1.0 2021-05-16 20:35:10 -07:00
Justine Tunney
1a3d22b2fd Improve LLVM compatibility a little bit 2021-05-16 20:34:46 -07:00
Dan Tocchini IV
4577f7fe11
Add MacOS toolchain instructions (#163) 2021-05-07 07:52:32 -07:00
Justine Tunney
1f2288be6e Improve backwards compatibility with GNU Make 2021-05-02 07:48:59 -07:00
Justine Tunney
7abca1531f Cosmopolitan 0.3 2021-03-29 03:20:03 -07:00
Justine Tunney
5141d00992 Perform some minor code cleanup 2021-03-04 13:22:32 -08:00
Justine Tunney
b9f73e6a4d Clarify APE self-modifying behavior in README
See #102
2021-03-04 07:54:41 -08:00
Justine Tunney
43b2475aaa Handle more pow cases (#61) 2021-03-04 06:14:07 -08:00
Justine Tunney
3573814e45 Change release process to use default mode
See #101
2021-03-03 13:47:22 -08:00
Justine Tunney
3c24c12068 Document support vector
Fixes #87
2021-02-28 16:41:53 -08:00
Jay Petacat
02b4a5c824 Fix zip file name in "Getting Started" example 2021-02-19 13:39:06 -08:00
Justine Tunney
08d3700c15 Fix getting started example for Z-shell (#44)
Apropos zsh, our patch has now been upstreamed! See:
https://github.com/zsh-users/zsh/commit/326d9c203b39
2021-02-18 16:32:31 -08:00
Justine Tunney
ec69413f83 Cosmopolitan 0.2 2021-02-09 20:36:07 -08:00
Justine Tunney
e75ffde09e Get codebase completely working with LLVM
You can now build Cosmopolitan with Clang:

    make -j8 MODE=llvm
    o/llvm/examples/hello.com

The assembler and linker code is now friendly to LLVM too.
So it's not needed to configure Clang to use binutils under
the hood. If you love LLVM then you can now use pure LLVM.
2021-02-09 02:57:32 -08:00
Justine Tunney
2f3bd90216 Apply some touchups 2021-02-07 07:02:46 -08:00
Justine Tunney
23ae9dfceb Add NetBSD support 2021-02-05 06:19:45 -08:00
Justine Tunney
c93a4661a3 Add Cosmopolitan Honeybadger to README.md 2021-02-04 03:31:03 -08:00
Justine Tunney
4072e40bb8 Cosmopolitan 0.1.2 2021-01-30 10:13:13 -08:00
Justine Tunney
36b4bf74f7 Cosmopolitan 0.1.1
This fixes a few bugs that slipped through the 0.1 release process.
2021-01-29 01:30:51 -08:00
Justine Tunney
7ce8ccb94f Cosmopolitan 0.1
All 196 tests passing on the following systems is confirmed:

  - Alpine Linux 5.4.43
  - Debian Linux 10 Buster 4.19.0
  - Red Hat Enterprise Linux 7 3.10.0
  - Red Hat Enterprise Linux 5 2.6.18
  - XNU 19.6.0
  - Windows 7
  - Windows 10
  - FreeBSD 12.1
  - OpenBSD 6.8

Proof:

  https://justine.lol/cosmopolitan/cosmopolitan-0.1.png

My name is Justine Tunney and I approve this release.
2021-01-28 16:19:10 -08:00
Justine Tunney
d7ac16a9ed Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
Justine Tunney
37a4c70c36 Change license 2020-12-27 17:18:44 -08:00
Justine Tunney
9fe95ef12b Add tool for viewing memory
https://justine.storage.googleapis.com/memzoom/index.html
2020-11-06 20:20:10 -08:00
Justine Tunney
fd22e55b42 Improve README introduction based on HN feedback
https://news.ycombinator.com/item?id=24644806
2020-09-30 15:41:36 -07:00
Justine Tunney
d51409ccd9 Add glob and some finer tuning of documentation 2020-06-21 15:23:35 -07:00
Justine Tunney
a2c2d14100 Add further clarity to example package 2020-06-18 16:23:41 -07:00
Justine Tunney
d2b20422c8 Add about section to readme 2020-06-16 16:58:35 -07:00
Justine Tunney
2e979c00c3 Polish up repository and other revisions 2020-06-16 06:38:43 -07:00
Justine Tunney
d23bb6612e Make it easy to create new packages 2020-06-15 22:09:03 -07:00
Justine Tunney
b4269930f7 Add scouts honor escape hatch for source embedding 2020-06-15 19:01:28 -07:00
Justine Tunney
c91b3c5006 Initial import 2020-06-15 07:18:57 -07:00