+2004-04-26 Ken Raeburn <raeburn@mit.edu>
+
+ * shlib.conf (INIT_FINI_PREP): New variable. Default to a no-op,
+ but let each platform set setup routines to process
+ initialization and finalization options for the default
+ MAKE_SHLIB_COMMAND value.
+ (case mips-sgi-irix*): Define LDCOMBINE_TAIL to use the library's
+ export list.
+
2004-04-24 Ken Raeburn <raeburn@mit.edu>
* pre.in (PERL): New variable.
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
# This will do for most platforms, and we'll substitute for
# LDCOMBINE, SHLIB_EXPFLAGS, and LDCOMBINE_TAIL below.
-# ** Perhaps we should drop LDCOMBINE* as separate substitutions?
-#MAKE_SHLIB_COMMAND='$(LDCOMBINE) -o $@ $$objlist $(SHLIB_EXPFLAGS) $(LDCOMBINE_TAIL)'
MAKE_SHLIB_COMMAND=x
+INIT_FINI_PREP=:
# Default to static or shared libraries?
default_static=no
SHLIBEXT=.so
SHOBJEXT=.o
LDCOMBINE='$(CC) -shared -Wl,-ignore_unresolved -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,lib$(LIB)$(SHLIBSEXT)'
+ LDCOMBINE_TAIL='-Wl,-exports_file -Wl,$(SHLIB_EXPORT_FILE)'
SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
# no gprof for Irix...
PROFFLAGS=-p
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; '
-
+ ;;
esac
if test "${MAKE_SHLIB_COMMAND}" = "x" ; then
- MAKE_SHLIB_COMMAND="${LDCOMBINE} -o \$@ \$\$objlist \$(SHLIB_EXPFLAGS) ${LDCOMBINE_TAIL}"
+ if test "${INIT_FINI_PREP}" != ":"; then
+ MAKE_SHLIB_COMMAND="${INIT_FINI_PREP} && ${LDCOMBINE} -o \$@ \$\$objlist \$(SHLIB_EXPFLAGS) ${LDCOMBINE_TAIL}"
+ else
+ MAKE_SHLIB_COMMAND="${LDCOMBINE} -o \$@ \$\$objlist \$(SHLIB_EXPFLAGS) ${LDCOMBINE_TAIL}"
+ fi
fi