From: Aaron Conole <aconole@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Nathan Sidwell <nathan@acm.org>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Jan Hubicka <hubicka@ucw.cz>,
Nathan Sidwell <nathan@codesourcery.com>
Subject: Re: [PATCH v2] gcov: Runtime configurable destination output
Date: Sat, 04 Jun 2016 12:12:00 -0000 [thread overview]
Message-ID: <f7ty46l9mqp.fsf@redhat.com> (raw)
In-Reply-To: <CAMe9rOrJJZzj_QuohGW1UOfO0Lj2Cyp-1-jAdceR=qp1qe37aw@mail.gmail.com> (H. J. Lu's message of "Fri, 3 Jun 2016 08:00:18 -0700")
> It breaks profiledbootstrap:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71400
I am including a patch that should fix the issues introduced by my
patch. I have confirmed behavior on my system, and built with
profiledbootstrap as well as bootstrap.
libgcc/ChangeLog:
2016-06-04 Aaron Conole <aconole@redhat.com>
* libgcov-driver-system.c (gcov_error): Remove
redundant assignment.
(get_gcov_error_file): Invert the IN_GCOV_TOOL test
(__gcov_error_file): Only use this when !IN_GCOV_TOOL
---
libgcc/libgcov-driver-system.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/libgcc/libgcov-driver-system.c b/libgcc/libgcov-driver-system.c
index ff8a521..6bfe6ba 100644
--- a/libgcc/libgcov-driver-system.c
+++ b/libgcc/libgcov-driver-system.c
@@ -27,7 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
it will either be stderr, or a file of the user's choosing.
Non-static to prevent multiple gcov-aware shared objects from
instantiating their own copies. */
+#if !IN_GCOV_TOOL
FILE *__gcov_error_file = NULL;
+#endif
/* A utility function to populate the __gcov_error_file pointer.
This should NOT be called outside of the gcov system driver code. */
@@ -35,7 +37,7 @@ FILE *__gcov_error_file = NULL;
static FILE *
get_gcov_error_file(void)
{
-#if !IN_GCOV_TOOL
+#if IN_GCOV_TOOL
return stderr;
#else
char *gcov_error_filename = getenv ("GCOV_ERROR_FILE");
@@ -60,11 +62,8 @@ gcov_error (const char *fmt, ...)
int ret;
va_list argp;
- if (!__gcov_error_file)
- __gcov_error_file = get_gcov_error_file ();
-
va_start (argp, fmt);
- ret = vfprintf (__gcov_error_file, fmt, argp);
+ ret = vfprintf (get_gcov_error_file (), fmt, argp);
va_end (argp);
return ret;
}
--
2.5.5
next prev parent reply other threads:[~2016-06-04 12:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 21:52 Aaron Conole
2016-04-15 19:02 ` Aaron Conole
2016-04-27 20:59 ` Aaron Conole
2016-04-28 13:25 ` Nathan Sidwell
2016-04-29 15:08 ` Aaron Conole
2016-05-04 15:22 ` Nathan Sidwell
2016-05-04 15:25 ` Jan Hubicka
2016-05-06 13:18 ` Nathan Sidwell
2016-05-19 18:40 ` Aaron Conole
2016-05-19 19:25 ` Jeff Law
2016-05-19 23:14 ` Nathan Sidwell
2016-05-20 1:11 ` Jeff Law
2016-05-19 23:17 ` Nathan Sidwell
2016-05-23 18:16 ` Aaron Conole
2016-06-03 15:00 ` H.J. Lu
2016-06-03 15:31 ` Aaron Conole
2016-06-04 12:12 ` Aaron Conole [this message]
2016-06-06 15:25 ` Nathan Sidwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7ty46l9mqp.fsf@redhat.com \
--to=aconole@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=hubicka@ucw.cz \
--cc=nathan@acm.org \
--cc=nathan@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).