summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2004-04-29 06:50:17 +0000
committerKen Raeburn <raeburn@mit.edu>2004-04-29 06:50:17 +0000
commitdb5cd098204924653923bdc7deb9e5ca0edc986d (patch)
tree2b1900ab901c5e89ee1a9c73c31880ae00e2cc62 /src
parent61cb1ca9519ffe48ed8d0682acf1aa6837aead3c (diff)
downloadkrb5-db5cd098204924653923bdc7deb9e5ca0edc986d.tar.gz
krb5-db5cd098204924653923bdc7deb9e5ca0edc986d.tar.xz
krb5-db5cd098204924653923bdc7deb9e5ca0edc986d.zip
* shlib.conf: Initialize use_linker_init_option and use_linker_fini_option to
no. (mips-sgi-irix*): Add link-time support for library initialization and finalization. (*-*-solaris*): Likewise, for native compiler. Change "pic" mode to "PIC", libkrb5 seems to need it now. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16281 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/config/ChangeLog9
-rw-r--r--src/config/shlib.conf18
2 files changed, 23 insertions, 4 deletions
diff --git a/src/config/ChangeLog b/src/config/ChangeLog
index f84be226d5..a5aae53a42 100644
--- a/src/config/ChangeLog
+++ b/src/config/ChangeLog
@@ -1,3 +1,12 @@
+2004-04-29 Ken Raeburn <raeburn@mit.edu>
+
+ * shlib.conf: Initialize use_linker_init_option and
+ use_linker_fini_option to no.
+ (mips-sgi-irix*): Add link-time support for library
+ initialization and finalization.
+ (*-*-solaris*): Likewise, for native compiler. Change "pic" mode
+ to "PIC", libkrb5 seems to need it now.
+
2004-04-28 Ken Raeburn <raeburn@mit.edu>
* libobj.in (.c.so): Add -DSHARED to compile options.
diff --git a/src/config/shlib.conf b/src/config/shlib.conf
index 8af4b2cc9c..bc4a4dbdfc 100644
--- a/src/config/shlib.conf
+++ b/src/config/shlib.conf
@@ -10,6 +10,9 @@ SHLIBSEXT=.so.s-nobuild
PFLIBEXT=_p.a
# Most systems install shared libs as mode 644, etc. while hpux wants 755
INSTALL_SHLIB='$(INSTALL_DATA)'
+#
+use_linker_init_option=no
+use_linker_fini_option=no
STOBJEXT=.o
SHOBJEXT=.so
@@ -126,7 +129,10 @@ mips-sgi-irix*)
SHLIBSEXT='.so.$(LIBMAJOR)'
SHLIBEXT=.so
SHOBJEXT=.o
- LDCOMBINE='$(CC) -shared -Wl,-ignore_unresolved -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,lib$(LIB)$(SHLIBSEXT)'
+ use_linker_init_option=yes
+ use_linker_fini_option=yes
+ 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='$(CC) -shared -Wl,-ignore_unresolved -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,lib$(LIB)$(SHLIBSEXT) $$initfini'
LDCOMBINE_TAIL='-Wl,-exports_file -Wl,$(SHLIB_EXPORT_FILE)'
SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
# no gprof for Irix...
@@ -250,12 +256,16 @@ mips-*-netbsd*)
*-*-solaris*)
if test "$krb5_cv_prog_gcc" = yes; then
- PICFLAGS=-fpic
+ PICFLAGS=-fPIC
LDCOMBINE='$(CC) -shared -h lib$(LIB)$(SHLIBSEXT)'
else
- PICFLAGS=-Kpic
+ PICFLAGS=-KPIC
# Solaris cc doesn't default to stuffing the SONAME field...
- LDCOMBINE='$(CC) -dy -G -z text -h lib$(LIB)$(SHLIBSEXT)'
+ LDCOMBINE='$(CC) -dy -G -z text -h lib$(LIB)$(SHLIBSEXT) $$initfini'
+ #
+ INIT_FINI_PREP='if test -z "$(LIBINITFUNC)"; then initfini=; else initfini="-Wl,-z,initarray=$(LIBINITFUNC)__auxinit"; fi ; if test -z "$(LIBFINIFUNC)"; then :; else initfini="$$initfini -Wl,-z,finiarray=$(LIBFINIFUNC)" ; fi'
+ use_linker_init_option=yes
+ use_linker_fini_option=yes
fi
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'