(clean-libs): Delete them.
* pre.in (SHLIB_EXPORT_FILE_DEP): Use @SHLIB_EXPORT_FILE_DEP@.
* shlib.conf: Set it to $(SHLIB_EXPORT_FILE) by default.
(alpha*-dec-osf*): Use osf1.exports instead of adding commands to generate a
temporary file.
(*-*-linux*, *-*-gnu*, *-*-k*bsd*-gnu): Use binutils.versions.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16779
dc483132-0cff-0310-8789-
dd5450dbe970
+2004-09-22 Ken Raeburn <raeburn@mit.edu>
+
+ * lib.in (binutils.versions, osf1.exports): New file targets.
+ (clean-libs): Delete them.
+ * pre.in (SHLIB_EXPORT_FILE_DEP): Use @SHLIB_EXPORT_FILE_DEP@.
+ * shlib.conf: Set it to $(SHLIB_EXPORT_FILE) by default.
+ (alpha*-dec-osf*): Use osf1.exports instead of adding commands to
+ generate a temporary file.
+ (*-*-linux*, *-*-gnu*, *-*-k*bsd*-gnu): Use binutils.versions.
+
2004-09-22 Tom Yu <tlyu@mit.edu>
* pre.in (UTIL_LIB): Set if we need libutil.
$(RM) $@
$(LN_S) lib$(LIBBASE)$(SHLIBVEXT) $@
+binutils.versions: $(SHLIB_EXPORT_FILE) Makefile
+ echo > binutils.versions "HIDDEN { local: __*; _rest*; _save*; *; };"
+ echo >> binutils.versions "$(LIBBASE)_$(LIBMAJOR)_MIT {"
+ sed >> binutils.versions < $(SHLIB_EXPORT_FILE) "s/$$/;/"
+ echo >> binutils.versions "};"
+
+osf1.exports: $(SHLIB_EXPORT_FILE) Makefile
+ sed "s/^/-exported_symbol /" < $(SHLIB_EXPORT_FILE) > osf1.exports
+
lib$(LIBBASE)$(PFLIBEXT): $(PFOBJLISTS)
$(RM) $@
@echo "building profiled $(LIBBASE) library"
$(RM) lib$(LIBBASE)$(SHLIBSEXT)
$(RM) lib$(LIBBASE)$(SHLIBEXT)
$(RM) lib$(LIBBASE)$(PFLIBEXT)
+ $(RM) binutils.versions osf1.exports
clean-liblinks:
$(RM) $(TOPLIBD)/lib$(LIBBASE)$(STLIBEXT)
# File that needs to be current for building the shared library,
# usually SHLIB_EXPORT_FILE, but not always, if we have to convert
# it to another, intermediate form for the linker.
-SHLIB_EXPORT_FILE_DEP=$(SHLIB_EXPORT_FILE)
+SHLIB_EXPORT_FILE_DEP=@SHLIB_EXPORT_FILE_DEP@
# Command to run to build a shared library.
# In systems that require multiple commands, like AIX, it may need
PFOBJEXT=.po
# Default for systems w/o shared libraries
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
+#
+SHLIB_EXPORT_FILE_DEP='$(SHLIB_EXPORT_FILE)'
# This will do for most platforms, and we'll substitute for
# LDCOMBINE, SHLIB_EXPFLAGS, and LDCOMBINE_TAIL below.
MAKE_SHLIB_COMMAND=x
# Alpha OSF/1 doesn't need separate PIC objects
SHOBJEXT=.o
INIT_FINI_PREP='if test -z "$(LIBINITFUNC)"; then initfini=""; else initfini="-Wl,-init,$(LIBINITFUNC)__auxinit"; fi; if test -z "$(LIBFINIFUNC)";then :;else initfini="$$initfini -Wl,-fini,$(LIBFINIFUNC)"; fi'
- LDCOMBINE='sed "s/^/-exported_symbol /" < $(SHLIB_EXPORT_FILE) > export && $(CC) $(PTHREAD_CFLAGS) -shared -Wl,-expect_unresolved -Wl,\* -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,lib$(LIBBASE)$(SHLIBSEXT) -Wl,-hidden -Wl,-input,export $$initfini'
+ LDCOMBINE='$(CC) $(PTHREAD_CFLAGS) -shared -Wl,-expect_unresolved -Wl,\* -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,lib$(LIBBASE)$(SHLIBSEXT) -Wl,-hidden -Wl,-input,osf1.exports $$initfini'
+ SHLIB_EXPORT_FILE_DEP=osf1.exports
use_linker_init_option=yes
use_linker_fini_option=yes
EXTRA_FILES="$EXTRA_FILES export"
# Use objdump -x to examine the fields of the library
LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,lib$(LIBBASE)$(SHLIBSEXT)'
#
- LDCOMBINE_TAIL=''
+ LDCOMBINE_TAIL='-Wl,--version-script binutils.versions'
+ SHLIB_EXPORT_FILE_DEP=binutils.versions
# For cases where we do have dependencies on other libraries
# built in this tree...
SHLIB_EXPFLAGS='-Wl,-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'