From patchwork Thu Jul 18 21:54:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 260166 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id A94FF2C007B for ; Fri, 19 Jul 2013 07:55:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3C181328D6; Thu, 18 Jul 2013 21:55:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VsdSJDqjqE0u; Thu, 18 Jul 2013 21:55:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 6896F328CA; Thu, 18 Jul 2013 21:55:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id DB8131BF9B4 for ; Thu, 18 Jul 2013 21:55:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0DD068D284 for ; Thu, 18 Jul 2013 21:54:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cw8syA+vbkac for ; Thu, 18 Jul 2013 21:54:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by whitealder.osuosl.org (Postfix) with ESMTPS id 16D268D26F for ; Thu, 18 Jul 2013 21:54:57 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id z11so1166693wgg.3 for ; Thu, 18 Jul 2013 14:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=RUVb8ciKXRi4002nBRoW3xeOFtSAWjpD5s3CKhdrdaQ=; b=bkBOnuCsaPtuZROip63ocLQW+x/q8t5fViY9rLJGuYXZDfw73mS9NRIobyhbMXjdbU d7gh01EjWcc4IZyZyaN5aGHWgpnoSBk635D2LZ2wWuSKzEV5nmM3+gxOz9AzOyupLkcu j4xcBwbPa37nesPYvbWSzUQc1czX1DaUF5HAILTlv3wLKk1Cw2kprjZCpdQn5BzZOXhK uFJyCQ1ebMsKNfE4l0/qlm1YAq2uo0aCADij2HkdttEDl2OJNBQy6p37LR3LNudL3o8F 8cwfZzAFa4ecWa4szE2KL3Jt3Qy7wLpaBHnzmfk/ERg3gGjVKhGcKHByzhDNRCkfD6JX dOqg== X-Received: by 10.180.36.107 with SMTP id p11mr9530085wij.31.1374184496512; Thu, 18 Jul 2013 14:54:56 -0700 (PDT) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id d8sm19353786wiz.0.2013.07.18.14.54.55 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Jul 2013 14:54:55 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Thu, 18 Jul 2013 23:54:50 +0200 Message-Id: <1374184490-13855-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <574ef0eb7e941dcc6c9dba3540f4aa1c213472bc.1374182572.git.yann.morin.1998@free.fr> References: <574ef0eb7e941dcc6c9dba3540f4aa1c213472bc.1374182572.git.yann.morin.1998@free.fr> Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCHv2 4/4] toolchain: instrument external toolchain wrapper X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: "Yann E. MORIN" If BR_DEBUG_WRAPPER is set in the envirnment, dump the actual command being exec()uted, to ease debugging issues with the wrapper. Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni --- Changes v1 -> v2: - style fixes (Thomas) --- toolchain/toolchain-external/ext-toolchain-wrapper.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c index 460f255..8e56414 100644 --- a/toolchain/toolchain-external/ext-toolchain-wrapper.c +++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c @@ -136,6 +136,14 @@ int main(int argc, char **argv) /* finish with NULL termination */ *cur = NULL; + if( getenv("BR_DEBUG_WRAPPER") ) { + fprintf( stderr, "path='%s'\n", path ); + int i; + for( i=0; args[i]; i++ ) { + fprintf(stderr, "argv[%d]='%s'\n", i, args[i] ); + } + } + if (execv(path, args)) perror(path);