From: Ken Raeburn Date: Tue, 29 Nov 2005 04:31:03 +0000 (+0000) Subject: * shlib.conf (*-*-solaris*): Include $(CFLAGS) in LDCOMBINE. Don't use X-Git-Tag: ms-bug-test-20060525~61 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=67ee36160f858b509f5cbdae3591ca7f4b79a80e;p=krb5.git * shlib.conf (*-*-solaris*): Include $(CFLAGS) in LDCOMBINE. Don't use compiler command-line options for initializers for Solaris 7 and earlier native compilers. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17512 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/config/ChangeLog b/src/config/ChangeLog index 7471e1fbd..6dd123327 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,9 @@ +2005-11-28 Ken Raeburn + + * 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 * libnover.in (LIBLIST): Use DYNOBJEXT instead of SHLIBEXT. diff --git a/src/config/shlib.conf b/src/config/shlib.conf index cc42c75be..9d9a2066b 100644 --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -299,16 +299,22 @@ mips-*-netbsd*) *-*-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)'