Skip to content

Commit

Permalink
cc-wrapper: don't expand $ in response files
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
corngood committed Nov 20, 2016
1 parent 3995655 commit 175461e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/build-support/cc-wrapper/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 175461e

Please sign in to comment.