SHOBJEXT=.so
PFOBJEXT=.po
# Default for systems w/o shared libraries
-CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
# Set up architecture-specific variables.
case $krb5_cv_host in
LDCOMBINE='ld -shared -expect_unresolved \* -update_registry $(BUILDTOP)/so_locations -soname lib$(LIB)$(SHLIBSEXT)'
SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH) $(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'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) -Wl,-oldstyle_liblookup $(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;'
;;
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)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,+s -Wl,+b,$(PROG_RPATH) $(LDFLAGS)'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
RUN_ENV='SHLIB_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export SHLIB_PATH;'
;;
SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
# no gprof for Irix...
PROFFLAGS=-p
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH) $(LDFLAGS)'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
# This grossness is necessary due to the presence of *three*
# supported ABIs on Irix, and the precedence of the rpath over
# LD_LIBRARY*_PATH. Like OSF/1, _RLD*_ROOT needs to be set to
SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
# no gprof for Irix...
PROFFLAGS=-p
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH) $(LDFLAGS)'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
# This grossness is necessary due to the presence of *three*
# supported ABIs on Irix, and the precedence of the rpath over
# LD_LIBRARY*_PATH. Like OSF/1, _RLD*_ROOT needs to be set to
SHLIBEXT=.so
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH) $(LDFLAGS)'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
PROFFLAGS=-pg
;;
SHLIBEXT=.so
LDCOMBINE='ld -shared -soname lib$(LIB)$(SHLIBSEXT)'
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH) $(LDFLAGS)'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
PROFFLAGS=-pg
;;
SHLIBEXT=.so
LDCOMBINE='ld -Bshareable'
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH) $(LDFLAGS)'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
PROFFLAGS=-pg
;;
PICFLAGS=-fpic
if test "x$objformat" = "xelf" ; then
SHLIBVEXT='.so.$(LIBMAJOR)'
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH) $(LDFLAGS)'
else
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH) $(LDFLAGS)'
fi
SHLIBEXT=.so
LDCOMBINE='ld -Bshareable'
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
PROFFLAGS=-pg
;;
SHLIBEXT=.so
LDCOMBINE='ld -Bshareable'
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH) $(LDFLAGS)'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
PROFFLAGS=-pg
;;
SHLIBSEXT='.$(LIBMAJOR).dylib'
SHLIB_EXPFLAGS='$(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
SHLIBEXT=.dylib
- LDCOMBINE='$(CC) $(LDFLAGS) -undefined warning -dynamiclib -compatibility_version $(LIBMAJOR) -current_version $(LIBMAJOR).$(LIBMINOR) -install_name "$(KRB5_LIBDIR)/lib$(LIB)$(SHLIBVEXT)"'
- CC_LINK_SHARED='$(CC) $(LDFLAGS) $(PROG_LIBPATH) -dynamic'
- CC_LINK_STATIC='$(CC) $(LDFLAGS) $(PROG_LIBPATH)'
+ LDCOMBINE='$(CC) -undefined warning -dynamiclib -compatibility_version $(LIBMAJOR) -current_version $(LIBMAJOR).$(LIBMINOR) -install_name "$(KRB5_LIBDIR)/lib$(LIB)$(SHLIBVEXT)" $(LDFLAGS)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -dynamic $(LDFLAGS)'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
RUN_ENV='DYLD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export DYLD_LIBRARY_PATH;'
LIB_LINK_OPT=frameworkopt
EXTRA_LIB_TARGETS=all-framework
SHLIBEXT=.so
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
- CC_LINK_SHARED='$(PURE) $(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
- CC_LINK_STATIC='$(PURE) $(CC) $(PROG_LIBPATH)'
+ CC_LINK_SHARED='$(PURE) $(CC) $(PROG_LIBPATH) -R$(PROG_RPATH) $(LDFLAGS)'
+ CC_LINK_STATIC='$(PURE) $(CC) $(PROG_LIBPATH) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
;;
LDCOMBINE='LD_LIBRARY_PATH=`echo $(SHLIB_DIRS) | sed -e "s/-L//g" -e "s/ /:/g"` ld -dp -assert pure-text'
SHLIB_EXPFLAGS='-L$(SHLIB_RDIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
- CC_LINK_SHARED='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"` $(PURE) $(CC) -L$(PROG_RPATH)'
- CC_LINK_STATIC='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g` $(PURE) $(CC)'
+ CC_LINK_SHARED='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"` $(PURE) $(CC) -L$(PROG_RPATH) $(LDFLAGS)'
+ CC_LINK_STATIC='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g` $(PURE) $(CC) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
;;
*-*-linux*)
# built in this tree...
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH) $(LDFLAGS)'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
;;
SHLIB_EXPFLAGS=' $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
if test "$krb5_cv_prog_gcc" = "yes" ; then
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-blibpath:$(PROG_RPATH):/usr/lib:/lib'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-blibpath:$(PROG_RPATH):/usr/lib:/lib $(LDFLAGS)'
else
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -blibpath:$(PROG_RPATH):/usr/lib:/lib'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -blibpath:$(PROG_RPATH):/usr/lib:/lib $(LDFLAGS)'
fi
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(LDFLAGS)'
# $(PROG_RPATH) is here to handle things like a shared tcl library
RUN_ENV='LIBPATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`:$(PROG_RPATH):/usr/lib:/usr/local/lib; export LIBPATH; '