I was about to say that it should apply cleanly to 7.8 from cvs, but now Grubba switched from bin/smartlink to src/smartlink.c without any consensus here so avoid src/configure.in r1.1068 for the moment.
I really don't like to see that type of wild fixes go in without even considering the consequences. Grubba, what platforms did you verify this optimization on? Better compile speed is rather low on the priority list in my mind.