cosmopolitan/tool/build
Justine Tunney 4778cd4d27
Fix bugs in termios library and cleanup code
This change fixes an issue with the tcflow() magic numbers that was
causing bash to freeze up on Linux. While auditing termios polyfills,
several other issues were identified with XNU/BSD compatibility.

Out of an abundance of caution this change undefines as much surface
area from libc/calls/struct/termios.h as possible, so that autoconf
scripts are less likely to detect non-POSIX teletypewriter APIs that
haven't been polyfilled by Cosmopolitan.

This is a *breaking change* for your static archives in /opt/cosmos if
you use the cosmocc toolchain. That's because this change disables the
ioctl() undiamonding trick for code outside the monorepo, specifically
because it'll lead to brittle ABI breakages like this. If you're using
the cosmocc toolchain, you'll need to rebuild libraries like ncurses,
readline, etc. Yes diamonds cause bloat. To work around that, consider
using tcgetwinsize() instead of ioctl(TIOCGWINSZ) since it'll help you
avoid pulling every single ioctl-related polyfill into the linkage.

The cosmocc script was specifying -DNDEBUG for some reason. It's fixed.
2023-06-14 19:30:52 -07:00
..
dso Fix bugs in cosmocc toolchain 2023-06-08 23:44:03 -07:00
lib Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
ar.c Run clang-format on most sources 2023-04-27 05:44:32 -07:00
assimilate.c Rewrite .zip.o file linker 2023-06-10 09:29:44 -07:00
bigmul.c Run clang-format on most sources 2023-04-27 05:44:32 -07:00
build.mk Remove blinkenlights 2023-06-14 19:30:52 -07:00
calculator.c Create ELF aliases for identical symbols 2023-06-06 03:33:49 -07:00
calculator.ctest Add cpu / mem / fsz limits to build system 2021-08-13 23:40:53 -07:00
calculator.inc Get aarch64 hello world working 2023-05-10 04:20:47 -07:00
chmod.c Disable linker map generation and improve tinyness 2023-06-09 03:29:26 -07:00
cocmd.c Add glob to cocmd (#740) 2023-02-21 10:31:04 -08:00
compile.c Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
cp.c Disable linker map generation and improve tinyness 2023-06-09 03:29:26 -07:00
dd.c Disable linker map generation and improve tinyness 2023-06-09 03:29:26 -07:00
deltaify.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
dropcache.c Change license 2020-12-27 17:18:44 -08:00
echo.c Make build hermetic without shell scripts 2022-05-25 13:55:57 -07:00
false.c Fix hermeticity issue with new test 2023-04-18 06:37:01 -07:00
fastdiff.c Clean up some code 2022-12-11 14:30:59 -08:00
fixupobj.c Rewrite .zip.o file linker 2023-06-10 09:29:44 -07:00
gzip.c Disable linker map generation and improve tinyness 2023-06-09 03:29:26 -07:00
helpop.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
lz4toasm.c Make important improvements 2022-09-14 22:39:08 -07:00
mkdeps.c Make mkdeps more helpful when files are missing 2023-02-23 08:11:08 -08:00
mkdir.c Disable linker map generation and improve tinyness 2023-06-09 03:29:26 -07:00
mv.c Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
ocat.c Disable linker map generation and improve tinyness 2023-06-09 03:29:26 -07:00
package.c Rewrite .zip.o file linker 2023-06-10 09:29:44 -07:00
pledge.c Rewrite .zip.o file linker 2023-06-10 09:29:44 -07:00
printf.c Clean up some code 2022-08-20 12:32:51 -07:00
pstrace.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
pwd.c Make build hermetic without shell scripts 2022-05-25 13:55:57 -07:00
refactor.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
rle.c Get LIBC_MEM and LIBC_STDIO building with aarch64 2023-05-10 04:20:47 -07:00
rm.c Disable linker map generation and improve tinyness 2023-06-09 03:29:26 -07:00
rollup.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
runit.c Fix bugs in cosmocc toolchain 2023-06-08 23:44:03 -07:00
runit.h Fix bugs and add security features to redbean 2022-04-18 00:01:26 -07:00
runitd.c Fix bugs in cosmocc toolchain 2023-06-08 23:44:03 -07:00
sha256sum.c Disable linker map generation and improve tinyness 2023-06-09 03:29:26 -07:00
summy.c Unbloat the build 2022-08-11 00:15:29 -07:00
symtab.c Clean up some code 2022-08-20 12:32:51 -07:00
touch.c Disable linker map generation and improve tinyness 2023-06-09 03:29:26 -07:00
unbuffer.c Remove blinkenlights 2023-06-14 19:30:52 -07:00
unbundle.c Disable linker map generation and improve tinyness 2023-06-09 03:29:26 -07:00
unveil.c Clean up some code 2022-08-20 12:32:51 -07:00
x86combos.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
xlat.c Make important improvements 2022-09-14 22:39:08 -07:00
zipbase.c Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
zipcopy.c Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
zipobj.c Rewrite .zip.o file linker 2023-06-10 09:29:44 -07:00