From: Steve Ellcey Date: Wed, 6 Aug 2008 18:34:00 +0000 (+0200) Subject: Use -fPIC with GCC on HP-UX/ia64. X-Git-Tag: v2.2.6~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=355091804cac610f16d961d7702cc93e91d33267;p=thirdparty%2Flibtool.git Use -fPIC with GCC on HP-UX/ia64. * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS) [ia64-*-hpux*]: Specify -fPIC when using GCC to build shared libraries. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index b2e2171a7..0014fc9c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-06 Steve Ellcey + + Use -fPIC with GCC on HP-UX/ia64. + * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS) + [ia64-*-hpux*]: Specify -fPIC when using GCC to build shared + libraries. + 2008-08-01 Ralf Wildenhues * NEWS: Minor fixups. diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index d4891cac4..7f596987b 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -3602,10 +3602,11 @@ m4_if([$1], [CXX], [ fi ;; hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. case $host_cpu in - hppa*64*|ia64*) + hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' @@ -3897,10 +3898,11 @@ m4_if([$1], [CXX], [ ;; hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. case $host_cpu in - hppa*64*|ia64*) + hppa*64*) # +Z the default ;; *) @@ -4769,7 +4771,7 @@ _LT_EOF _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}+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'