Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


Hello,

my initial understanding of the case “Linker problems with system vs bundled libraries (RPATH vs 
RUNPATH) ” is, that
ld.bfd and ld.gold behave differently, which is exposed by invoking --enable-linker=

How do ld.bfd and ld.gold differ, that triggered the problem?

Based on what does ./configure --help print behind --enable-lto: best used with “gold”.  Are there 
any known problems
with ld.bfd?

The "gold as linker" in configure.in/configure.ac comes from commit fc41132306 back in 2011 and 
ld.bfd can handle linker
plugins at least since 2015.

The AS_HELP_STRING for --enable-lto says "both gold and lld linkers generally use less memory and 
link faster". 
Compared to what?  It shoud say "compared to ld.bfd".

--enable-lto switches AR, NM and RANLIB to be gcc-ar, gcc-nm and gcc-ranlib, but… on some systems 
the binary is called
gcc-ar-4, for clang you have to use llvm-ar, which on some systems is called llvm-ar-5.0.  I am not 
aware of a single
autoconf project that manages this right; new versions of CMake do.

I propose removing all the LTO extras from LibreOffice.  Competent users are supposed to install 
the linker plugin
liblto_plugin.so and LLVMgold.so in $libdir/bfd-plugins and insert -flto into CFLAGS and CXXFLAGS, 
respectively -flto=6
in LDFLAGS.  Incompetent users don’t have a problem without LTO, as they do not know LTO exists.

Regards
  Дилян

On Fri, 2019-02-01 at 21:32 +0100, Michael Stahl wrote:
On 01.02.19 20:12, Luboš Luňák wrote:
On Monday 28 of January 2019, Michael Stahl wrote:
hope this will help:

https://gerrit.libreoffice.org/#/c/67012/

the idea is we use different symbol version for everything so LO libs
call into bundled library, system libs call into system library.

haven't tested it though, just make check runs fine here...

  Yes, that works. But before you do, could you please e.g. add URL of this
discussion to the commit message? "unintended hilarity" is a rather poor
problem description.

... unfortunately it's too late to add anything to the commit message as 
the patch somehow reviewed and pushed itself.

well, anybody who knows what a gloriously misguided idea the ELF global 
namespace is can think of any number of problems that would be fixed by 
the patch :)
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.