Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mimic: link against libstdc++ statically #23490

Merged
merged 2 commits into from Aug 21, 2018

Conversation

Projects
None yet
3 participants
@tchaikov
Copy link
Contributor

commented Aug 8, 2018

cmake: fix "WITH_STATIC_LIBSTDCXX"
- do not link libkv with ALLOC_LIBS, it turns out that if we link
tcmalloc *before* -static-libstdc++ -static-libgcc, libstdc++ and gcc
libs will show up in `ldd` output
- add `-static-libstdc++ -static-libgcc` to CMAKE_SHARED_LINKER_FLAGS
and CMAKE_EXE_LINKER_FLAGS instead of adding them to all shared
libraries and executable. simpler this way.
- link against libtcmalloc statically, because libtcmalloc is a C++
library, linking against it dynamically and linking against C++ runtime
statically will pull in depdencies on two versions of C++ runtime, which
will bring down the app at run-time.
- do not pass '-pie' to linker when building executable if
`WITH_STATIC_LIBSTDCXX` and tcmalloc is used, because the static tcmalloc
is not compiled with PIC.
- only apply '-pie' if ENABLE_SHARED is enabled.

Fixes: http://tracker.ceph.com/issues/26880
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit d245ffb)

@tchaikov tchaikov modified the milestones: jewel, mimic Aug 8, 2018

@tchaikov tchaikov force-pushed the tchaikov:mimic-26880 branch from b2953ff to 1ae92b2 Aug 8, 2018

debian: strip "-Wl,-Bsymbolic-functions" from LDFLAGS
Fixes: http://tracker.ceph.com/issues/25209
Fixes: http://tracker.ceph.com/issues/26880
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 2063056)

@tchaikov tchaikov force-pushed the tchaikov:mimic-26880 branch from 1ae92b2 to 1390ca9 Aug 8, 2018

@smithfarm smithfarm added the build/ops label Aug 17, 2018

@smithfarm

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2018

@tchaikov Just out of curiosity. The master tracker says the issue is fixed by:

which appear to contain a total of 9 commits, but the mimic backport only two commits?

@smithfarm smithfarm self-requested a review Aug 17, 2018

@tchaikov

This comment has been minimized.

Copy link
Contributor Author

commented Aug 17, 2018

@smithfarm some of the commits in #23432 revert the ones in #22990 . and d245ffb is merely a cleanup change.

@yuriw

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2018

@yuriw yuriw merged commit ffac3d9 into ceph:mimic Aug 21, 2018

4 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.