From aaa06aaa82787b77ea56a7664cb4b0a22eca5c31 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Thu, 18 Jul 2013 23:54:50 +0200 Subject: [PATCH] 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" Cc: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- toolchain/toolchain-external/ext-toolchain-wrapper.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c index 460f255ee5..befd735f11 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); -- 2.30.2