From e966cb3cc15cb186560dbe7b310df706e9ded367 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 19 Jun 2004 00:19:03 +0000 Subject: [PATCH] * shlib.conf (*-*-darwin*, *-*-rhapsody*): Don't set PICFLAGS or LDFLAGS. Force static libraries only always, instead of just as the default. (*-*-aix*): The initfini argument should be "-binitfini". Use -bernotok, not -berok. Do use the INIT_FINI_PREP command in constructing MAKE_SHLIB_COMMAND. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16492 dc483132-0cff-0310-8789-dd5450dbe970 --- src/config/ChangeLog | 7 +++++++ src/config/shlib.conf | 20 +++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/config/ChangeLog b/src/config/ChangeLog index 6c23eadf0..c63eb01c7 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,5 +1,12 @@ 2004-06-18 Ken Raeburn + * shlib.conf (*-*-darwin*, *-*-rhapsody*): Don't set PICFLAGS or + LDFLAGS. Force static libraries only always, instead of just as + the default. + (*-*-aix*): The initfini argument should be "-binitfini". Use + -bernotok, not -berok. Do use the INIT_FINI_PREP command in + constructing MAKE_SHLIB_COMMAND. + * pre.in (PTHREAD_CFLAGS): New variable. (ALL_CFLAGS): Include it. diff --git a/src/config/shlib.conf b/src/config/shlib.conf index 03eee7156..342ef07c5 100644 --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -249,7 +249,6 @@ mips-*-netbsd*) ;; *-*-darwin* | *-*-rhapsody*) - PICFLAGS=-fno-common SHLIBVEXT='.$(LIBMAJOR).$(LIBMINOR).dylib' SHLIBSEXT='.$(LIBMAJOR).dylib' SHLIB_EXPFLAGS='$(SHLIB_DIRS) $(SHLIB_EXPLIBS)' @@ -258,9 +257,12 @@ mips-*-netbsd*) CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -dynamic $(CFLAGS) $(LDFLAGS)' CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)' RUN_ENV='DYLD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export DYLD_LIBRARY_PATH;' - LDFLAGS="${LDFLAGS} -Wl,-search_paths_first" - default_static=yes - default_shared=no + # We need some changes for *all* library builds on Darwin, too. + # (Well, the KfM builds which generate .dylib files, at least. + # They might not be needed for "dumb" UNIX builds with static + # libraries, that just happen to be done on Darwin.) + enable_static=yes + enable_shared=no ;; *-*-solaris*) @@ -345,16 +347,16 @@ mips-*-netbsd*) PROFFLAGS=-pg if test "$krb5_cv_prog_gcc" = "yes" ; then RPATH_FLAG='-Wl,-blibpath:' - LDCOMBINE='$(CC) -shared -v -o shr.o.$(LIBMAJOR).$(LIBMINOR) $$objlist -nostartfiles -Xlinker -bgcbypass:1 -Xlinker -bfilelist -Xlinker -bM:SRE -Xlinker -bE:$(SHLIB_EXPORT_FILE) -Xlinker -berok $(SHLIB_EXPFLAGS) -lc' - INIT_FINI_PREP='if test -z "$(LIBFINIFUNC)" then initfini=""; else initfini="-Wl,-initfini::$(LIBFINIFUNC):3"; fi' + LDCOMBINE='$(CC) -shared -v -o shr.o.$(LIBMAJOR).$(LIBMINOR) $$objlist -nostartfiles -Xlinker -bgcbypass:1 -Xlinker -bfilelist -Xlinker -bM:SRE -Xlinker -bE:$(SHLIB_EXPORT_FILE) -Xlinker -bernotok $(SHLIB_EXPFLAGS) -lc $$initfini' + INIT_FINI_PREP='if test -z "$(LIBFINIFUNC)"; then initfini=""; else initfini="-Wl,-binitfini::$(LIBFINIFUNC):3"; fi' use_linker_fini_option=yes else RPATH_FLAG=-blibpath: - LDCOMBINE='/bin/ld -o shr.o.$(LIBMAJOR).$(LIBMINOR) $$objlist -H512 -T512 -bnoentry -bgcbypass:1 -bnodelcsect -bfilelist -bM:SRE -bE:$(SHLIB_EXPORT_FILE) -berok $(SHLIB_EXPFLAGS) -lc $$initfini' - INIT_FINI_PREP='if test -z "$(LIBFINIFUNC)" then initfini=""; else initfini="-initfini::$(LIBFINIFUNC):3"; fi' + LDCOMBINE='/bin/ld -o shr.o.$(LIBMAJOR).$(LIBMINOR) $$objlist -H512 -T512 -bnoentry -bgcbypass:1 -bnodelcsect -bfilelist -bM:SRE -bE:$(SHLIB_EXPORT_FILE) -bernotok $(SHLIB_EXPFLAGS) -lc $$initfini' + INIT_FINI_PREP='if test -z "$(LIBFINIFUNC)"; then initfini=""; else initfini="-binitfini::$(LIBFINIFUNC):3"; fi' use_linker_fini_option=yes fi - MAKE_SHLIB_COMMAND="${LDCOMBINE}"' && ar cq $@ shr.o.$(LIBMAJOR).$(LIBMINOR) && chmod +x $@ && rm -f shr.o.$(LIBMAJOR).$(LIBMINOR)' + MAKE_SHLIB_COMMAND="${INIT_FINI_PREP} && ${LDCOMBINE}"' && ar cq $@ shr.o.$(LIBMAJOR).$(LIBMINOR) && chmod +x $@ && rm -f shr.o.$(LIBMAJOR).$(LIBMINOR)' 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)' -- 2.26.2