summaryrefslogtreecommitdiffstats
path: root/src/config/shlib.conf
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2005-03-25 21:36:55 +0000
committerKen Raeburn <raeburn@mit.edu>2005-03-25 21:36:55 +0000
commit45e3030774b1b61c23a5fdd21b3c6be79c5b1cfd (patch)
tree32c0e61c0330fcbe9af99959f9e3b3a6f356a2a4 /src/config/shlib.conf
parenta413400cb98d2aeba576762ee445560da03e9d55 (diff)
downloadkrb5-45e3030774b1b61c23a5fdd21b3c6be79c5b1cfd.tar.gz
krb5-45e3030774b1b61c23a5fdd21b3c6be79c5b1cfd.tar.xz
krb5-45e3030774b1b61c23a5fdd21b3c6be79c5b1cfd.zip
shared library support for HP-UX 10
Our somewhat outdated HP-UX support (which was targeted at HP-UX 10, not 11) does not have support for shared library initialization and finalization functions, nor for shared library export lists. The former was causing compilation failures unless shared library support was disabled. * include/k5-platform.h: Expand on init/fini comments some more. (MAKE_FINI_FUNCTION): Add an HP-UX specific variant that defines an auxiliary function fitting the signature of HP-UX 10 library combined initializer/finalizer functions. * config/lib.in (hpux10.exports): New target, constructed similar to osf1.exports but with HP-UX 10.x linker options, no initializers, and "errno" explicitly added to the export list. * shlib.conf (*-*-hpux*): Combine PICFLAGS setting with SHLIB_EXPFLAGS and LDCOMBINE setting. Add linker option "-c hpux10.exports" to LDCOMBINE. Set SHLIB_EXPORT_FILE_DEP to hpux10.exports. Set use_linker_fini_option. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17153 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/config/shlib.conf')
-rw-r--r--src/config/shlib.conf29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/config/shlib.conf b/src/config/shlib.conf
index 4d09e84e4..3261b672c 100644
--- a/src/config/shlib.conf
+++ b/src/config/shlib.conf
@@ -75,27 +75,42 @@ alpha*-dec-osf*)
# on the commandline of the linker will determine which path
# (compiled-in or SHLIB_PATH) will be searched first.
#
+# +I initproc routine gets called at load and unload time for
+# shl_load calls, but appears to never be called for link-time
+# specified libraries.
+# +e sym exports symbol and supposedly prevents other symbols
+# from being exported, according to the man page, but the
+# latter bit doesn't actually seem to work
+# -O +dpv should display any routines eliminated as unused, but -b
+# apparently turns that off
*-*-hpux*)
- if test "$krb5_cv_prog_gcc" = yes; then
- PICFLAGS=-fPIC
- else
- PICFLAGS=+z
- fi
INSTALL_SHLIB='$(INSTALL)'
SHLIBEXT=.sl
SHLIBVEXT='.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.$(LIBMAJOR)'
RPATH_FLAG='-Wl,+b,'
if test "$krb5_cv_prog_gcc" = yes; then
+ PICFLAGS=-fPIC
SHLIB_EXPFLAGS='-Wl,+s -Wl,+b,$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- LDCOMBINE='gcc -fPIC -shared -Wl,+h,lib$(LIBBASE)$(SHLIBSEXT)'
+ LDCOMBINE='gcc -fPIC -shared -Wl,+h,lib$(LIBBASE)$(SHLIBSEXT) -Wl,-c,hpux10.exports'
else
+ PICFLAGS=+z
SHLIB_EXPFLAGS='+s +b $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- LDCOMBINE='ld -b +h lib$(LIBBASE)$(SHLIBSEXT)'
+ LDCOMBINE='ld -b +h lib$(LIBBASE)$(SHLIBSEXT) -c hpux10.exports'
fi
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,+s $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
RUN_ENV='SHLIB_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export SHLIB_PATH;'
+ SHLIB_EXPORT_FILE_DEP=hpux10.exports
+ # Do *not* set use_linker_init_option=yes here, because in the
+ # case where the library is specified at program link time, the
+ # initialization function appears not to get called, only for
+ # shl_load. But for finalization functions, the shl_load case
+ # is the one we care about.
+ #
+ # Not setting use_linker_init_option here should cause compilation
+ # failures if the user tries to disable delayed initialization.
+ use_linker_fini_option=yes
;;
mips-sgi-irix6.3) # This is a Kludge; see below