Don't write redundant RPATH entries #39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Libtool can be told what the library search paths are, so it knows not to write RPATHs for those directories. This can be done via setting the
lt_cv_sys_lib_dlsearch_path_specenvironment variable to a space-separated list of directories. Real example from OpenEmbedded:This ensures that no matter what
libdiris set to, only the important RPATHs are set.Not opposed to supporting that, but first we need to sort out a few minor issues:
is space indeed the path separator? that's a bit surprising, I would have expected a colon between the two variables.
as a policy, slibtool does not rely on environment variables, but here are a few alternatives that come to mind, and which could be used alongside one another:
--system-dlsearch-path=...if provided from the command line, use that argument value.--sysroot-relative configuration: which should work nicely for both native builds and cross-compilation. Given--sysroot=/path/to/sysroot, and with--hostbeing either detected or provided, look for/path/to/sysroot/etc/slibtool/[$HOST].confand get the default library search path from there.--hostcfg=...<== similar to the above, but overriding the default path for the configuration file.Now that we have a working slibtool.m4, it would probably be beneficial to include some
LTFLAGSof sorts in its logic. This will result in Makefile having something likeLIBTOOL = dlibtool $(LTFLAGS)--system-dlsearch-path=seems like the solution with the least amount of magic to go wrong. Colon-separated list?--system-dlsearch-path=is certainly going to be the first to be implemented; and yes, just colon-separated lists please, that's how PATH and related environment variables work, and arguably the only safe way to go about things.