A debug link of wkgtk can take up to 8 GB of RAM. In a parallelized build more than one instance of ld will be running at the same time, fighting for memory, and causing endless amounts of swapping in and out.
Linking, in particular in debugging builds, should run sequentially.
I wonder if the -l option can help here?
Not really, because -l is about reducing the number of jobs when the system load is high. Usually when the I/O is high, the system load is actually low.
Hrm, the idea is sound, the realization might be a PITA.
Thinking of it very little, I guess sequential dependencies could be set up for all the linking targets. One problem about that would be keeping such a list up-to-date, though it's only a problem if it doesn't outweigh the benefit of the approach.
There is a special built-in target in GNU make that perhaps can be used for this - - .NOTPARALLEL