From: Ken Raeburn Date: Thu, 23 Sep 2004 00:25:30 +0000 (+0000) Subject: * lib.in (binutils.versions, osf1.exports): New file targets. X-Git-Tag: krb5-1.4-beta1~62 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ca344f42817923a7ed3edd7733aab115415ed0d4;p=krb5.git * 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16779 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/config/ChangeLog b/src/config/ChangeLog index af06a5f82..0f4d61993 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,13 @@ +2004-09-22 Ken Raeburn + + * 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 * pre.in (UTIL_LIB): Set if we need libutil. diff --git a/src/config/lib.in b/src/config/lib.in index 6818d4a32..7ebdb3ff3 100644 --- a/src/config/lib.in +++ b/src/config/lib.in @@ -50,6 +50,15 @@ lib$(LIBBASE)$(SHLIBEXT): lib$(LIBBASE)$(SHLIBVEXT) $(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" @@ -81,6 +90,7 @@ clean-libs: $(RM) lib$(LIBBASE)$(SHLIBSEXT) $(RM) lib$(LIBBASE)$(SHLIBEXT) $(RM) lib$(LIBBASE)$(PFLIBEXT) + $(RM) binutils.versions osf1.exports clean-liblinks: $(RM) $(TOPLIBD)/lib$(LIBBASE)$(STLIBEXT) diff --git a/src/config/pre.in b/src/config/pre.in index 93a1520ae..db4e0582f 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -497,7 +497,7 @@ SHLIB_EXPORT_FILE=$(srcdir)/lib$(LIBBASE).exports # 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 diff --git a/src/config/shlib.conf b/src/config/shlib.conf index ccff18731..3205bb348 100644 --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -19,6 +19,8 @@ SHOBJEXT=.so 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 @@ -37,7 +39,8 @@ alpha*-dec-osf*) # 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" @@ -317,7 +320,8 @@ mips-*-netbsd*) # 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)'