]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* config/ltmain.m4sh (func_mode_link), tests/objectlist.test:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 22 Nov 2004 15:43:44 +0000 (15:43 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 22 Nov 2004 15:43:44 +0000 (15:43 +0000)
Make sure the argument to `-objectlist' may contain spaces.

ChangeLog
config/ltmain.m4sh
m4/libtool.m4
tests/demo-nopic.test
tests/objectlist.test

index 91abef979805ef7d18c36311b9c2cb8471d2e2de..d08df833c06e4b9d4319822d4131ddc5f578bb1e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-22  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+       * config/ltmain.m4sh (func_mode_link), tests/objectlist.test:
+       Make sure the argument to `-objectlist' may contain spaces.
+
 2004-11-19  Gary V. Vaughan  <gary@gnu.org>
 
        * config/m4general.m4sh, config/mailnotify.m4sh,
index dce013b25226b6176cd8a39e194d6c2f06af926d..79788a78659f56280dfe25391aaac527bec4c996 100644 (file)
@@ -2292,7 +2292,7 @@ func_mode_link ()
          if test -f "$arg"; then
            save_arg=$arg
            moreargs=
-           for fil in `cat $save_arg`
+           for fil in `cat "$save_arg"`
            do
 #            moreargs="$moreargs $fil"
              arg=$fil
index 4240a5eb05c1f037903f26f3686f8747a2066aa6..744443fdc41f50e895546b430ab35aad3936ca55 100644 (file)
@@ -4120,11 +4120,11 @@ _LT_EOF
       ;;
 
     solaris*)
-      _LT_TAGVAR(no_undefined_flag, $1)=' -z text'
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
       if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -z text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
        _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$ECHO "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+         $CC -shared -z text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
        case `$CC -V 2>&1` in
        *"Compilers 5.0"*)
index 0aa901c5e2a1bea0dd05f05c64b99dd3abb2ed5b..c7133c3d6d8a8ad95ef9952613ebebc9f4ec15da 100755 (executable)
@@ -27,6 +27,9 @@ case "$host" in
 hppa*|x86_64*|s390*)
        func_skip "$host doesn't like non-PIC shared libs"
        ;;
+       *-solaris*|*-sunos*)
+       func_skip "libtool does not build non-PIC shared libs on $host_os"
+       ;;
 esac
 
 func_rmprefixdir
index 35325376ea209d9179ec312f240c973b01951bb3..9b471a885cb45704c3c50bb12fb7000962697c68 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # objectlist.test - make sure that a nonexisting objectlist file is
-# properly mentioned
+# properly mentioned and that the argument may contain spaces.
 
 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 linkresult=`$LIBTOOL -n --mode=link $CC -objectlist nonexistant 2>&1`
 test $? -eq 0 && exit $EXIT_FAILURE
 
-echo ".$linkresult."
 echo "$linkresult" | ${EGREP} "nonexistant" >/dev/null 2>&1 && {
   func_msg "$progname: error message contains -objectlist argument as expected"
-  exit $EXIT_SUCCESS
-}
+}  || exit $EXIT_FAILURE
 
-exit $EXIT_FAILURE
+
+objlist="object list with spaces"
+: > "$objlist"
+linkresult=`$LIBTOOL -n --mode=link $CC -o a.out -objectlist "$objlist" 2>&1`
+rm -f "$objlist"
+
+echo "$linkresult" | ${EGREP} "spaces" >/dev/null 2>&1 && {
+  func_msg "$progname: -objectlist with spaces in filename not recognized."
+  exit $EXIT_FAILURE
+} 
+
+exit $EXIT_SUCCESS