-
-
Notifications
You must be signed in to change notification settings - Fork 686
compile GNU make #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I also tried using Example Makefile for Hello World compilation on Windows: CC=../cross9/bin/x86_64-pc-linux-gnu-gcc.exe
OBJCOPY=../cross9/bin/x86_64-pc-linux-gnu-objcopy.exe
COSMO_CFLAGS= -static -fno-pie -no-pie -mno-red-zone -fno-omit-frame-pointer -nostdlib -nostdinc -Wl,--gc-sections -Wl,-z,max-page-size=0x1000 -fuse-ld=bfd -Wl,-T,../libcosmo/ape.lds -include ../libcosmo/cosmopolitan.h ../libcosmo/crt.o ../libcosmo/ape.o ../libcosmo/cosmopolitan.a
all: hello.com
hello.com: hello.com.dbg
$(OBJCOPY) -SO binary $< $@
hello.com.dbg: hello.c
$(CC) -o $@ $< $(COSMO_CFLAGS) I ran it using I also tried to compile Cosmopolitan from source using |
Nice! If you check it into the codebase I can help you fix the I'm more excited about your Python work in #141. Portable make would be nice to have, but it'd be easier to get Python working well on Windows than it would be to get Almquist Shell working, since UNIX is the shell (it was the first thing Ken Thompson wrote when he created UNIX) and Windows is not UNIX. |
I'll put together a PR for For I thought Python APE webapps would be nice to have, but they are oddly slow, and there are lots of gotchas involved (for example setup.py scripts sometime wants the glibc version even if the package is a pure-Python wheel). Ignoring web-based capabilities, both Python 2.7/3.6 just have to pass a lot of tests in their respective suites, and we can add either one to the codebase. |
Small nit but I'd say name the folder |
Are the Python stats in the above benchmark for static or dynamic pages? The slow is in dynamic pages. I simulated Python multithreading using This was a simple Flask app from a couple of weeks ago (GIF playing in realtime): I may have mixed something up with the APE build/test env above, but generally I don't expect pure CPython to win in performance. I picked Flask because familiarity, but maybe there's a Python web framework that is fast, single-threaded, easy to write and with simple C extension dependencies. I wonder how a Python wrapper to redbean would perform. |
umask doesn't have a wrapper last time I checked. You probably have to depend on |
@jart Closing this issue: |
It's lightning fast! I'm already using it as a replacement for what comes with my distro. Now I can't wait to add the ptrace stuff. |
For a while now, I've copied I don't have a windows system nearby, but I expect #117 might also be solvable after the recent improvements. We have |
Yes I think so. Having GNU Make was the last big blocker to the repository fully being able to build itself on Linux on its own. There's a few other trivial ones of course, like |
I'm running macOS and would sure like to play with Cosmopolitan more... Is the problem getting that working building a static GCC toolchain for macOS, or is there a lot more to it than that? Thank you! |
Is there a list somewhere? For starters we can use |
@ahgamut @ghaerr There should be a list. Would you like to create it? I've enabled the wiki feature on GitHub. Your both welcome to edit it at will with any information you feel might be helpful. Anyone with a GitHub account should have access to make changes there. @ghaerr You might be able to install an x86_64-linux-gnu toolchain from homebrew. See the instructions in the README file. Please note your mileage may vary. What I recommend doing is SSH'ing into a Linux computer to do development, mostly because that's what I do, so it's the only thing I can 100% support. In the future as the project attracts more developers we'll naturally have a build-anywhere run-anywhere solution. But right now all we've managed to achieve is build-once run-anywhere. |
Regarding the copy command, one thing that's really cool about cosmopolitan is the Lines 74 to 84 in 072e1d2
It's because Cosmopolitan has outstanding polyfills for things like |
@jart
Of these,
|
https://github.com/ahgamut/gnu-make-cosmopolitan
Clone the repo and run
superconfigure
to obtainmake.com.dbg
andmake.com
.Compilation changes were switch(errno) to if-else, and some linker complaints about getopt.
make.com
passes a lot of tests, notable failures are related to the below issue.make.com -j2
does not work on Linux. I added a SIGSEGV call at the point of failure to obtain the below backtrace, otherwisemake.com
just exits with the last line.The
jobserver_parse_auth
function insrc/posixos.c
callsfcntl(fd, F_GETFD)
which always returns -1 -- this causes the above error.The text was updated successfully, but these errors were encountered: