[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Build C++ shared libs on HP-UX with aCC, not ld
From: |
Albert Chin |
Subject: |
Build C++ shared libs on HP-UX with aCC, not ld |
Date: |
Sun, 5 Sep 2004 17:51:56 -0500 |
User-agent: |
Mutt/1.5.6i |
According to a post on the HP cxx-dev mailing list:
>From: "Raj Padisetti" <address@hidden>
>Date: Fri, 27 Aug 2004 14:29:36 -0700
>To: <address@hidden>
>Subject: RE: CXX-DEV: Create C++ shared libraries on 11.x
>You should always use the compiler -- aCC and not the ld. I am attaching
>a mail from Dennis Handly along with this reply. Check it out.
>Raj
--
albert chin (address@hidden)
-- snip snip
2004-09-05 Albert Chin-A-Young <address@hidden>
* m4/libtool.m4: Use the HP C++ compiler to build C++
shared libraries, not ld.
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.99
diff -u -3 -p -r1.99 libtool.m4
--- m4/libtool.m4 5 Sep 2004 17:35:16 -0000 1.99
+++ m4/libtool.m4 5 Sep 2004 20:59:15 -0000
@@ -4918,14 +4917,14 @@ if test "$caught_CXX_error" != yes; then
_LT_TAGVAR(ld_shlibs, $1)=no
;;
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
${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs
$postdep_objects $compiler_flags'
- ;;
- esac
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _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'
+ ;;
+ esac
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -4940,8 +4939,8 @@ if test "$caught_CXX_error" != yes; then
if test "$GXX" = yes; then
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'
+ hppa*64*|ia64*)
+ _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'
- Build C++ shared libs on HP-UX with aCC, not ld,
Albert Chin <=