aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-06-09 23:47:32 -0400
committerMike Frysinger <vapier@gentoo.org>2012-06-09 23:47:32 -0400
commit1c8ed2a8669f4375f965c78ed37588b87cf534b1 (patch)
treeb698f8b1f02c953b01db739e25d5431562b1e59c
parenttests: verify removal of wrappers between diff configs (diff)
downloadgcc-config-1c8ed2a8669f4375f965c78ed37588b87cf534b1.tar.gz
gcc-config-1c8ed2a8669f4375f965c78ed37588b87cf534b1.tar.bz2
gcc-config-1c8ed2a8669f4375f965c78ed37588b87cf534b1.zip
wrapper: remove ROOT from env when looking up bin path
When falling back to running gcc-config to find out the path to the real binary, make sure to clear out $ROOT. Otherwise gcc-config will try to look in $ROOT for its config files when really we're trying to execute programs in /. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--wrapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wrapper.c b/wrapper.c
index a2e7a92..65e5317 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -213,7 +213,7 @@ static void find_wrapper_target(struct wrapper_data *data)
/* Only our wrapper is in PATH, so get the CC path using
* gcc-config and execute the real binary in there ...
*/
- FILE *inpipe = popen(GCC_CONFIG " --get-bin-path", "r");
+ FILE *inpipe = popen("ROOT= " GCC_CONFIG " --get-bin-path", "r");
if (inpipe == NULL)
wrapper_errp("could not open pipe");