HomePhabricator

[CMAKE] Add an option to statically link libstdc++

Description

[CMAKE] Add an option to statically link libstdc++

Summary:
The -static-libstdc++ linker flag is passed manually through the
environment variable LDFLAGS when running configure configure for
the Linux gitian build.

Test Plan:

cmake -DENABLE_STATIC_LIBSTDCXX=ON -GNinja ..
ninja
readelf -d src/bitcoind | grep libstdc++

Grep should return nothing.

cmake -DENABLE_STATIC_LIBSTDCXX=OFF -GNinja ..
ninja
readelf -d src/bitcoind | grep libstdc++

Grep should return a line containing:

Shared library: [libstdc++.so.x]

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox

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

Details

Provenance
FabienAuthored on Apr 30 2019, 09:42
FabienPushed on May 10 2019, 10:09
Reviewer
Restricted Project
Differential Revision
D2966: [CMAKE] Add an option to statically link libstdc++
Parents
rSTAGING8808e31743fb: [CMAKE] Add an option to reduce exports
Branches
Unknown
Tags
Unknown