From: Ken Raeburn Date: Fri, 9 Sep 2005 21:22:18 +0000 (+0000) Subject: patch from Marc Aurele La France: X-Git-Tag: ms-bug-test-20060525~146 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d284fca175e5aa23d8aadffd0150470acd21a2e4;p=krb5.git patch from Marc Aurele La France: * shlib.conf (case *-*-aix5.3*): Generate proper shared libraries acceptable to dlopen(3) (as in mechglue, for example). Allows for building both shared and static libraries in one run. Only done for AIX 5.3, but probably should be done for earlier versions. ticket: 3176 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17378 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/config/ChangeLog b/src/config/ChangeLog index 139c9665a..7d15d0b50 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,10 @@ +2005-09-01 Marc Aurele La France + + * shlib.conf (case *-*-aix5.3*): Generate proper shared libraries + acceptable to dlopen(3) (as in mechglue, for example). Allows for + building both shared and static libraries in one run. Only done for + AIX 5.3, but probably should be done for earlier versions. + 2005-08-20 Ken Raeburn * post.in (configure): Depend on patchlevel.h. diff --git a/src/config/shlib.conf b/src/config/shlib.conf index 9d2ed00fb..d0028e2a2 100644 --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -360,6 +360,33 @@ mips-*-netbsd*) ;; +*-*-aix5.3*) + SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)' + SHLIBEXT=.so + # AIX doesn't need separate PIC objects + SHOBJEXT=.o + SHLIB_EXPFLAGS=' $(SHLIB_DIRS) $(SHLIB_EXPLIBS)' + PROFFLAGS=-pg + if test "$krb5_cv_prog_gcc" = "yes" ; then + wl_prefix=-Wl, + RPATH_FLAG='-Wl,-blibpath:' + LDCOMBINE='$(CC) -shared -v -o $@ $$objlist -nostartfiles -Xlinker -bgcbypass:1 -Xlinker -bfilelist -Xlinker -bM:SRE -Xlinker -bE:$(SHLIB_EXPORT_FILE) -Xlinker -bernotok -Xlinker -brtl $(SHLIB_EXPFLAGS) -lc $$initfini' + else + wl_prefix= + RPATH_FLAG=-blibpath: + LDCOMBINE='/bin/ld -o $@ $$objlist -H512 -T512 -bnoentry -bgcbypass:1 -bnodelcsect -bfilelist -bM:SRE -bE:$(SHLIB_EXPORT_FILE) -bernotok -brtl $(SHLIB_EXPFLAGS) -lc $$initfini' + fi + # Assume initialization always delayed. + INIT_FINI_PREP="wl=${wl_prefix}; "'i=1; initfini=; for f in . $(LIBFINIFUNC); do if test $$f != .; then initfini="$$initfini $${wl}-binitfini::$$f:$$i"; else :; fi; i=`expr $$i + 1`; done' + use_linker_fini_option=yes + MAKE_SHLIB_COMMAND="${INIT_FINI_PREP} && ${LDCOMBINE}" + RPATH_TAIL=:/usr/lib:/lib + CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH):'"$RPATH_TAIL"' $(CFLAGS) $(LDFLAGS)' + CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(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; ' + ;; + *-*-aix*) SHLIBVEXT='.a.$(LIBMAJOR).$(LIBMINOR)' SHLIBEXT=.a