diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-09-02 10:20:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-09-02 19:11:44 +0200 |
commit | 32a96e44b4c073c7c61c94a7f0fe6108dde663bc (patch) | |
tree | d9b2f989162943bcc481f86f768255cbc6b2ff54 /slideshow | |
parent | 098bf3b243bdbb3257fda97a54caa6c403f63df6 (diff) |
Add -latomic to the end of Linux C++ linker command lines
b11763dbaa0c7f427ea47abe9b98995cb49a8595 "link with -latomic on mips(el),
armel, powerpc, m68k" had added -latomic to the linker command lines of just
some Linux platforms (which apparently happened to actually require it). But
there were three issues with that:
* The -latomic came too early on the command line, so that it wasn't used to
satisfy dependencies of .o files that came later. See the discussion at
<https://gerrit.libreoffice.org/#/c/78319/> "set -Wl,--no-as-needed for
-latomic".
* There is presumably no need to include -latomic on C linker command lines.
* <https://gcc.gnu.org/onlinedocs/gcc-7.3.0/libstdc++/manual/manual/using.html
#manual.intro.using.flags> (matching our Linux libstdc++ 7.3.0 baseline as
per README.md) states: "Linking to libatomic is required for some uses of
ISO C++11 <atomic>." So we should better include -latomic on every Linux C++
linker command line that uses libstdc++. (This patch assumes that we always
use libstdc++ on Linux.)
Ideally we could rely on -latomic always being available with our baseline
libstdc++ 7.3.0, but when using Red Hat Developer Toolset 7 that appears not to
be the case, as reported by a Jenkins build for an older version of this change
(see below), so use ATOMIC_LIB from the preceding commit
<https://gerrit.libreoffice.org/#/c/78336/> "add -latomic configure check...".
<https://ci.libreoffice.org/job/gerrit_linux_gcc_release/40298/console>:
> [build LNK] Executable/unoapploader
> /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: cannot find -latomic
> collect2: error: ld returned 1 exit status
> /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/solenv/gbuild/LinkTarget.mk:636: recipe for target '/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/LinkTarget/Executable/idxdict' failed
This patch adds -latomic only on Linux. Similar changes can be made for other
platforms if need be.
Change-Id: I75df5410677f4c31c796d7ba85532bcdb47eb111
Reviewed-on: https://gerrit.libreoffice.org/78380
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'slideshow')
0 files changed, 0 insertions, 0 deletions