Page MenuHomePhabricator

[CMAKE] Fix linux cross compilation with the glibc compatibility

Authored by Fabien on Sep 11 2019, 15:19.



Using the glibc compatibility requires, but it is not part of
the depends subsystem.
This diff adds the cross compiler installation dir to the search path:

  • By setting the search prefix explicitely for ARM;
  • By using the system path as a fallback to support the x86 platform.

Because of CMake search priority, the libraries from the depends subsystem will always be found first (if they exist).

Depends on D4038.

Test Plan

Repeat with Linux64, LinuxARM and LinuxAArch64

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Sep 11 2019, 15:19
Herald added a reviewer: Restricted Project. · View Herald TranscriptSep 11 2019, 15:19
Fabien planned changes to this revision.Sep 16 2019, 14:52
Fabien edited the summary of this revision. (Show Details)Sep 16 2019, 15:27
Fabien updated this revision to Diff 11349.Sep 16 2019, 15:28

Set the fallback at the toochain file level rather than the library.

While this is clearly not the right solution, we can move on with that for the sake of progress. The longer term solution is to add all we depend on in the depends.

Fabien added a comment.Sep 19 2019, 12:41

In this specific case we might just drop the RT library requirement which brings compatibility to an old glibc version.

deadalnix accepted this revision.Sep 20 2019, 16:16
This revision is now accepted and ready to land.Sep 20 2019, 16:16