NixOS/nixpkgs — pull request #3654 by aszlig (2014-08-18 09:48:30+00:00)
Title: gcc-wrapper: Correctly handle response files.

This implements handling of so-called [response files](https://gcc.gnu.org/wiki/Response_Files) (available since GCC 4), which allow arguments to be put in a file and the file will be passed back to `gcc` (and other utilities, such as `ld`) via the `@response_file` syntax.

The tricky parts here are that the response files can be nested arbitrarily and have it's own escaping rules (which I'm handling by using [expandargv()](https://gcc.gnu.org/onlinedocs/libiberty/Functions.html#index-expandargv-73) from `libiberty`) and the handling of maximum commandline arguments, so we can't simply expand all args from all response files but have to create a temporary response file.

Cc: @edolstra for review.
Of course, this is meant for the staging branch to see how much I broke with this X-D