libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tru64/OSF cc and -input


From: Ralf Wildenhues
Subject: Tru64/OSF cc and -input
Date: Wed, 14 Feb 2007 19:55:28 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Tru64/OSF and with cc, $archive_expsym_cmds uses $LD and -input
in branch-1-5.  On HEAD, we switched to using $CC for linking, but
cc does not understand -input right:

| libtool: link:  cc -shared -input .libs/libfoo2.so.0.0.0.exp     .libs/foo2.o
| -lm ./.libs/libsub.so -soname libfoo2.so.0 `test -n "0.0.0:0.0" && print -r 
"X-set_version 0.0.0:0.0" | /bin/sed -e 1s/^X//` -update_registry 
.libs/so_locations -o .libs/libfoo2.so.0.0.0
| ld:
| can't open input file '-soname'(No such file or directory)

The documentation I have lists -input_to_ld as equivalent, but I don't
see why we shouldn't just use `-Wl,-input -Wl,$lib.exp' like we do for
cxx.

So I'm applying the patch below.  It fixes mdemo-make after mdemo-conf
and mdemo-shared, as well as mdemo-dryrun test failures on OSF 4.0D.

Cheers,
Ralf

2007-02-14  Ralf Wildenhues  <address@hidden>

        * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [ osf4, osf5 ]
        <archive_expsym_cmds>: Use `${wl}-input' not `-input', for
        cc.  Could use `-input_to_ld'.
        (_LT_LANG_CXX_CONFIG) [ osf4, osf5 ] <archive_expsym_cmds>:
        Use `${wl}' instead of `-Wl,', for consistency.

Index: libltdl/m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.93
diff -u -r1.93 libtool.m4
--- libltdl/m4/libtool.m4       11 Feb 2007 16:22:42 -0000      1.93
+++ libltdl/m4/libtool.m4       14 Feb 2007 18:53:20 -0000
@@ -4758,7 +4758,7 @@
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} 
$libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" 
&& $ECHO "X-set_version $verstring" | $Xsed` -update_registry 
${output_objdir}/so_locations -o $lib'
        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do 
printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" 
"-hidden">> $lib.exp~
-       $CC -shared${allow_undefined_flag} -input $lib.exp $compiler_flags 
$libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version 
$verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM 
$lib.exp'
+       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp 
$compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && 
$ECHO "X-set_version $verstring" | $Xsed` -update_registry 
${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
        # Both c and cxx compiler support -rpath directly
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -5963,7 +5963,7 @@
                _LT_TAGVAR(archive_cmds, $1)='$CC 
-shared${allow_undefined_flag} $predep_objects $libobjs $deplibs 
$postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && 
$ECHO "X-set_version $verstring" | $Xsed` -update_registry 
${output_objdir}/so_locations -o $lib'
                _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat 
$export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
                  echo "-hidden">> $lib.exp~
-                 $CC -shared$allow_undefined_flag $predep_objects $libobjs 
$deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input 
-Wl,$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | 
$Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+                 $CC -shared$allow_undefined_flag $predep_objects $libobjs 
$deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input 
${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | 
$Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
                  $RM $lib.exp'
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
                ;;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]