]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
*** empty log message ***
authorGordon Matzigkeit <gord@gnu.ai.mit.edu>
Thu, 24 Jul 1997 19:00:16 +0000 (19:00 +0000)
committerGordon Matzigkeit <gord@gnu.org>
Thu, 24 Jul 1997 19:00:16 +0000 (19:00 +0000)
ChangeLog
configure.in
demo/dlmain.c
doc/libtool.texi
ltconfig.in
ltmain.sh.in
tests/ChangeLog
tests/demo-exec.test

index 98f4c3b13528c402fc88e449f799d4251a3c620d..af1a533514581515687ea54d36212e95ce0c2024 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+Thu Jul 24 10:42:30 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * ltmain.sh.in, ltconfig.in (export_dynamic_flag_spec): Renamed
+       from export_dynamic_flag because we eval it in ltmain.sh.
+
+       * ltmain.sh.in (link_static): Don't eval link_static_flag.
+
+       * demo/dlmain.c (main): Change function prototype to be KNR
+       compatible.  From Kaveh R. Ghazi.
+
+       * ltmain.sh.in (link): Use no_builtin_flag.  This works around
+       conflicting definitions of builtin functions with at least GCC.
+       Reported by Kazuhiro Sasayama.
+
+       * ltconfig.in (no_builtin_flag): New flag to turn off builtin
+       functions when compiling an object file.
+       (pipe_works): Use it.
+
 Wed Jul 23 08:18:19 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
        * ltconfig.in (pic_flag): According to the libg++ 2.7.2 configure
index d6ab96078347ccc58d96d7bbf554fb8d246d0fbb..077743c4bbb2fd3925ea865f51df036b4767e520 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to create configure.
 AC_INIT(ltmain.sh.in)
-AM_INIT_AUTOMAKE(libtool,1.0a)
+AM_INIT_AUTOMAKE(libtool,1.0b)
 
 pkgdatadir='${datadir}/libtool'
 AC_SUBST(pkgdatadir)
index e724e38036996a3f6462c224c8a46700475fb4b2..f52d5def162d22eae74457f0d4938162c3802fd6 100644 (file)
@@ -30,7 +30,9 @@ struct dld_symlist
 extern struct dld_symlist dld_preloaded_symbols[];
 
 int
-main (int argc, char **argv)
+main (argc, argv)
+     int argc;
+     char **argv;
 {
   struct dld_symlist *s;
   int (*pfoo)() = 0;
index b26a076b195803b54fdaa1df6a7a11c7296c9465..e620a1386a44d71cf6b3d8c0af6f616df817aa69 100644 (file)
@@ -2478,7 +2478,7 @@ Whether libtool should build static libraries on this system.  Set to
 @samp{yes} or @samp{no}.
 @end defvar
 
-@defvar export_dynamic_flag
+@defvar export_dynamic_flag_spec
 Compiler link flag that allows a dlopened shared library to reference
 symbols that are defined in the program.
 @end defvar
@@ -2562,6 +2562,11 @@ Linker flag (passed through the C compiler) used to prevent dynamic
 linking.
 @end defvar
 
+@defvar no_builtin_flag
+Compiler flag to disable builtin functions that conflict with declaring
+external global symbols as @code{char}.
+@end defvar
+
 @defvar pic_flag
 Any additional compiler flags for building library object files.
 @end defvar
index e7adadd8f2caf738747553e1e6b85456de6f56ed..2271e490442a0df24229be6c7d88b5633abff976 100755 (executable)
@@ -377,7 +377,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
 #endif
 EOF
   # LINENO
-  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     with_gcc=yes
   fi
   $rm conftest.c
@@ -394,12 +394,14 @@ profile_flag_pattern=
 special_shlib_compile_flags=
 wl=
 link_static_flag=
+no_builtin_flag=
 
 if test "$with_gcc" = yes; then
   pic_flag='-fPIC'
   profile_flag_pattern='-pg?'
   wl='-Wl,'
   link_static_flag='-static'
+  no_builtin_flag=' -fno-builtin'
 else
   # PORTME Check for PIC flags for the system compiler.
   case "$host_os" in
@@ -477,36 +479,27 @@ if test -n "$special_shlib_compile_flags"; then
   fi
 fi
 
-# See if we are using a broken GCC collect2 program.
-if test "$with_gcc" = yes; then
-  echo $ac_n "checking for broken GCC collect2... $ac_c" 1>&6
-
-  # FIXME: Run a test here, instead of relying on the canonical system name.
-  case "$host_os" in
-  aix3*)
-    can_build_shared=no
-    echo $ac_t yes 1>&6
-    echo "$progname: to build shared libraries, set the CC env variable to \`xlc' and reconfigure" 1>&2
-    ;;
-  *)
-    echo $ac_t no 1>&6
-    ;;
-  esac
-fi
-
 echo $ac_n "checking for $compiler option to statically link programs... $ac_c" 1>&6
