The attached patch (submitted upstream) fixes building with -j8 on a real 8-core SMP. Thanks, Diego
writing it down for others in herd, I've tested this patch and it seems if doesn't fix issues in tests so this patch is currently on hold.
hum wonder why I didn't close this bug yet. 2.14.16 includes this patch, I've added -j1 to src_test since it can still loop there.