From: Ken Raeburn Date: Sat, 13 Sep 2003 04:16:10 +0000 (+0000) Subject: * shlib.conf (*-*-linux*): Use gcc for linking shared libraries, and -Wl to X-Git-Tag: krb5-1.4-beta1~740 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7ccf1eeadf51f00517798df0cb22e8a61aabddf7;p=krb5.git * shlib.conf (*-*-linux*): Use gcc for linking shared libraries, and -Wl to pass linker flags in, so gcc can supply the necessary support libraries. ticket: 1790 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15818 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/config/ChangeLog b/src/config/ChangeLog index a47e8d2a2..6b3ff9ee2 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,9 @@ +2003-09-13 Ken Raeburn + + * shlib.conf (*-*-linux*): Use gcc for linking shared libraries, + and -Wl to pass linker flags in, so gcc can supply the necessary + support libraries. + 2003-08-29 Ken Raeburn * post.in (daemon.c): New rule for copying daemon.c locally from diff --git a/src/config/shlib.conf b/src/config/shlib.conf index 156495f64..7422d0a69 100644 --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -263,21 +263,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='gcc -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*)