Closed severach closed 3 months ago
If you want to (re)compile the library, most of it happens far outside of the makefiles. The source code files of the library are listed in the various srclib/lc.txt files. Each of those lc.txt files files essentially contains a very long list of arguments for smlrcc. See Recompiling.
Um... That's how I usually (re)compile it. I've forgotten about the makefile also doing it but in a somewhat different way and I never tried it multithreaded.
I think, I know what's going on. The same source files are compiled concurrently into intermediate files of non-unique names. That is, c0.c is being preprocessed into c0.i that is being compiled into c0.asm that is being assembled into c0.o. All of these files are written into the same srclib directory. Gotta figure out how to fix this, somehow give unique paths/names to those intermediate files.
When I use
make -j4
I get a variety of errors indicating thatv0100/srclib/c0.asm
is used before it is built or is partially built. This is usually because of a missing dependency but I can't figure out wherec0
is in the Makefile.make -j12
shows even more outlandish errors.make -j1
always works.