From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
To: Nick Clifton <nickc@redhat.com>,
Tobias Burnus <tobias@codesourcery.com>,
Binutils <binutils@sourceware.org>
Subject: Re: Build issues due to patch "gprofng: a new GNU profiler" – CLOCK_MONOTONIC_RAW not defined
Date: Tue, 15 Mar 2022 09:54:38 -0700 [thread overview]
Message-ID: <dd6d002d-278b-f2a6-060d-d81ef21bc95e@oracle.com> (raw)
In-Reply-To: <14359283-a893-7208-c87d-c42aad214c67@redhat.com>
On 3/15/22 08:24, Nick Clifton wrote:
> Hi Vladimir, Hi Tobias,
>
> To save time I have gone ahead and applied a patch myself (attached).
> Please let me know if I missed anything or made a mistake...
>
> Cheers
> Nick
Hi Nick,
I did not add -lrt for the gprofng/src build.
I suggested the following fix:
% diff --git a/gprofng/configure.ac b/gprofng/configure.ac
index 8977e8bd4bb..6522b6fab0e 100644
--- a/gprofng/configure.ac
+++ b/gprofng/configure.ac
@@ -35,8 +35,22 @@ GPROFNG_LIBADD="-L../../libiberty -liberty"
if test "$enable_shared" = "yes"; then
GPROFNG_LIBADD="-L../../libiberty/pic -liberty"
fi
+
+# Check for the clock_gettime function.
+AC_CHECK_FUNCS(clock_gettime)
+clock_gettime_link=
+# At least for glibc, clock_gettime is in librt. But don't
+# pull that in if it still doesn't give us the function we want.
+
+if test "$ac_cv_func_clock_gettime" = no; then
+ AC_CHECK_LIB(rt, clock_gettime,
+ [GPROFNG_LIBADD="$GPROFNG_LIBADD -lrt"
+ AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
+ [Define to 1 if you have the `clock_gettime' function.])])
+fi
AC_SUBST(GPROFNG_LIBADD)
+
# Figure out what compiler warnings we can enable.
# See config/warnings.m4 for details.
Thank you,
-Vladimir
next prev parent reply other threads:[~2022-03-15 16:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 10:57 Tobias Burnus
2022-03-14 18:16 ` Vladimir Mezentsev
2022-03-15 15:24 ` Nick Clifton
2022-03-15 16:24 ` Tobias Burnus
2022-03-16 12:29 ` Nick Clifton
2022-03-16 14:55 ` Tobias Burnus
2022-03-18 15:25 ` Tobias Burnus
2022-03-18 15:47 ` Nick Clifton
2022-03-15 16:54 ` Vladimir Mezentsev [this message]
2022-03-15 16:59 ` Vladimir Mezentsev
2022-03-16 7:56 ` Tobias Burnus
2022-03-14 20:53 ` Joseph Myers
2022-03-14 21:52 ` Vladimir Mezentsev
2022-03-16 11:30 ` Nick Alcock
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=dd6d002d-278b-f2a6-060d-d81ef21bc95e@oracle.com \
--to=vladimir.mezentsev@oracle.com \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
--cc=tobias@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).