[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hppa*64* and dependent libraries
From: |
Albert Chin |
Subject: |
Re: hppa*64* and dependent libraries |
Date: |
Wed, 18 Dec 2002 19:27:30 -0600 |
User-agent: |
Mutt/1.4i |
On Wed, Dec 18, 2002 at 07:45:36PM -0500, Boehne, Robert wrote:
> Post the patch you have for 1.4. I'm curious as to why you need to
> set $wl at all, if linking is being done with "ld" then ${wl}="" for
> any flag. IMHO, if that isn't being done properly we need to find
> out why.
There's a small patch in here too for IRIX so just ignore it.
As an example, the following links libpng 1.2.4 as a shared library
and a test program:
...
/bin/sh ./libtool --mode=link cc +DD64 +O2 +ESlit +Onofltacc
+Oentrysched +Odataprefetch +Onolimit
-L/opt/TWWfsw/zlib11/lib/pa20_64 -o libpng.la -rpath
/opt/TWWfsw/libpng12/lib/pa20_64 -version-info 2:2:0 -module png.lo
pngerror.lo pngget.lo pngmem.lo pngpread.lo pngrio.lo pngread.lo
pngrtran.lo pngrutil.lo pngset.lo pngtrans.lo pngwio.lo pngwrite.lo
pngwtran.lo pngwutil.lo -lz -lm
rm -fr .libs/libpng.la .libs/libpng.* .libs/libpng.*
/usr/ccs/bin/ld -b +h libpng.sl.2 -o .libs/libpng.sl.2.2 png.o
pngerror.o pngget.o pngmem.o pngpread.o pngrio.o pngread.o pngrtran.o
pngrutil.o pngset.o pngtrans.o pngwio.o pngwrite.o pngwtran.o
pngwutil.o +b /opt/TWWfsw/zlib11/lib/pa20_64
-L/opt/TWWfsw/zlib11/lib/pa20_64
/opt/TWWfsw/zlib11/lib/pa20_64/libz.sl -lm -lc
(cd .libs && rm -f libpng.sl.2 && ln -s libpng.sl.2.2 libpng.sl.2)
...
/bin/sh ./libtool --mode=link cc +DD64 +O2 +ESlit +Onofltacc
+Oentrysched +Odataprefetch +Onolimit
-L/opt/TWWfsw/zlib11/lib/pa20_64 -o pngtest pngtest.o libpng.la -lz
-lm
cc +DD64 +O2 +ESlit +Onofltacc +Oentrysched +Odataprefetch +Onolimit
-o .libs/pngtest pngtest.o -L/opt/TWWfsw/zlib11/lib/pa20_64
./.libs/libpng.sl /opt/TWWfsw/zlib11/lib/pa20_64/libz.sl -lm -Wl,+b
-Wl,/opt/TWWfsw/libpng12/lib/pa20_64:/opt/TWWfsw/zlib11/lib/pa20_64
...
--
albert chin (address@hidden)
-- snip snip
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.166.2.45
diff -u -3 -p -r1.166.2.45 libtool.m4
--- libtool.m4 11 Oct 2002 16:06:07 -0000 1.166.2.45
+++ libtool.m4 19 Dec 2002 01:21:10 -0000
@@ -910,7 +910,14 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic,
# Is there a better lt_cv_prog_cc_static that works with the bundled CC?
lt_cv_prog_cc_wl='-Wl,'
lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
- lt_cv_prog_cc_pic='+Z'
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_cv_prog_cc_pic='+Z'
+ ;;
+ esac
;;
irix5* | irix6* | nonstopux*)
@@ -1627,23 +1634,41 @@ else
hpux9* | hpux10* | hpux11*)
case $host_os in
hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir
-o $output_objdir/$soname $libobjs $deplibs $linker_flags~test
$output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
- *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs
$deplibs $linker_flags' ;;
+ *)
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ *)
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs
$deplibs $linker_flags'
+ ;;
+ esac
+ ;;
+ esac
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_into_libs=yes
+ ;;
+ *)
+ hardcode_direct=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
esac
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
- hardcode_direct=yes
hardcode_minus_L=yes # Not in the search PATH, but as the default
- # location of the library.
- export_dynamic_flag_spec='${wl}-E'
+ # location of the library
;;
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname
${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring`
${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname
$soname `test -n "$verstring" && echo -set_version $verstring` -update_registry
${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='-rpath $libdir'
fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
link_all_deplibs=yes
;;
@@ -2122,12 +2148,21 @@ hpux9* | hpux10* | hpux11*)
version_type=sunos
need_lib_prefix=no
need_version=no
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
library_names_spec='${libname}${release}.sl$versuffix
${libname}${release}.sl$major $libname.sl'
soname_spec='${libname}${release}.sl$major'
# HP-UX runs *really* slowly unless shared libraries are mode 555.
postinstall_cmds='chmod 555 $lib'
+ case "$host_cpu" in
+ hppa*64*)
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ esac
;;
irix5* | irix6* | nonstopux*)
@@ -3370,9 +3407,17 @@ gnu*)
;;
hpux10.20*|hpux11*)
- lt_cv_deplibs_check_method='file_magic
(s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ case "$host_cpu" in
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic ELF-64 shared object file - PA-RISC
[[0-9]].[[0-9]]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic
(s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
;;
irix5* | irix6* | nonstopux*)
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.259.2.26
diff -u -3 -p -r1.259.2.26 ltmain.in
--- ltmain.in 11 Oct 2002 16:06:07 -0000 1.259.2.26
+++ ltmain.in 19 Dec 2002 01:22:26 -0000
@@ -2801,6 +2801,10 @@ EOF
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
+ case "${LD}" in
+ */ld*)
+ wl=
+ esac
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then
- hppa*64* and dependent libraries, Albert Chin, 2002/12/14
- Re: hppa*64* and dependent libraries, Albert Chin, 2002/12/14
- Re: hppa*64* and dependent libraries, John David Anglin, 2002/12/19
- Re: hppa*64* and dependent libraries, Albert Chin, 2002/12/19
- Re: hppa*64* and dependent libraries, John David Anglin, 2002/12/19
- Re: hppa*64* and dependent libraries, Albert Chin, 2002/12/19
- Re: hppa*64* and dependent libraries, John David Anglin, 2002/12/19
- Re: hppa*64* and dependent libraries, Albert Chin, 2002/12/19
- Re: hppa*64* and dependent libraries, John David Anglin, 2002/12/19