From: Ken Raeburn Date: Thu, 29 Aug 2002 11:57:31 +0000 (+0000) Subject: * shlib.conf: Use $(LDFLAGS) in CC_LINK_SHARED and CC_LINK_STATIC, after other options X-Git-Tag: krb5-1.3-alpha1~453 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6d3555b836e7327bf9a7d3db7500f35a3d694d73;p=krb5.git * shlib.conf: Use $(LDFLAGS) in CC_LINK_SHARED and CC_LINK_STATIC, after other options git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14793 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/config/ChangeLog b/src/config/ChangeLog index 244a8d771..f30ccb067 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,5 +1,8 @@ 2002-08-29 Ken Raeburn + * shlib.conf: Use $(LDFLAGS) in CC_LINK_SHARED and CC_LINK_STATIC, + after other options. + * pre.in (S): Variable restored. (ABS): Variable deleted. (SS_DEPS): New variable. diff --git a/src/config/shlib.conf b/src/config/shlib.conf index d730d69a7..f4d5d9c2b 100644 --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -16,7 +16,7 @@ STOBJEXT=.o 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 @@ -29,12 +29,12 @@ alpha*-dec-osf*) 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;' ;; @@ -66,8 +66,8 @@ alpha*-dec-osf*) 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;' ;; @@ -85,8 +85,8 @@ mips-sgi-irix6.3) # This is a Kludge; see below 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 @@ -107,8 +107,8 @@ mips-sgi-irix*) 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 @@ -133,8 +133,8 @@ mips-sni-sysv4) 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 ;; @@ -146,8 +146,8 @@ mips-*-netbsd*) 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 ;; @@ -158,8 +158,8 @@ mips-*-netbsd*) 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 ;; @@ -173,15 +173,15 @@ mips-*-netbsd*) 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 ;; @@ -192,8 +192,8 @@ mips-*-netbsd*) 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 ;; @@ -204,9 +204,9 @@ mips-*-netbsd*) 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 @@ -230,8 +230,8 @@ mips-*-netbsd*) 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;' ;; @@ -247,8 +247,8 @@ mips-*-netbsd*) 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*) @@ -269,8 +269,8 @@ mips-*-netbsd*) # 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;' ;; @@ -283,11 +283,11 @@ mips-*-netbsd*) 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; '