3 ms·
They also made cosmopolitan libc [0] which outputs a single binary that runs on many platforms. > The above command fixes GCC so it outputs portable binaries t
by molticrystal 4y ago
They also made cosmopolitan libc [0] which outputs a single binary that runs on many platforms.
> The above command fixes GCC so it outputs portable binaries that will run on every Linux distro in addition to Mac OS X, Windows NT, FreeBSD, OpenBSD, and NetBSD too. Your program will also boot on bare metal too. In other words, you've written a normal textbook C program, and thanks to Cosmopolitan's low-level linker magic, you've effectively created your own operating system which happens to run on all the existing ones as well.
Brought up recently here: "Debugging C with Cosmopolitan Libc" [1]
And introduced here "Cosmopolitan Libc: build-once run-anywhere C library" [2]
[0] https://justine.lol/cosmopolitan/index.html https://justine.lol/cosmopolitan/index.html
[1] https://news.ycombinator.com/item?id=33312012 https://news.ycombinator.com/item?id=33312012
[2] https://news.ycombinator.com/item?id=25556286 https://news.ycombinator.com/item?id=25556286
- deleted 4y ago[deleted]
- geokon 4y agoCan you build cross platform libs? So like say you have python or java that calls out to some native code (ex: high performance math routines), but that native code is actually "cosmopolitan"/crossplatform?
- grishka 4y agoWhy not? The difference between an executable and a dynamic library is that an executable has one entry point but a dynamic library can have more than one.