Page MenuHomePhabricator

build: remove linking librt for backwards compatibility
ClosedPublic

Authored by Fabien on Apr 30 2020, 07:49.

Details

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.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien planned changes to this revision.Apr 30 2020, 08:00
Fabien requested review of this revision.Apr 30 2020, 11:27
deadalnix requested changes to this revision.Apr 30 2020, 11:30
deadalnix added a subscriber: deadalnix.

Mention the PR in the description.

This revision now requires changes to proceed.Apr 30 2020, 11:30
Fabien requested review of this revision.Apr 30 2020, 11:35
Fabien edited the summary of this revision. (Show Details)

Added PR to the summary

This revision is now accepted and ready to land.Apr 30 2020, 11:38