This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: New libtool is in the GCC and Src trees.
On Thu, 2007-05-24 at 22:25 -0700, Eric Christopher wrote:
> On May 24, 2007, at 10:17 PM, Peter O'Gorman wrote:
>
> > On Thu, 2007-05-24 at 22:14 -0700, Eric Christopher wrote:
> >>>
> >>> I added the ${wl} to libtool a couple of years ago when I added
> >>> support
> >>> for darwin xlc, I believe. It should not be failing though, the -Wl,
> >>> will pass the option through to /usr/bin/libtool, which understands
> >>> -compatibility_version et.al., not ld(1) which does not.
> >>>
> >>> Although gcc, even at the time, accepted the options, xlc did not.
> >>>
> >>> How does it fail?
> >>
> >> gcc no longer uses /usr/bin/libtool by default.
> >
> > Yay! :)
> >
>
> Yeah, I enjoyed putting that patch in :)
>
> > I'll patch libtool at the weekend.
>
> Sweet! Thanks!
This is the patch that I ended up applying to libtool, it works out as
being the equivalent of the patch that has already been applied to gcc.
It seems unnecessary (at least to me) to remove/change that simpler
patch.
Thanks,
Peter
Index: ChangeLog
===================================================================
RCS file: /sources/libtool/libtool/ChangeLog,v
retrieving revision 1.2461
diff -u -r1.2461 ChangeLog
--- ChangeLog 22 May 2007 12:07:05 -0000 1.2461
+++ ChangeLog 28 May 2007 07:01:12 -0000
@@ -1,3 +1,9 @@
+2007-05-28 Peter O'Gorman <peter@pogma.com>
+
+ * libltdl/config/ltmain.m4sh (func_mode_link),
+ libltdl/m4/libtool.m4 [darwin]: Only use ${wl} in verstring
+ with xlc.
+
2007-05-22 Gary V. Vaughan <gary@gnu.org>
* tests/lt_dladvise.at: Use the lib prefix throughout for
Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /sources/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.75
diff -u -r1.75 ltmain.m4sh
--- libltdl/config/ltmain.m4sh 3 May 2007 18:07:28 -0000 1.75
+++ libltdl/config/ltmain.m4sh 28 May 2007 07:01:12 -0000
@@ -4965,7 +4965,8 @@
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
- verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
freebsd-aout)
Index: libltdl/m4/libtool.m4
===================================================================
RCS file: /sources/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.102
diff -u -r1.102 libtool.m4
--- libltdl/m4/libtool.m4 29 Mar 2007 22:24:31 -0000 1.102
+++ libltdl/m4/libtool.m4 28 May 2007 07:01:14 -0000
@@ -4529,10 +4529,10 @@
case $cc_basename in
xlc*)
output_verbose_link_cmd=echo
- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $xlcverstring'
_LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -5541,11 +5541,11 @@
case $cc_basename in
xlc*)
output_verbose_link_cmd=echo
- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO "$rpath/$soname"` $verstring'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO "$rpath/$soname"` $xlcverstring'
_LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag,
# it doesn't exist in older darwin lds
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)