4 ms·
There is a strong need for a good, modern and well maintained cross-platform C/C++ libc. I am not sure about the APE executable format, it is a nice and techni
by stephc_int13 4y ago
There is a strong need for a good, modern and well maintained cross-platform C/C++ libc.
I am not sure about the APE executable format, it is a nice and technically impressive feature but I would not mind if the lib dropped the support for it in the future.
This might be a minor issue for some, but I do not like having to distribute a .com file, it look suspicious.
Overall, this is fantastic work, very useful and inspiring, the kind of project that could help to fuel a C based apps renaissance.
- jart 4y agoWe support that. If you want a freedom-optimized build: make -j16 MODE=tinylinuxbsd Will produce ELF executables that run on Linux, FreeBSD, NetBSD, and OpenBSD. You'll never have to worry about being red-flagged by Microsoft. You won't have worry about Apple breaking your binaries. You won't have to worry about Glibc's license or wine binfmt_misc issues. Your binaries will be smaller, starting at 8kb in size. It's real nice and still supports 4x more platforms than the existing tools. If you use it, please note that "tiny" modes disable a lot of cool features like --ftrace and --strace. You can turn them back on by putting: ifeq ($(MODE), linuxbsd) CONFIG_CPPFLAGS += \ $(BACKTRACES) \ $(FTRACE) \ -DSYSDEBUG \ -DSUPPORT_VECTOR=113 \ -O2 TARGET_ARCH ?= \ -msse3 endif In either ~/.cosmo.mk or build/config.mk. Then you'd say `make MODE=linuxbsd`. We also ship a `tinylinux` prebuilt amalgamation on https://justine.lol/cosmopolitan/download.html https://justine.lol/cosmopolitan/download.html Lastly, you can always change the .com extension to .exe. I would have chosen the latter, but I think UNIX has more in common with DOS than it does with Windows. I know people in the Microsoft camp hold negative associations with .com. But I didn't want people in other camps to think APE is just a Windows program.
- stephc_int13 4y agoAre you sure that a .com executable can be renamed as .exe and still work on Windows? Unfortunately Windows might not be that smart. I really like the tiny ELF executable running on any unix, very neat and not scary. Having the same style of release for macOS and Win32 would be perfect.
- jart 4y agoYes I'm sure. On Windows .com and .exe are the same thing. If you want just a Windows binary without any APE, you can use -DSUPPORT_VECTOR=4 and just change the .com extension to .exe. If you want just a MacOS binary, then use -DSUPPORT_VECTOR=8 and then run the assimilate.com program with the -m flag to convert it to Mach-O.
- FragenAntworten 4y agoIt seems that it should work: https://web.archive.org/web/20180223071736/https://blogs.msdn.microsoft.com/oldnewthing/20080324-00/?p=23033 https://web.archive.org/web/20180223071736/https://blogs.msd...