branch: master
commit 88fc2b892c61f6ef57decc55abe03ec6734f27ec
Author: Ileana Dumitrescu <[email protected]>
AuthorDate: Mon Apr 8 22:34:19 2024 +0300
libtool: Remove test_compile
This is cleanup for libtool. The option test_compile is not used in
libtool, and the documentation states that it would probably be dropped
in the future.
* build-aux/ltmain.in: Remove case statement for test_compile.
* doc/libtool.texi: Remove test_compile from documentation.
* m4/libtool.m4: Remove test_compile definition from macro file.
---
build-aux/ltmain.in | 102 ----------------------------------------------------
doc/libtool.texi | 7 ----
m4/libtool.m4 | 1 -
3 files changed, 110 deletions(-)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index c1d28856..090a4fe8 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -7314,108 +7314,6 @@ func_mode_link ()
# implementing what was already the behavior.
newdeplibs=$deplibs
;;
- test_compile)
- # This code stresses the "libraries are programs" paradigm to its
- # limits. Maybe even breaks it. We compile a program, linking it
- # against the deplibs as a proxy for the library. Then we can check
- # whether they linked in statically or dynamically with ldd.
- $opt_dry_run || $RM conftest.c
- cat > conftest.c <<EOF
- int main() { return 0; }
-EOF
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
- ldd_output=`ldd conftest`
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
- case " $predeps $postdeps " in
- *" $i "*)
- func_append newdeplibs " $i"
- i=
- ;;
- esac
- fi
- if test -n "$i"; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
- func_append newdeplibs " $i"
- else
- droppeddeps=yes
- echo
- $ECHO "*** Warning: dynamic linker does not accept needed
library $i."
- echo "*** I have the capability to make that library
automatically link in when"
- echo "*** you link to this library. But I can only do this
if you have a"
- echo "*** shared version of the library, which I believe
you do not have"
- echo "*** because a test_compile did reveal that the linker
did not use it for"
- echo "*** its dynamic dependency list that programs get
resolved with at runtime."
- fi
- fi
- ;;
- *)
- func_append newdeplibs " $i"
- ;;
- esac
- done
- else
- # Error occurred in the first compile. Let's try to salvage
- # the situation: Compile a separate program for each library.
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
- ldd_output=`ldd conftest`
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
- case " $predeps $postdeps " in
- *" $i "*)
- func_append newdeplibs " $i"
- i=
- ;;
- esac
- fi
- if test -n "$i"; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
- func_append newdeplibs " $i"
- else
- droppeddeps=yes
- echo
- $ECHO "*** Warning: dynamic linker does not accept needed
library $i."
- echo "*** I have the capability to make that library
automatically link in when"
- echo "*** you link to this library. But I can only do
this if you have a"
- echo "*** shared version of the library, which you do not
appear to have"
- echo "*** because a test_compile did reveal that the
linker did not use this one"
- echo "*** as a dynamic dependency that programs can get
resolved with at runtime."
- fi
- fi
- else
- droppeddeps=yes
- echo
- $ECHO "*** Warning! Library $i is needed by this library but
I was not able to"
- echo "*** make it link in! You will probably need to install
it or some"
- echo "*** library that it depends on before this library will
be fully"
- echo "*** functional. Installing it before continuing would
be even better."
- fi
- ;;
- *)
- func_append newdeplibs " $i"
- ;;
- esac
- done
- fi
- ;;
file_magic*)
set dummy $deplibs_check_method; shift
file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 664e5495..aabc495a 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -5516,13 +5516,6 @@ for a match against the extended regular expression
@var{regex}. When
argument to @samp{$file_magic_cmd} to verify whether the
regular expression matches its output, and warn the user otherwise.
-@item test_compile
-@vindex test_compile
-just checks whether it is possible to link a program out of a list of
-libraries, and checks which of those are listed in the output of
-@code{ldd}. It is currently unused, and will probably be dropped in the
-future.
-
@item pass_all
@vindex pass_all
will pass everything without any checking. This may work on platforms
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 66b12b5a..6a2f419a 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -3452,7 +3452,6 @@ lt_cv_deplibs_check_method='unknown'
# 'none' -- dependencies not supported.
# 'unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
# that responds to the $file_magic_cmd with a given extended regex.
# If you have 'file' or equivalent on your system and you're not sure