[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Use cc to create shared libraries on Solaris
From: |
Albert Chin |
Subject: |
Use cc to create shared libraries on Solaris |
Date: |
Sat, 17 Apr 2004 11:35:36 -0500 |
User-agent: |
Mutt/1.5.6i |
Against HEAD.
--
albert chin (address@hidden)
-- snip snip
2004-04-16 Albert Chin-A-Young <address@hidden>
* m4/libtool.m4: Use cc rather than ld to create a
shared library on Solaris. When using the Sun
Workshop compiler 5.0 (and I presume any previous
version), revert to ld due to compiler errors.
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.62
diff -u -3 -p -r1.62 libtool.m4
--- m4/libtool.m4 15 Apr 2004 17:05:26 -0000 1.62
+++ m4/libtool.m4 16 Apr 2004 16:31:00 -0000
@@ -4046,9 +4064,18 @@ _LT_EOF
_LT_AC_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'
else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h
$soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" >
$lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo
"local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs
$deplibs $linker_flags~$rm $lib.exp'
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h
$soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" >
$lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo
"local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs
$deplibs $linker_flags~$rm $lib.exp'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h
$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" >
$lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo
"local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs
$deplibs $compiler_flags~$rm $lib.exp'
+ ;;
+ esac
fi
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Use cc to create shared libraries on Solaris,
Albert Chin <=