aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2004-09-23 00:25:30 +0000
committerKen Raeburn <raeburn@mit.edu>2004-09-23 00:25:30 +0000
commitca344f42817923a7ed3edd7733aab115415ed0d4 (patch)
treefc77f598e2fe07881171cd88436c577873fd3692
parent36f2f2296b61e4be33e1ae2dcae67aab7931e227 (diff)
downloadkrb5-ca344f42817923a7ed3edd7733aab115415ed0d4.zip
krb5-ca344f42817923a7ed3edd7733aab115415ed0d4.tar.gz
krb5-ca344f42817923a7ed3edd7733aab115415ed0d4.tar.bz2
* 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
-rw-r--r--src/config/ChangeLog10
-rw-r--r--src/config/lib.in10
-rw-r--r--src/config/pre.in2
-rw-r--r--src/config/shlib.conf8
4 files changed, 27 insertions, 3 deletions
diff --git a/src/config/ChangeLog b/src/config/ChangeLog
index af06a5f..0f4d619 100644
--- a/src/config/ChangeLog
+++ b/src/config/ChangeLog
@@ -1,3 +1,13 @@
+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.
diff --git a/src/config/lib.in b/src/config/lib.in
index 6818d4a..7ebdb3f 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 93a1520..db4e058 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 ccff187..3205bb3 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)'