[PATCH] D30700: [Driver] Always add arch-specific-subdir to -rpath

Joerg Sonnenberger via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 14 17:14:19 PDT 2017

On Mon, Mar 13, 2017 at 10:37:41PM +0000, Reid Kleckner via Phabricator via cfe-commits wrote:
> I don't agree. If we want to be good citizens on Linux, what's supposed
> to happen is that we install our shared libraries into
> /usr/lib/${distro_target}, which is what GCC does with its shared
> compiler runtime libraries. GCC does not add system-specific absolute
> rpaths to the binaries it produces.

That only applies if you install into /usr directly. There are many use
cases for which this is not the case. GCC generally handles them abysmal
and I'd prefer if we didn't go that way. In short: if you can reasonably
expect the rtlib path to be part of the system default, no rpath is
necessary. Otherwise, the driver should add it and make it easy for
clang builds to provide them. A compile-time flag is fine that though.


More information about the cfe-commits mailing list