git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Reuben Hawkins <reubenhwk@gmail.com>
To: git@vger.kernel.org
Cc: reubenhwk@gmail.com, karsten.blees@gmail.com
Subject: [PATCH] Makefile: add NO_CLOCK_GETTIME check
Date: Wed,  3 Sep 2014 12:14:47 -0700	[thread overview]
Message-ID: <1409771687-5597-1-git-send-email-reubenhwk@gmail.com> (raw)

Some really old platforms, rhel3, which don't define CLOCK_MONOTONIC, still
need a way to build git.  Some high resolution timer code was added Jul 12,
2014 to aid debugging performance issues.  That code uses clock_gettime and
CLOCK_MONOTONIC.  That change breaks building git on ancient platforms which
don't support CLOCK_MONOTONIC, so a way to disable that code is needed.

To use this feature...

$ make NO_CLOCK_GETTIME=1

This change amends the commit...

 commit 148d6771bf5e00aa1d7fa2221507a3dfe4c1e37f
 Author: Karsten Blees <karsten.blees@gmail.com>
 Date:   Sat Jul 12 02:05:42 2014 +0200

  trace: add high resolution timer function to debug performance issues
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 9f984a9..0c1c8cf 100644
--- a/Makefile
+++ b/Makefile
@@ -1502,10 +1502,12 @@ ifdef GMTIME_UNRELIABLE_ERRORS
 	BASIC_CFLAGS += -DGMTIME_UNRELIABLE_ERRORS
 endif
 
+ifndef NO_CLOCK_GETTIME
 ifdef HAVE_CLOCK_GETTIME
 	BASIC_CFLAGS += -DHAVE_CLOCK_GETTIME
 	EXTLIBS += -lrt
 endif
+endif
 
 ifeq ($(TCLTK_PATH),)
 NO_TCLTK = NoThanks
-- 
1.9.1

             reply	other threads:[~2014-09-03 19:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 19:14 Reuben Hawkins [this message]
2014-09-03 19:45 ` [PATCH] Makefile: add NO_CLOCK_GETTIME check Junio C Hamano
2014-09-03 20:58   ` Junio C Hamano

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=1409771687-5597-1-git-send-email-reubenhwk@gmail.com \
    --to=reubenhwk@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=karsten.blees@gmail.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 NNTP newsgroup(s).