summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2013-07-18 21:54:50 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2013-07-19 06:32:39 (GMT)
commitaaa06aaa82787b77ea56a7664cb4b0a22eca5c31 (patch)
tree6883861b25cd9da284a2e934788601981118ec02
parentf2e610da5a8dfd37ec4a963f0c99496a304d0b26 (diff)
downloadbuildroot-aaa06aaa82787b77ea56a7664cb4b0a22eca5c31.tar.gz
buildroot-aaa06aaa82787b77ea56a7664cb4b0a22eca5c31.tar.bz2
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>
-rw-r--r--toolchain/toolchain-external/ext-toolchain-wrapper.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c
index 460f255..befd735 100644
--- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
+++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
@@ -136,6 +136,15 @@ int main(int argc, char **argv)
/* finish with NULL termination */
*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))
perror(path);