(unknown)
Ileana Dumitrescu <[email protected]> Wed, 3 Jun 2026 13:45:16 -0400 (EDT)
| Newsgroups | gmane.comp.gnu.libtool.cvs |
|---|---|
| Message-ID | <[email protected]> |
branch: master commit 1ae6943b5177ce8d93d09a34f45ff84b07bf8125 Author: Alexandre Janniaux <[email protected]> AuthorDate: Fri Apr 2 13:14:41 2021 +0200 ltmain.in: defer warn dependency to static library When linking old library to any libtool target that is not an executable, libtool warns that it might not be portable, in particular because shared libraries need PIC from the static library to be working. However, when adding an old library as dependency to a static libtool library, there is no linkage, and thus no portability issue, so there's no reason to warn. If the static libtool library is then linked to a shared library, the dependency will be forwarded and the warning will happen at this time. Reported: https://savannah.gnu.org/patch/?10569 --- build-aux/ltmain.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in index 7947a3bf..e874b44a 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in @@ -6246,7 +6246,9 @@ func_mode_link () ;; esac if $valid_a_lib; then - func_warning "Linking the shared library $output against the static library $deplib is not portable!" + if test yes != "$build_old_libs"; then + func_warning "Linking the shared library $output against the static library $deplib is not portable!" + fi deplibs="$deplib $deplibs" else func_warning "Trying to link with static lib archive $deplib."