+2005-11-28 Ken Raeburn <raeburn@mit.edu>
+
+ * shlib.conf (*-*-solaris*): Include $(CFLAGS) in LDCOMBINE.
+ Don't use compiler command-line options for initializers for
+ Solaris 7 and earlier native compilers.
+
2005-10-27 Ken Raeburn <raeburn@mit.edu>
* libnover.in (LIBLIST): Use DYNOBJEXT instead of SHLIBEXT.
*-*-solaris*)
if test "$krb5_cv_prog_gcc" = yes; then
PICFLAGS=-fPIC
- LDCOMBINE='$(CC) -shared -h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
+ LDCOMBINE='$(CC) $(CFLAGS) -shared -h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
else
PICFLAGS=-KPIC
# Solaris cc doesn't default to stuffing the SONAME field...
- LDCOMBINE='$(CC) -dy -G -z text -h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) $$initfini'
+ LDCOMBINE='$(CC) $(CFLAGS) -dy -G -z text -h $(LIBPREFIX)$(LIBBASE)$(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'
- INIT_FINI_PREP='initfini=; for f in . $(LIBINITFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-z,initarray=$${f}__auxinit"; fi; done; for f in . $(LIBFINIFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-z,finiarray=$$f"; fi; done'
- use_linker_init_option=yes
- use_linker_fini_option=yes
+ case $krb5_cv_host in
+ *-*-solaris2.[1-7] | *-*-solaris2.[1-7].*)
+ # Did Solaris 7 and earlier have a linker option for this?
+ ;;
+ *)
+ INIT_FINI_PREP='initfini=; for f in . $(LIBINITFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-z,initarray=$${f}__auxinit"; fi; done; for f in . $(LIBFINIFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-z,finiarray=$$f"; fi; done'
+ use_linker_init_option=yes
+ use_linker_fini_option=yes
+ ;;
+ esac
fi
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'