cc-wrapper: don't expand $ in response files

This makes the response file handling more consistent with GCC.

For example, a reponse file may contain:

    "-Wl,$ORIGIN"

GCC will treat this as a double quoted string and not expand the
variable reference.  Previously, cc-wrapper would expand the variable
in the same was as if the string was provided on the command line.
This commit is contained in:
David McFarland 2016-11-19 10:06:39 -04:00
parent 3995655d2c
commit 175461e09b

View File

@ -34,7 +34,7 @@ expandResponseParams() {
@*)
if [ -e "${p:1}" ]; then
args=$(<"${p:1}")
eval 'for arg in '$args'; do params+=("$arg"); done'
eval 'for arg in '${args//$/\\$}'; do params+=("$arg"); done'
else
params+=("$p")
fi