Re: Sync C++ linking on HEAD with branch-1-5

2005-11-10 Thread Ralf Wildenhues
Hi Albert,

* Albert Chin wrote on Thu, Nov 10, 2005 at 03:32:10AM CET:
> On Wed, Nov 09, 2005 at 08:23:05PM -0600, Albert Chin wrote:
> > On Wed, Nov 09, 2005 at 09:51:12PM +0100, Ralf Wildenhues wrote:
> > > * Albert Chin wrote on Wed, Nov 09, 2005 at 05:11:09PM CET:
> > > It's hpux10*|hpux11*, and hppa*64*|ia64*, and aCC|g++, right?
> > 
> > I can vouch for it on hpux11*, hppa*64*, and ia64*, for aCC and g++.
> > We don't have hpux10* to test it on.

> Actually, looking at my patch, it only changes it for hppa*64, ia64*.
> aCC, on these platforms, is always the correct method to link shared
> libraries.

Thanks for checking all this.  I have applied the patch to CVS HEAD and
branch-1-5, the latter shown below.

Cheers,
Ralf

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

* libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG) [ hpux10, hpux11 ]
:
Use C++ compiler for linking rather than ld.

Index: libtool.m4
===
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.127
diff -u -r1.314.2.127 libtool.m4
--- libtool.m4  9 Nov 2005 22:37:42 -   1.314.2.127
+++ libtool.m4  10 Nov 2005 18:28:21 -
@@ -3171,7 +3171,7 @@
   aCC*)
case $host_cpu in
hppa*64*|ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib 
$linker_flags $libobjs $deplibs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib 
$predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  ;;
*)
  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b 
${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects 
$compiler_flags'
@@ -3192,7 +3192,7 @@
  if test $with_gnu_ld = no; then
case $host_cpu in
ia64*|hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib 
$linker_flags $libobjs $deplibs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC 
${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects 
$compiler_flags'
  ;;
*)
  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC 
${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects 
$libobjs $deplibs $postdep_objects $compiler_flags'




Re: Sync C++ linking on HEAD with branch-1-5

2005-11-09 Thread Albert Chin
On Wed, Nov 09, 2005 at 08:23:05PM -0600, Albert Chin wrote:
> On Wed, Nov 09, 2005 at 09:51:12PM +0100, Ralf Wildenhues wrote:
> > * Albert Chin wrote on Wed, Nov 09, 2005 at 05:11:09PM CET:
> > It's hpux10*|hpux11*, and hppa*64*|ia64*, and aCC|g++, right?
> 
> I can vouch for it on hpux11*, hppa*64*, and ia64*, for aCC and g++.
> We don't have hpux10* to test it on.

Documentation for the old C++ compiler on HP (aCC):
  http://docs.hp.com/en/1314/options.htm

It documents use of '-b' to create a shared library:
  http://docs.hp.com/en/1314/options.htm#option-b

>From this documentation:
  CAUTION: You must use the aCC command to link your HP aC++ programs
  and libraries. This ensures that all libraries and other files needed
  by the linker are available.

This URL also documents using aCC to create shared libraries:
  http://docs.hp.com/en/1314/libs.htm#shlib

> Want me to factor out hpux10 like we did for the cc case?

Looks like this is not needed.

Actually, looking at my patch, it only changes it for hppa*64, ia64*.
aCC, on these platforms, is always the correct method to link shared
libraries.

-- 
albert chin ([EMAIL PROTECTED])




Re: Sync C++ linking on HEAD with branch-1-5

2005-11-09 Thread Albert Chin
On Wed, Nov 09, 2005 at 09:51:12PM +0100, Ralf Wildenhues wrote:
> * Albert Chin wrote on Wed, Nov 09, 2005 at 05:11:09PM CET:
> > When linking C++ libraries/programs, link with the compiler, not the
> > linker. Syncs with branch-1-5.
> 
> Erm, I can't see this in branch-1-5.

Oops. My fault. It isn't. I was looking at our patched version.

> It's hpux10*|hpux11*, and hppa*64*|ia64*, and aCC|g++, right?

I can vouch for it on hpux11*, hppa*64*, and ia64*, for aCC and g++.
We don't have hpux10* to test it on.

> Does something fail without the patch (what)?  Should I apply it to
> branch-1-5 as well?

The recommended way to create shared libraries on HP-UX 11.x with aCC
is 'CC -b'. This is a similar change to using 'cc -b' to create shared
libraries on HP-UX 11.x rather than ld.

Want me to factor out hpux10 like we did for the cc case?

-- 
albert chin ([EMAIL PROTECTED])




Re: Sync C++ linking on HEAD with branch-1-5

2005-11-09 Thread Ralf Wildenhues
Hi Albert,

* Albert Chin wrote on Wed, Nov 09, 2005 at 05:11:09PM CET:
> When linking C++ libraries/programs, link with the compiler, not the
> linker. Syncs with branch-1-5.

Erm, I can't see this in branch-1-5.
It's hpux10*|hpux11*, and hppa*64*|ia64*, and aCC|g++, right?

Does something fail without the patch (what)?  Should I apply it to
branch-1-5 as well?

Cheers,
Ralf




Sync C++ linking on HEAD with branch-1-5

2005-11-09 Thread Albert Chin
When linking C++ libraries/programs, link with the compiler, not the
linker. Syncs with branch-1-5.
-- 
albert chin ([EMAIL PROTECTED])

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

* libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG): Sync C++
linking on HP-UX with branch-1-5. Use C++ compiler for
linking rather than ld.

Index: libltdl/m4/libtool.m4
===
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.36
diff -u -3 -p -r1.36 libtool.m4
--- libltdl/m4/libtool.m4   7 Nov 2005 18:28:25 -   1.36
+++ libltdl/m4/libtool.m4   9 Nov 2005 16:06:29 -
@@ -5429,7 +5430,7 @@ if test "$_lt_caught_CXX_error" != yes; 
   aCC*)
case $host_cpu in
  hppa*64*|ia64*)
-   _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib 
$linker_flags $libobjs $deplibs'
+   _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o 
$lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
  *)
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname 
${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs 
$postdep_objects $compiler_flags'
@@ -5450,7 +5451,7 @@ if test "$_lt_caught_CXX_error" != yes; 
  if test $with_gnu_ld = no; then
case $host_cpu in
  ia64*|hppa*64*)
-   _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib 
$linker_flags $libobjs $deplibs'
+   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC 
${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects 
$compiler_flags'
;;
  *)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC 
${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects 
$libobjs $deplibs $postdep_objects $compiler_flags'