From: Tom Yu Date: Wed, 9 Jan 2002 00:46:52 +0000 (+0000) Subject: * shlib.conf: Fix hpux to deal with building shared libs with gcc. X-Git-Tag: krb5-1.3-alpha1~896 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2357579e7d90ab9501620c206e95cfaaa471c0da;p=krb5.git * shlib.conf: Fix hpux to deal with building shared libs with gcc. Patch from Doug Engert; fixes krb5-build/1021. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14096 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/config/ChangeLog b/src/config/ChangeLog index 2f6902d99..1cd7396d9 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -5,6 +5,11 @@ * libobj.in (config.status): Depend on shlib.conf. +2001-12-18 Tom Yu + + * shlib.conf: Fix hpux to deal with building shared libs with gcc. + Patch from Doug Engert; fixes krb5-build/1021. + 2001-10-20 Ken Raeburn * post.in (DEPLIBOBJNAMEFIX): New variable. diff --git a/src/config/shlib.conf b/src/config/shlib.conf index 2b94ad77c..d730d69a7 100644 --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -50,13 +50,22 @@ alpha*-dec-osf*) # (compiled-in or SHLIB_PATH) will be searched first. # *-*-hpux*) - PICFLAGS=+z + if test "$krb5_cv_prog_gcc" = yes; then + PICFLAGS=-fPIC + else + PICFLAGS=+z + fi INSTALL_SHLIB='$(INSTALL)' SHLIBEXT=.sl SHLIBVEXT='.$(LIBMAJOR).$(LIBMINOR)' SHLIBSEXT='.$(LIBMAJOR)' - SHLIB_EXPFLAGS='+s +b $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)' - LDCOMBINE='ld -b +h lib$(LIB)$(SHLIBSEXT)' + if test "$krb5_cv_prog_gcc" = yes; then + SHLIB_EXPFLAGS='-Wl,+s -Wl,+b,$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)' + LDCOMBINE='gcc -fPIC -shared -Wl,+h,lib$(LIB)$(SHLIBSEXT)' + else + SHLIB_EXPFLAGS='+s +b $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)' + LDCOMBINE='ld -b +h lib$(LIB)$(SHLIBSEXT)' + fi CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,+s -Wl,+b,$(PROG_RPATH)' CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)' RUN_ENV='SHLIB_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export SHLIB_PATH;'