Distributed Compilation, a Programmer's Delight
cyberpead writes in with a Developerworks article on the open source tool options that can help speed up your build process by distributing the process across multiple machines in a local area network.
That would allow for people to inject malware, wouldn't it?
To compile:
void printhello() {
printf("Hello world!\n");
}
evil bastard changes to:
void printhello() {
{
}
printf("Hello world\n");
}
Since the most practical way to spot the evil binary would be to compile the code yourself and compare, that sort of defeats the purpose of having someone else compile it. I guess you could have many random people compile the same piece of source-code and then compare all produced code, but that makes the whole thing rather complicated.
Also, the p2p thing would only be useful for open source, as I doubt it would be smart for people trying to produce some closed source product to send their source to a p2p network that may or may not store everything.
And this is all assuming the delays introduced by sending all this stuff over the internet are not so large that compiling locally is faster or almost as fast.
It's probably best to compile your stuff on your lan, on machines that are close, and that can be trusted.