aboutsummaryrefslogtreecommitdiff
path: root/src/config/shlib.conf
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/shlib.conf')
-rw-r--r--src/config/shlib.conf67
1 files changed, 46 insertions, 21 deletions
diff --git a/src/config/shlib.conf b/src/config/shlib.conf
index 156495f..ed41bd8 100644
--- a/src/config/shlib.conf
+++ b/src/config/shlib.conf
@@ -30,13 +30,20 @@ alpha*-dec-osf*)
PROFFLAGS=-pg
RPATH_FLAG='-Wl,-rpath -Wl,'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
- # Need -oldstyle_liblookup to avoid picking up shared libs from
- # other builds. OSF/1 / Tru64 ld programs look through the entire
- # library path for shared libs prior to looking through the
- # entire library path for static libs.
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) -Wl,-oldstyle_liblookup $(CFLAGS) $(LDFLAGS)'
- # $(PROG_RPATH) is here to handle things like a shared tcl library
- RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`:$(PROG_RPATH):/usr/shlib:/usr/ccs/lib:/usr/lib/cmplrs/cc:/usr/lib:/usr/local/lib; export LD_LIBRARY_PATH; _RLD_ROOT=/dev/dummy/d; export _RLD_ROOT;'
+ if test "$krb5_cv_prog_gcc" = yes; then
+ # Really should check for gnu ld vs system ld, too.
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
+ else
+ # Need -oldstyle_liblookup to avoid picking up shared libs from
+ # other builds. OSF/1 / Tru64 ld programs look through the entire
+ # library path for shared libs prior to looking through the
+ # entire library path for static libs.
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) -Wl,-oldstyle_liblookup $(CFLAGS) $(LDFLAGS)'
+ fi
+ # _RLD_ROOT hack needed to repoint "root" directory for purposes
+ # of searching for shared libs, since RPATHs take precedence over
+ # LD_LIBRARY_PATH.
+ RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`$${LD_LIBRARY_PATH+:$$LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; _RLD_ROOT=$(FAKEDEST):$${_RLD_ROOT+$$_RLD_ROOT}$${_RLD_ROOT-/}; export _RLD_ROOT;'
;;
# HPUX *seems* to work under 10.20.
@@ -93,11 +100,17 @@ mips-sgi-irix6.3) # This is a Kludge; see below
# supported ABIs on Irix, and the precedence of the rpath over
# LD_LIBRARY*_PATH. Like OSF/1, _RLD*_ROOT needs to be set to
# work around this lossage.
- add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
- dummy=/dev/dummmy/d
+ #
# Set the N32 and 64 variables first because the unqualified
# variables affect all three and can cause the sed command to fail.
- RUN_ENV="LD_LIBRARYN32_PATH=$add:/usr/lib32:/usr/lib32/internal:/lib32:/opt/lib32; export LD_LIBRARYN32_PATH; _RLDN32_ROOT=$dummy; export _RLDN32_ROOT; LD_LIBRARY64_PATH=$add:/usr/lib64:/usr/lib64/internal:/lib64:/opt/lib64; export LD_LIBRARY64_PATH; _RLD64_ROOT=$dummy; export _RLD64_ROOT; LD_LIBRARY_PATH=$add:/usr/lib:/usr/lib/internal:/lib:/lib/cmplrs/cc:/usr/lib/cmplrs/cc:/opt/lib; export LD_LIBRARY_PATH; _RLD_ROOT=$dummy; export _RLD_ROOT;"
+ #
+ # This loop is to reduce the clutter a slight bit.
+ add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
+ RUN_ENV=
+ for i in N32 64 ''; do
+ RUN_ENV="${RUN_ENV+ $RUN_ENV}LD_LIBRARY${i}_PATH=$add\$\${LD_LIBRARY${i}_PATH+:\$\$LD_LIBRARY${i}_PATH}; export LD_LIBRARY${i}_PATH;"
+ RUN_ENV="${RUN_ENV} _RLD${i}_ROOT=\$(FAKEDEST):\$\${_RLD${i}_ROOT+\$\${_RLD${i}_ROOT}}\$\${_RLD${i}_ROOT-/}; export _RLD${i}_ROOT;"
+ done
;;
mips-sgi-irix*)
@@ -116,11 +129,17 @@ mips-sgi-irix*)
# supported ABIs on Irix, and the precedence of the rpath over
# LD_LIBRARY*_PATH. Like OSF/1, _RLD*_ROOT needs to be set to
# work around this lossage.
- add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
- dummy=/dev/dummmy/d
+ #
# Set the N32 and 64 variables first because the unqualified
# variables affect all three and can cause the sed command to fail.
- RUN_ENV="LD_LIBRARYN32_PATH=$add:/usr/lib32:/usr/lib32/internal:/lib32:/opt/lib32; export LD_LIBRARYN32_PATH; _RLDN32_ROOT=$dummy; export _RLDN32_ROOT; LD_LIBRARY64_PATH=$add:/usr/lib64:/usr/lib64/internal:/lib64:/opt/lib64; export LD_LIBRARY64_PATH; _RLD64_ROOT=$dummy; export _RLD64_ROOT; LD_LIBRARY_PATH=$add:/usr/lib:/usr/lib/internal:/lib:/lib/cmplrs/cc:/usr/lib/cmplrs/cc:/opt/lib; export LD_LIBRARY_PATH; _RLD_ROOT=$dummy; export _RLD_ROOT;"
+ #
+ # This loop is to reduce the clutter a slight bit.
+ add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
+ RUN_ENV=
+ for i in N32 64 ''; do
+ RUN_ENV="${RUN_ENV+ $RUN_ENV}LD_LIBRARY${i}_PATH=$add\$\${LD_LIBRARY${i}_PATH+:\$\$LD_LIBRARY${i}_PATH}; export LD_LIBRARY${i}_PATH;"
+ RUN_ENV="${RUN_ENV} _RLD${i}_ROOT=\$(FAKEDEST):\$\${_RLD${i}_ROOT+\$\${_RLD${i}_ROOT}}\$\${_RLD${i}_ROOT-/}; export _RLD${i}_ROOT;"
+ done
;;
# untested...
@@ -263,21 +282,27 @@ mips-*-netbsd*)
SHLIBEXT=.so
# Linux ld doesn't default to stuffing the SONAME field...
# Use objdump -x to examine the fields of the library
- LDCOMBINE='ld -shared -h lib$(LIB)$(SHLIBSEXT)'
- # Linux libc does weird stuff at shlib link time, must be
- # explicitly listed here. This also makes it get used even
- # for the libraries marked as not having any dependencies; while
- # that's not strictly correct, the resulting behavior -- not adding
- # extra -R directories -- is still what we want.
- LDCOMBINE_TAIL="-lc"
+ LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,lib$(LIB)$(SHLIBSEXT)'
+ LDCOMBINE_TAIL=''
# For cases where we do have dependencies on other libraries
# built in this tree...
- SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
+ SHLIB_EXPFLAGS='-Wl,-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
RPATH_FLAG='-Wl,-rpath -Wl,'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
+
+ ## old version:
+ # Linux libc does weird stuff at shlib link time, must be
+ # explicitly listed here. This also makes it get used even
+ # for the libraries marked as not having any dependencies; while
+ # that's not strictly correct, the resulting behavior -- not adding
+ # extra -R directories -- is still what we want.
+ #LDCOMBINE='ld -shared -h lib$(LIB)$(SHLIBSEXT)'
+ #LDCOMBINE_TAIL="-lc"
+ #SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
+
;;
*-*-aix*)