[PATCH] D129142: [LLD][ELF] Drop duplicates from rpath
Stephan Bergmann via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 5 23:47:46 PDT 2022
sberg added a comment.
In D129142#3631741 <https://reviews.llvm.org/D129142#3631741>, @MaskRay wrote:
> I did not mean this behavior. I mean whether this complexity brings anything beneficial. I don't think the runtime behavior is affected.
> Put it another way: is this change necessary.
Ah. The way I came across this is that LibreOffice has some check to make sure that certain of its shared libraries on Linux have a DT_RUNPATH of exactly `$ORIGIN`. And one of its (bundled external) libraries, built through some libtool invocation, where the LibreOffice build system passes it some `LDFLAGS=-Wl,-rpath,$ORIGIN`, happened to end up with two such `-Wl,-rpath,$ORIGIN` on the libtool command line, so when built with lld had a DT_RUNPATH of `$ORIGIN:$ORIGIN`, so the check for exactly `$ORIGIN` failed.
So while this shouldn't affect runtime behavior of the resulting object, it was a divergence from GNU behavior that got in the way for me.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129142/new/
https://reviews.llvm.org/D129142
More information about the llvm-commits
mailing list