[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Link with +nodefaultrpath on HP-UX/IA-64
From: |
Albert Chin |
Subject: |
Link with +nodefaultrpath on HP-UX/IA-64 |
Date: |
Mon, 14 Nov 2005 16:40:43 -0600 |
User-agent: |
Mutt/1.5.6i |
Addresses the +nodefaultrpath issue raised in
http://lists.gnu.org/archive/html/libtool/2005-11/msg00000.html. If a
library is linked and LDFLAGS is set to -L[path] without any +b,
[path] is hard-coded into the library. So, we can either require the
user to set LDFLAGS="-Wl,+nodefaultrpath" or pass +nodefaultrpath by
default when creating shared libraries. This patch applies the latter.
--
albert chin (address@hidden)
-- snip snip
[HEAD]
2005-11-14 Albert Chin <address@hidden>
* libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
[ hpux11 ]: Pass +nodefaultrpath when linking on ia64*.
Index: libltdl/m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.43
diff -u -3 -p -r1.43 libtool.m4
--- libltdl/m4/libtool.m4 12 Nov 2005 11:54:13 -0000 1.43
+++ libltdl/m4/libtool.m4 14 Nov 2005 22:37:14 -0000
@@ -4394,18 +4395,24 @@ _LT_EOF
hpux11*)
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
case $host_cpu in
- hppa*64*|ia64*)
+ hppa*64*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o
$lib $libobjs $deplibs $compiler_flags'
;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname
${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname
${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
- hppa*64*|ia64*)
+ hppa*64*)
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib
$libobjs $deplibs $compiler_flags'
;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname
${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
*)
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b
${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
@@ -5440,9 +5447,12 @@ if test "$_lt_caught_CXX_error" != yes;
;;
aCC*)
case $host_cpu in
- hppa*64*|ia64*)
+ hppa*64*)
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o
$lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname
${wl}+nodefaultrpath -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'
;;
@@ -5461,8 +5471,11 @@ if test "$_lt_caught_CXX_error" != yes;
if test "$GXX" = yes; then
if test $with_gnu_ld = no; then
case $host_cpu in
- ia64*|hppa*64*)
+ hppa*64*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC
${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects
$compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC
${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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'
[1.5]
2005-11-14 Albert Chin <address@hidden>
* libtool.m4 (_LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_PROG_LD_SHLIBS)
[ hpux11 ]: Pass +nodefaultrpath when linking on ia64*.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.134
diff -u -3 -p -r1.314.2.134 libtool.m4
--- libtool.m4 13 Nov 2005 19:36:34 -0000 1.314.2.134
+++ libtool.m4 14 Nov 2005 22:36:34 -0000
@@ -3153,9 +3153,12 @@ case $host_os in
;;
aCC*)
case $host_cpu in
- hppa*64*|ia64*)
+ hppa*64*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib
$predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname
${wl}+nodefaultrpath -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'
;;
@@ -3174,9 +3177,12 @@ case $host_os in
if test "$GXX" = yes; then
if test $with_gnu_ld = no; then
case $host_cpu in
- ia64*|hppa*64*)
+ hppa*64*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC
${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects
$compiler_flags'
;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC
${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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'
;;
@@ -5834,17 +5840,23 @@ _LT_EOF
hpux11*)
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
case $host_cpu in
- hppa*64*|ia64*)
+ hppa*64*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o
$lib $libobjs $deplibs $compiler_flags'
;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname
${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h
${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs
$compiler_flags'
;;
esac
else
case $host_cpu in
- hppa*64*|ia64*)
+ hppa*64*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib
$libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname
${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b
${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- Link with +nodefaultrpath on HP-UX/IA-64,
Albert Chin <=