From patchwork Thu Apr 23 20:38:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 464051 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 383971400DE for ; Fri, 24 Apr 2015 06:39:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=RQOuzmZB; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=FNGZbyyi3JsWX1l5Z81CIlAaHoerFs1MT1lUCkZTZRflonUPpou1k fmHhTDGlM5uNd4SAdEGxNL0W1wR/aGeu4ffH04Hyofuc3D/htk/G0YQEastVr+0e BX6+1RbR9DotlKl/a0HviuyDc1RDzjVRL2g+wKLSa7ZKzas/IT/lZg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=default; bh=Z5XrUVbZiOUr6OxJAEYChbxAmIs=; b=RQOuzmZBKwYhE7toGFOg+PVDlEWG J5RYpQQN43Joyz9jpQ02HkZAQsnkg2STb3L+AJL+1IjRvBLFfgC8nK3OsC+NMhZP HV5xlZh0kvZKMKfMf8payIhGDC/3XWXX4S2HBYbjyRl28xlfDmTVIxVSb960VM9f OtfMuLJ/W57MjHA= Received: (qmail 71334 invoked by alias); 23 Apr 2015 20:38:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 71268 invoked by uid 89); 23 Apr 2015 20:38:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 23 Apr 2015 20:38:52 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 34596AB128 for ; Thu, 23 Apr 2015 20:38:51 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3NKcnmI001458; Thu, 23 Apr 2015 16:38:50 -0400 Subject: [PATCH v2 4/4] libcc1: 'set debug compile': Display absolute GCC driver filename From: Jan Kratochvil To: gcc-patches@gcc.gnu.org Cc: Phil Muldoon Date: Thu, 23 Apr 2015 22:38:49 +0200 Message-ID: <20150423203849.23973.43273.stgit@host1.jankratochvil.net> In-Reply-To: <20150423203827.23973.72954.stgit@host1.jankratochvil.net> References: <20150423203827.23973.72954.stgit@host1.jankratochvil.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-IsSubscribed: yes Hi, already approved, maybe it could be already checked in outside of the series: https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01298.html With the patches so far after (gdb) set debug compile 1 one would get: searching for compiler matching regex ^(x86_64|i.86)(-[^-]*)?-linux(-gnu)?-gcc$ found compiler x86_64-unknown-linux-gnu-gcc But I believe it is more readable to see: searching for compiler matching regex ^(x86_64|i.86)(-[^-]*)?-linux(-gnu)?-gcc$ found compiler /usr/bin/x86_64-unknown-linux-gnu-gcc I do not think the change will have functionality impact, although the filename gets used even for executing the command. Jan libcc1/ChangeLog 2015-04-21 Jan Kratochvil * findcomp.cc: Include system.h. (search_dir): Return absolute filename. --- libcc1/findcomp.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcc1/findcomp.cc b/libcc1/findcomp.cc index f02b1df..5d49e29 100644 --- a/libcc1/findcomp.cc +++ b/libcc1/findcomp.cc @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "libiberty.h" #include "xregex.h" #include "findcomp.hh" +#include "system.h" class scanner { @@ -68,7 +69,7 @@ search_dir (const regex_t ®exp, const std::string &dir, std::string *result) { if (regexec (®exp, filename, 0, NULL, 0) == 0) { - *result = filename; + *result = dir + DIR_SEPARATOR + filename; return true; } }