toolchain: instrument external toolchain wrapper
If BR_DEBUG_WRAPPER is set in the envirnment, dump the actual command being exec()uted, to ease debugging issues with the wrapper. [Peter: adjust code style and output format to be cut'n'paste compatible] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
f2e610da5a
commit
aaa06aaa82
|
@ -136,6 +136,15 @@ int main(int argc, char **argv)
|
||||||
/* finish with NULL termination */
|
/* finish with NULL termination */
|
||||||
*cur = NULL;
|
*cur = NULL;
|
||||||
|
|
||||||
|
if (getenv("BR_DEBUG_WRAPPER")) {
|
||||||
|
fprintf(stderr, "Executing");
|
||||||
|
|
||||||
|
for (i = 0; args[i]; i++)
|
||||||
|
fprintf(stderr, " %s", args[i]);
|
||||||
|
|
||||||
|
fprintf(stderr, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (execv(path, args))
|
if (execv(path, args))
|
||||||
perror(path);
|
perror(path);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue