]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: Remove test_compile
authorIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Mon, 8 Apr 2024 19:34:19 +0000 (22:34 +0300)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Mon, 8 Apr 2024 19:34:19 +0000 (22:34 +0300)
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
doc/libtool.texi
m4/libtool.m4

index c1d28856c7f4330f7a57c78a84db97f8b875af79..090a4fe8ad1af333e3fdf961c01e07982cbf9e2e 100644 (file)
@@ -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 \(.*\)"`
index 664e5495f3cc9603449f09875fb6c8ef27bf5f92..aabc495ab3fa5d644c607b5f6cb69b1c96abf7d4 100644 (file)
@@ -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
index 66b12b5a597fc0cfbb863b2545b88a05b94df995..6a2f419a766af68bff799c6cb834ebb347600ecd 100644 (file)
@@ -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