-if test -n "$link_static_flag"; then
+$rm conftest*
+echo 'main(){return(0);}' > conftest.c
+save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $link_static_flag"
+# LINENO
+if { (eval echo $progname:488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   echo $ac_t "$link_static_flag" 1>&6
 else
   echo $ac_t none 1>&6
+  link_static_flag=
 fi
+LDFLAGS="$save_LDFLAGS"
+$rm conftest*
 
 if test -z "$LN_S"; then
   # Check to see if we can use ln -s, or we need hard links.
   echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
-  rm -f conftestdata
+  $rm conftestdata
   if ln -s X conftestdata 2>/dev/null; then
-    rm -f conftestdata
+    $rm conftestdata
     LN_S="ln -s"
   else
     LN_S=ln
@@ -568,7 +561,7 @@ echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c
 
 allow_undefined_flag=
 archive_cmds=
-export_dynamic_flag=
+export_dynamic_flag_spec=
 hardcode_libdir_flag_spec=
 hardcode_libdir_separator=
 hardcode_direct=no
@@ -602,7 +595,7 @@ if test "$with_gnu_ld" = yes; then
   if test "$ld_shlibs" = yes; then
     archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs$deplibs'
     hardcode_libdir_flag_spec='${wl}-rpath $wl$libdir'
-    export_dynamic_flag='${wl}-export-dynamic'
+    export_dynamic_flag_spec='${wl}-export-dynamic'
   fi
 else
   # PORTME fill in a description of your system's linker (not GNU ld)
@@ -613,6 +606,10 @@ else
     # Note: this linker hardcodes the directories in LIBPATH if there
     # are no directories specified by -L.
     hardcode_minus_L=yes
+    # Direct hardcoding is not supported with a broken collect2.
+    if test "$with_gcc" = yes && test -n "$link_static_flag"; then
+      hardcode_direct=unsupported
+    fi
     ;;
 
   aix4*)
@@ -763,7 +760,7 @@ fi
 
 # Check to see that the pipe works correctly.
 pipe_works=no
-rm -f conftest*
+$rm conftest*
 cat > conftest.c <<EOF
 char nm_test_var;
 void nm_test_func(){}
@@ -771,9 +768,9 @@ main(){nm_test_var='a';nm_test_func();return(0);}
 EOF
 
 # LINENO
-if { (eval echo $progname:751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
-  # Now try to grab the symbols.
-  if { echo "$progname:752: eval \"$NM conftest.o | $global_symbol_pipe > conftest.nm\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > conftest.nm 2>&5"; } && test -s conftest.nm; then
+if { (eval echo $progname:771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
+  # Now try to grab the symbols. LINENO
+  if { echo "$progname:773: eval \"$NM conftest.o | $global_symbol_pipe > conftest.nm\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > conftest.nm 2>&5"; } && test -s conftest.nm; then
 
     # Try sorting and uniquifying the output.
     sort conftest.nm | uniq > conftest.nmT && mv -f conftest.nmT conftest.nm
@@ -806,8 +803,11 @@ EOF
         # Now try linking the two files.
         mv conftest.o conftestm.o
        save_LIBS="$LIBS"
+       save_CFLAGS="$CFLAGS"
         LIBS='conftestm.o'
-        if { (eval echo configure:807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+       CFLAGS="$CFLAGS$no_builtin_flag"
+        # LINENO
+        if { (eval echo $progname:810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
           pipe_works=yes
         else
           echo "$progname: failed program was:" >&5
@@ -825,7 +825,7 @@ else
   echo "$progname: failed program was:" >&5
   cat conftest.c >&5
 fi
-rm -f conftest*
+$rm conftest*
 
 # Don't use the global_symbol_pipe unless it works.
 echo "$ac_t$pipe_works" 1>&6
@@ -1037,7 +1037,7 @@ echo "checking whether to build static libraries... $enable_static" 1>&6
 ofile=libtool
 trap "$rm $ofile; exit 1" 1 2 15
 echo creating $ofile
-rm -fr $ofile
+$rm $ofile
 cat <<EOF > $ofile
 #! /bin/sh
 
@@ -1095,8 +1095,11 @@ pic_flag='$pic_flag'
 # Compiler flag to prevent dynamic linking.
 link_static_flag='$link_static_flag'
 
+# Compiler flag to turn off builtin functions.
+no_builtin_flag='$no_builtin_flag'
+
 # Compiler flag to allow reflexive dlopens.
-export_dynamic_flag='$export_dynamic_flag'
+export_dynamic_flag_spec='$export_dynamic_flag_spec'
 
 # Pattern to match compiler flags for creating libNAME_p libraries:
 profile_flag_pattern='$profile_flag_pattern'
index 36369fe3b417c7304309b508dc3feee65191b724..92327a51481bb65ff66cc9dbd87a4a0b67e89cfe 100644 (file)
@@ -370,8 +370,8 @@ if test -z "$show_help"; then
       -export-dynamic)
        if test "$export_dynamic" != yes; then
          export_dynamic=yes
-         compile_command="$compile_command "`eval echo "$export_dynamic_flag"`
-         finalize_command="$finalize_command "`eval echo "$export_dynamic_flag"`
+         compile_command="$compile_command "`eval echo "$export_dynamic_flag_spec"`
+         finalize_command="$finalize_command "`eval echo "$export_dynamic_flag_spec"`
          # Add the symbol object into the linking commands.
          compile_command="$compile_command @SYMFILE@"
          finalize_command="$finalize_command @SYMFILE@"
@@ -833,7 +833,7 @@ if test -z "$show_help"; then
        # Create links to the real library.
        for link in $linknames; do
          $show "(cd $objdir && $LN_S $realname $link)"
-         $run eval "(cd $objdir && $LN_S $realname $link)" || exit $?
+         $run eval '(cd $objdir && $LN_S $realname $link)' || exit $?
        done
 
        # If -export-dynamic was specified, set the dlname.
@@ -1009,8 +1009,8 @@ EOF
        $run rm -f "$nlist" "$nlist"T
 
        # Now compile the dynamic symbol file.
-       $show "(cd $objdir && $CC -c '${output}S.c')"
-       $run eval "(cd $objdir && $CC -c '${output}S.c')" || exit $?
+       $show "(cd $objdir && $CC -c$no_builtin_flag \"${output}S.c\")"
+       $run eval '(cd $objdir && $CC -c$no_builtin_flag "${output}S.c")' || exit $?
 
        # Transform the symbol file into the correct name.
        compile_command=`echo "$compile_command" | sed "s%@SYMFILE@%$objdir/${output}S.o%"`
index 92c9e2ca3796547b27dc4536e247cb47f1bf503d..90b5e8c0f8f491fa609e2dcaa6ae0c83f30ec359 100644 (file)
@@ -1,3 +1,8 @@
+Thu Jul 24 11:04:22 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * demo-exec.test (status): Use status variables so that we try to
+       execute all the programs.
+
 Sat Jul 12 15:38:25 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
        * demo-exec.test, demo-inst.test: Check the new helldl program,
index 2a224776b43ea22d45916e51e0b41c84cdffb24c..247a12d0a0b6c5107694737a3cafcce13af33b90 100755 (executable)
@@ -19,22 +19,23 @@ fi
 # Check to see if the programs really run.
 echo "Executing uninstalled programs in ../demo"
 
+status=0
 if ../demo/hell.static | grep 'Welcome to GNU Hell'; then :
 else
   echo "$0: cannot execute ../demo/hell.static" 1>&2
-  exit 1
+  status=1
 fi
 
 if ../demo/hell | grep 'Welcome to GNU Hell'; then :
 else
   echo "$0: cannot execute ../demo/hell" 1>&2
-  exit 1
+  status=1
 fi
 
 if ../demo/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then :
 else
   echo "$0: cannot execute ../demo/helldl" 1>&2
-  exit 1
+  status=1
 fi
 
-exit 0
+exit $status