2004-06-18 Ken Raeburn <raeburn@mit.edu>
+ * 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.
;;
*-*-darwin* | *-*-rhapsody*)
- PICFLAGS=-fno-common
SHLIBVEXT='.$(LIBMAJOR).$(LIBMINOR).dylib'
SHLIBSEXT='.$(LIBMAJOR).dylib'
SHLIB_EXPFLAGS='$(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
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*)
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)'