HomePhabricator

build: remove linking librt for backwards compatibility

Description

build: remove linking librt for backwards compatibility

Summary:
Original PR description:

Now that we require glibc 2.17+, #17538, we can remove linking in librt
for backwards compatibility purposes. The clock_* functions from librt
were merged into glibc as part of the 2.17 release.

* The `clock_*' suite of functions (declared in <time.h>) is now
available
  directly in the main C library.  Previously it was necessary to link
with
  -lrt to use these functions.  This change has the effect that a
  single-threaded program that uses a function such as `clock_gettime'
(and
  is not linked with -lrt) will no longer implicitly load the pthreads
  library at runtime and so will not suffer the overheads associated
with
  multi-thread support in other code such as the C++ runtime library.

https://sourceware.org/ml/libc-announce/2012/msg00001.html

Note that librt is already not linked by the RISC-V and AARCH64
binaries.

Note that we are currently requiring glibc >= 2.19.

Backport of core PR17738.

Test Plan: Cross build for Linux.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5901

Details

Provenance
fanquake <fanquake@gmail.com>Authored on Dec 12 2019, 13:09
FabienCommitted on Apr 30 2020, 11:39
FabienPushed on Apr 30 2020, 11:39
Reviewer
Restricted Project
Differential Revision
D5901: build: remove linking librt for backwards compatibility
Parents
rABCe688019fc102: [CI] Build the OSX DMG
Branches
Unknown
Tags
Unknown