libtool-patches
[Top][All Lists]
Advanced

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

[FYI] Re: Darwin issue?


From: Peter O'Gorman
Subject: [FYI] Re: Darwin issue?
Date: Mon, 28 May 2007 02:05:08 -0500

On Fri, 2007-05-25 at 00:13 -0500, Peter O'Gorman wrote:
> On Fri, 2007-05-25 at 00:00 -0400, Charles Wilson wrote:
> > Gcc just imported libtool from CVS HEAD today (well, actually, from CVS 
> > HEAD as of 2007-03-18, but who's counting?).  Almost immediately, there 
> > was a bug report from a Darwin user and a patch for ltmain.sh.
> > 
> > Could somebody with more knowledge about Darwin than me ( == 0.000001 ) 
> > pleas take a look a this thread:
> > 
> > http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01644.html
> > 
> > It has something to do with old darwin gcc wanting ${wl} while newer (as 
> > in, in-gcc-build-tree) ones do not. (?)
> 
> Thanks,
> I am following it up. Should be harmless to remove ${wl} (and support
> for xlc while we are at it), but I am hoping to find out how it fails,
> maybe we can keep xlc support for older macs, and have a working
> solution for gcc.

Rather than killing support for xlc, I found a way to keep it.

Applied these to branch-1-5 and HEAD.

Peter

Index: ChangeLog
===================================================================
RCS file: /sources/libtool/libtool/ChangeLog,v
retrieving revision 1.1220.2.448
diff -u -r1.1220.2.448 ChangeLog
--- ChangeLog   3 May 2007 18:02:59 -0000       1.1220.2.448
+++ ChangeLog   28 May 2007 06:56:33 -0000
@@ -1,3 +1,8 @@
+2007-05-28  Peter O'Gorman  <address@hidden>
+
+       * ltmain.in, libtool.m4 [darwin]: Only use ${wl} in verstring
+       with xlc.
+
 2007-05-03  Reuben Thomas  <address@hidden>  (tiny change)
 
        * doc/libtool.texi (Libltdl interface): Fix typo.
Index: libtool.m4
===================================================================
RCS file: /sources/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.176
diff -u -r1.314.2.176 libtool.m4
--- libtool.m4  29 Mar 2007 22:25:12 -0000      1.314.2.176
+++ libtool.m4  28 May 2007 06:56:34 -0000
@@ -3123,10 +3123,10 @@
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-          _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "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_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "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_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "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}'
           ;;
        *)
@@ -6003,10 +6003,10 @@
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag 
-o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo 
$rpath/$soname` $verstring'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag 
-o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo 
$rpath/$soname` $xlcverstring'
          _LT_AC_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_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "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_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "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_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "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}'
           ;;
        *)
Index: ltmain.in
===================================================================
RCS file: /sources/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.140
diff -u -r1.334.2.140 ltmain.in
--- ltmain.in   10 Apr 2007 19:10:04 -0000      1.334.2.140
+++ ltmain.in   28 May 2007 06:56:35 -0000
@@ -3300,7 +3300,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: 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  <address@hidden>
+
+       * 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  <address@hidden>
 
        * 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}'
              ;;
            *)

reply via email to

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