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_spec environment variable to a space-separated list of directories. Real example from OpenEmbedded:
lt_cv_sys_lib_dlsearch_path_spec
export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir}"
This ensures that no matter what libdir is set to, only the important RPATHs are set.
libdir
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=...
--sysroot
--sysroot=/path/to/sysroot
--host
/path/to/sysroot/etc/slibtool/[$HOST].conf
--hostcfg=...
Now that we have a working slibtool.m4, it would probably be beneficial to include some LTFLAGS of sorts in its logic. This will result in Makefile having something like LIBTOOL = dlibtool $(LTFLAGS)
LTFLAGS
LIBTOOL = dlibtool $(LTFLAGS)
1) Yes 2) --system-dlsearch-path= seems like the solution with the least amount of magic to go wrong. Colon-separated list?
--system-dlsearch-path=
2) --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.
Log in to comment on this ticket.