Browse Source

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.
nixos-19.03
David McFarland 6 years ago
parent
commit
175461e09b
  1. 2
      pkgs/build-support/cc-wrapper/utils.sh

2
pkgs/build-support/cc-wrapper/utils.sh

@ -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

Loading…
Cancel
Save