A segmentation fault suggests a software bug. A process is trying to read or write a piece of memory without permission. The root cause is often something like an out of bounds array reference or an invalid pointer reference.
Most compilation jobs have to be single threaded. Make can often be multithreaded. High core count cpu are not necessarily best, but four or more cores would be good.
Storage speed is very important as many files are read and written during a compile or make.