diff options
author | Ronald Wampler <rdwampler@gmail.com> | 2016-07-07 16:45:54 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-07 14:15:08 -0700 |
commit | d19e3a5b21f28c07886801616e02e08eab64a7d8 (patch) | |
tree | f3ad8e4dbce119ebe2a4bbde60b041a44177f0b6 /t/t9113-git-svn-dcommit-new-file.sh | |
parent | Git 2.8.4 (diff) | |
download | tgif-d19e3a5b21f28c07886801616e02e08eab64a7d8.tar.xz |
Makefile: add NEEDS_LIBRT to optionally link with librt
We unconditionally link with librt, when HAVE_CLOCK_GETTIME is defined.
But clock_gettime() has been available in most libc implementations for
some time now (e.g., for glibc since version 2.17) and no longer
requires linking with librt. Furthermore, commit a6c3c63 (configure.ac:
check for clock_gettime() and CLOCK_MONOTONIC) will automatically
determined which library (libc or librt) is required for linking when
checking for clock_gettime().
The assumption to unconditionally link with librt was OK, since either
almost every Unix-like system provides a version of librt for backwards
compatibility or other systems, namely Windows or OS X, never provided
clock_gettime(). However, in the latest release of OS X (macOS Sierra),
this function has been added to OS X libc version. As a result, when
running the configuration script, HAVE_CLOCK_GETTIME is set and since
librt is not present, it causes a linker error.
This patches requires those not building via the configuration scripts
to define NEEDS_LIBRT in addition to HAVE_CLOCK_GETTIME, if needed.
Signed-off-by: Ronald Wampler <rdwampler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9113-git-svn-dcommit-new-file.sh')
0 files changed, 0 insertions, 0 deletions