From: Gordon Matzigkeit Date: Fri, 5 Sep 1997 19:13:09 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: release-1-0c~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=851f5d29f678490f554b692bd101e4fc2de9d001;p=thirdparty%2Flibtool.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 3478afd4b..ae7afba92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Fri Sep 5 13:11:38 1997 Gordon Matzigkeit + + * ltconfig.in (with_gnu_ld): Add a test to make sure that we are + actually using GNU ld. This fixes an inconsistency when running + ltconfig without using libtool.m4. Reported by Ulrich Drepper. + +Thu Sep 4 21:53:08 1997 Gordon Matzigkeit + + * ltmain.sh.in (echo): Quote all the uses of `echo' in all eval + statements. + Thu Aug 28 20:58:56 1997 Gordon Matzigkeit * ltmain.sh.in (echo): Change test to one that uses printf. diff --git a/README-alpha b/README-alpha index e964d20bf..fb1a5788d 100644 --- a/README-alpha +++ b/README-alpha @@ -3,3 +3,58 @@ This is an alpha testing release of GNU libtool. Please do not send any bug reports or questions about it to public forums (such as GNU newsgroups), send them directly to the libtool mailing list . + +CALL FOR HELP: In order to implement dlopening even on archictectures +that don't have shared libraries, I am collecting `NM' and +`global_symbol_pipe' values for every known operating system. + +If ltconfig on your system says that it found the command to parse NM +output, then you don't need to look any further: + +checking command to parse NM output... yes + +Otherwise, I would very much appreciate hearing about the combination +of `NM' and `global_symbol_pipe' that ltconfig needs to use in order +to pass this test. + +`NM' is set by ltconfig to be an nm program that gives BSD-compatible +symbol output, such as: + +$ nm assert-perr.o + U _IO_stderr_ +00000000 T __assert_perror_fail + U __assert_program_name + U abort + U fflush + U fprintf + U strerror + +If your OS's nm cannot produce output like this, that's still okay, +but, for simplicity, I prefer using this kind of output. + +Then, global_symbol_pipe is a command that takes all exported symbols, +including undefined ones, and produces a two-column list of them. The +contents of the first column are the raw symbol name, and the second +column contains the name needed to access the symbols from a C +program. + +So, on most OSes, this will be a command like: +$ nm assert-perr.o | \ + sed -e '/^.* [BCDEGRSTU] /!d' -e 's/^.* [BCDEGRSTU] \(.*\)$/\1 \1/' +_IO_stderr_ _IO_stderr_ +__assert_perror_fail __assert_perror_fail +__assert_program_name __assert_program_name +abort abort +fflush fflush +fprintf fprintf +strerror strerror + +On some OSes, the C symbols will need to strip a leading underscore: + +__IO_stderr_ _IO_stderr_ +___assert_perror_fail __assert_perror_fail +___assert_program_name __assert_program_name +_abort abort +_fflush fflush +_fprintf fprintf +_strerror strerror diff --git a/libtool.m4 b/libtool.m4 index 02a18ea25..4e3d1e7ce 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -21,7 +21,7 @@ ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. -# serial 11 AM_PROG_LIBTOOL +# serial 12 AM_PROG_LIBTOOL AC_DEFUN(AM_PROG_LIBTOOL, [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_RANLIB]) @@ -155,9 +155,9 @@ AM_PROG_LD_GNU ]) AC_DEFUN(AM_PROG_LD_GNU, -[AC_CACHE_CHECK([whether we are using GNU ld], ac_cv_prog_gnu_ld, +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 /dev/null; then +if $LD -v 2>&1 &5; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no diff --git a/ltconfig.in b/ltconfig.in index 993acda14..49286576b 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -610,6 +610,16 @@ case "$LD" in ;; esac +# Check to see if it really is or isn't GNU ld. +echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 +# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + with_gnu_ld=yes +else + with_gnu_ld=no +fi +echo $ac_t "$with_gnu_ld" 1>&6 + # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 diff --git a/ltmain.sh.in b/ltmain.sh.in index 69effa303..3b5290e2f 100644 --- a/ltmain.sh.in +++ b/ltmain.sh.in @@ -30,7 +30,7 @@ else # echo "$something" | sed 's/\\/\\\\/g' # So, we emulate echo with printf '%s\n' echo='printf %s\n' - if test X`$echo '\t'` = 'X\t'; then : + if test "X`$echo '\t'`" = 'X\t'; then : else # Oops. We have no working printf. Try to find a not-so-buggy echo. echo=echo @@ -38,7 +38,7 @@ else save_PATH="$PATH" PATH="$PATH":/usr/ucb for dir in $PATH; do - if test -f $dir/echo && test X`$dir/echo '\t'` = 'X\t'; then + if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then echo="$dir/echo" break fi @@ -368,7 +368,7 @@ if test -z "$show_help"; then # link it into a program. if test "$build_libtool_libs" != yes; then $show "$echo timestamp > $libobj" - $run eval "$echo timestamp > \$libobj" || exit $? + $run eval "\$echo timestamp > \$libobj" || exit $? fi exit 0 @@ -471,7 +471,7 @@ if test -z "$show_help"; then -export-dynamic) if test "$export_dynamic" != yes; then export_dynamic=yes - arg=`eval $echo "$export_dynamic_flag_spec"` + arg=`eval \$echo "$export_dynamic_flag_spec"` # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" @@ -647,7 +647,7 @@ if test -z "$show_help"; then fi if test -n "$libdir"; then - flag=`eval $echo \"$hardcode_libdir_flag_spec\"` + flag=`eval \$echo \"$hardcode_libdir_flag_spec\"` compile_command="$compile_command $flag" finalize_command="$finalize_command $flag" @@ -922,13 +922,13 @@ if test -z "$show_help"; then if test "$build_libtool_libs" = yes; then # Get the real and link names of the library. - library_names=`eval $echo \"$library_names_spec\"` + library_names=`eval \$echo \"$library_names_spec\"` set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then - soname=`eval $echo \"$soname_spec\"` + soname=`eval \$echo \"$soname_spec\"` else soname="$realname" fi @@ -944,7 +944,7 @@ if test -z "$show_help"; then test -z "$pic_flag" && libobjs=`$echo "$libobjs " | sed -e 's/\.lo /.o /g' -e 's/ $//g'` # Do each of the archive commands. - cmds=`eval $echo \"$archive_cmds\"` + cmds=`eval \$echo \"$archive_cmds\"` IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" @@ -1014,7 +1014,7 @@ if test -z "$show_help"; then reload_objs="$objs"`$echo "$libobjs " | sed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` output="$obj" - cmds=`eval $echo \"$reload_cmds\"` + cmds=`eval \$echo \"$reload_cmds\"` IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" @@ -1030,7 +1030,7 @@ if test -z "$show_help"; then # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. $show "$echo timestamp > $libobj" - $run eval "$echo timestamp > $libobj" || exit $? + $run eval "\$echo timestamp > $libobj" || exit $? exit 0 fi @@ -1038,7 +1038,7 @@ if test -z "$show_help"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs" output="$libobj" - cmds=`eval $echo \"$reload_cmds\"` + cmds=`eval \$echo \"$reload_cmds\"` IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" @@ -1371,7 +1371,7 @@ EOF fi # Do each command in the archive commands. - cmds=`eval $echo \"$old_archive_cmds\"` + cmds=`eval \$echo \"$old_archive_cmds\"` IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" @@ -1645,7 +1645,7 @@ EOF # Do each command in the postinstall commands. lib="$destdir/$realname" - cmds=`eval $echo \"$postinstall_cmds\"` + cmds=`eval \$echo \"$postinstall_cmds\"` IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" @@ -1792,7 +1792,7 @@ EOF fi # Do each command in the postinstall commands. - cmds=`eval $echo \"$old_postinstall_cmds\"` + cmds=`eval \$echo \"$old_postinstall_cmds\"` IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" @@ -1829,7 +1829,7 @@ EOF for libdir in $libdirs; do # Do each command in the postinstall commands. - cmds=`eval $echo \"$finish_cmds\"` + cmds=`eval \$echo \"$finish_cmds\"` IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" @@ -1971,7 +1971,7 @@ EOF exit 1 else # Display what would be done. - eval "$echo \"\$shlibpath_var=\$$shlibpath_var\"" + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" $echo "$cmd$args" exit 0