From 175461e09b4631d87716308431b5f83fb2db396e Mon Sep 17 00:00:00 2001 From: David McFarland Date: Sat, 19 Nov 2016 10:06:39 -0400 Subject: [PATCH] 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. --- pkgs/build-support/cc-wrapper/utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/cc-wrapper/utils.sh b/pkgs/build-support/cc-wrapper/utils.sh index 481d642f967..aba5f3295a9 100644 --- a/pkgs/build-support/cc-wrapper/utils.sh +++ b/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