FYI: On HP-UX 11.x, link with cc, not ld (sync with HEAD)

2005-11-13 Thread Ralf Wildenhues
Hi Albert,

* Albert Chin wrote on Sat, Nov 12, 2005 at 04:14:25PM CET:
> 
> Updated patch attached.

Thank you.  I have applied that to branch-1-5.

Cheers,
Ralf




Re: On HP-UX 11.x, link with cc, not ld (sync with HEAD)

2005-11-12 Thread Albert Chin
On Fri, Nov 11, 2005 at 05:52:20PM -0600, Albert Chin wrote:
> On Fri, Nov 11, 2005 at 10:36:08PM +0100, Ralf Wildenhues wrote:
> > > --- libtool.m410 Nov 2005 18:29:38 -  1.314.2.128
> > > +++ libtool.m411 Nov 2005 03:44:03 -
> > > @@ -5792,7 +5792,26 @@ EOF
> > >_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
> > >;;
> > >  
> > > -hpux10* | hpux11*)
> > > +hpux10*)
> > > +  if test "$GCC" = yes; then
> > 
> > HEAD has here:
> >   if test "$GCC" = yes -a "$with_gnu_ld" = no
> > 
> > oversight in your backport?
> > (In any case, I'll change the `-a' to `&& test' then, for consistency).
> 
> Yep. Anyway, GNU ld doesn't work on HP-UX.

Updated patch attached.

-- 
albert chin ([EMAIL PROTECTED])
Index: libtool.m4
===
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.131
diff -u -3 -p -r1.314.2.131 libtool.m4
--- libtool.m4  12 Nov 2005 11:54:40 -  1.314.2.131
+++ libtool.m4  12 Nov 2005 15:13:02 -
@@ -5798,7 +5798,26 @@ EOF
   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
   ;;
 
-hpux10* | hpux11*)
+hpux10*)
+  if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname 
${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+  else
+   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir 
-o $lib $libobjs $deplibs $linker_flags'
+  fi
+  if test "$with_gnu_ld" = no; then
+   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+   _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+   # hardcode_minus_L: Not really in the search PATH,
+   # but as the default location of the library.
+   _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+  fi
+  ;;
+
+hpux11*)
   if test "$GCC" = yes -a "$with_gnu_ld" = no; then
case $host_cpu in
hppa*64*|ia64*)
@@ -5811,10 +5830,10 @@ EOF
   else
case $host_cpu in
hppa*64*|ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs 
$deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib 
$libobjs $deplibs $compiler_flags'
  ;;
*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir 
-o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b 
${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  ;;
esac
   fi


Re: On HP-UX 11.x, link with cc, not ld (sync with HEAD)

2005-11-11 Thread Albert Chin
On Fri, Nov 11, 2005 at 10:36:08PM +0100, Ralf Wildenhues wrote:
> Hi Albert,
> 
> * Albert Chin wrote on Fri, Nov 11, 2005 at 04:48:48AM CET:
> > 
> > 2005-11-10  Albert Chin-A-Young  <[EMAIL PROTECTED]>
> > 
> > * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) [ hpux10 ]:
> > Link with cc rather than ld (backport from HEAD).
> 
> This patch is ok with one nit, see below.
> 
> Cheers,
> Ralf
> 
> > --- libtool.m4  10 Nov 2005 18:29:38 -  1.314.2.128
> > +++ libtool.m4  11 Nov 2005 03:44:03 -
> > @@ -5792,7 +5792,26 @@ EOF
> >_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
> >;;
> >  
> > -hpux10* | hpux11*)
> > +hpux10*)
> > +  if test "$GCC" = yes; then
> 
> HEAD has here:
>   if test "$GCC" = yes -a "$with_gnu_ld" = no
> 
> oversight in your backport?
> (In any case, I'll change the `-a' to `&& test' then, for consistency).

Yep. Anyway, GNU ld doesn't work on HP-UX.

Thanks.

-- 
albert chin ([EMAIL PROTECTED])




Re: On HP-UX 11.x, link with cc, not ld (sync with HEAD)

2005-11-11 Thread Ralf Wildenhues
Hi Albert,

* Albert Chin wrote on Fri, Nov 11, 2005 at 04:48:48AM CET:
> 
> 2005-11-10  Albert Chin-A-Young  <[EMAIL PROTECTED]>
> 
>   * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) [ hpux10 ]:
>   Link with cc rather than ld (backport from HEAD).

This patch is ok with one nit, see below.

Cheers,
Ralf

> --- libtool.m410 Nov 2005 18:29:38 -  1.314.2.128
> +++ libtool.m411 Nov 2005 03:44:03 -
> @@ -5792,7 +5792,26 @@ EOF
>_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
>;;
>  
> -hpux10* | hpux11*)
> +hpux10*)
> +  if test "$GCC" = yes; then

HEAD has here:
  if test "$GCC" = yes -a "$with_gnu_ld" = no

oversight in your backport?
(In any case, I'll change the `-a' to `&& test' then, for consistency).

> + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname 
> ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
> +  else
> + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir 
> -o $lib $libobjs $deplibs $linker_flags'
> +  fi
> +  if test "$with_gnu_ld" = no; then
*snip*




On HP-UX 11.x, link with cc, not ld (sync with HEAD)

2005-11-10 Thread Albert Chin
On HEAD, we link with cc rather than ld on HP-UX 11.x. Backport to
1.5. Dunno why I didn't do this long time ago when I submitted the cc
linking patches for Solaris, IRIX, etc.

2005-11-10  Albert Chin-A-Young  <[EMAIL PROTECTED]>

* libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) [ hpux10 ]:
Link with cc rather than ld (backport from HEAD).

-- 
albert chin ([EMAIL PROTECTED])
Index: libtool.m4
===
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.128
diff -u -3 -p -r1.314.2.128 libtool.m4
--- libtool.m4  10 Nov 2005 18:29:38 -  1.314.2.128
+++ libtool.m4  11 Nov 2005 03:44:03 -
@@ -5792,7 +5792,26 @@ EOF
   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
   ;;
 
-hpux10* | hpux11*)
+hpux10*)
+  if test "$GCC" = yes; then
+   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname 
${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+  else
+   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir 
-o $lib $libobjs $deplibs $linker_flags'
+  fi
+  if test "$with_gnu_ld" = no; then
+   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+   _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+   # hardcode_minus_L: Not really in the search PATH,
+   # but as the default location of the library.
+   _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+  fi
+  ;;
+
+hpux11*)
   if test "$GCC" = yes -a "$with_gnu_ld" = no; then
case $host_cpu in
hppa*64*|ia64*)
@@ -5805,10 +5824,10 @@ EOF
   else
case $host_cpu in
hppa*64*|ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs 
$deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib 
$libobjs $deplibs $compiler_flags'
  ;;
*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir 
-o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b 
${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  ;;
esac
   fi