Here's my proposed patch, along the lines you suggested. top_srcdir didn't seem to be set, so I used srcdir instead. Bootstrapped on x86_64-unknown-linux-gnu