For Irix - determine if using gcc and gnu ld - set compiler flags properly
authorEzra Peisach <epeisach@mit.edu>
Mon, 23 Oct 2006 03:20:11 +0000 (03:20 +0000)
committerEzra Peisach <epeisach@mit.edu>
Mon, 23 Oct 2006 03:20:11 +0000 (03:20 +0000)
ticket: 4455

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18733 dc483132-0cff-0310-8789-dd5450dbe970

src/config/shlib.conf

index eeb073816abb40cafd3afc0f4a35817193d217b2..3e75b8767873a17c8ce5b79c0660452f0d225681 100644 (file)
@@ -180,7 +180,13 @@ mips-sgi-irix*)
                INIT_FINI_PREP='initfini=; for f in . $(LIBINITFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-init,$${f}__auxinit"; fi; done; for f in . $(LIBFINIFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-fini,$${f}"; fi; done'
                LDCOMBINE_TAIL='-Wl,-exports_file -Wl,$(SHLIB_EXPORT_FILE)'
        fi
-       LDCOMBINE='$(CC) -shared -Wl,-ignore_unresolved -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) $$initfini'
+       opts='-Wl,-ignore_unresolved -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations'
+
+       if test "$krb5_cv_prog_gcc" = yes \
+               && test "$krb5_cv_prog_gnu_ld" = yes; then
+               opts=''
+       fi
+       LDCOMBINE='$(CC) -shared '$opts' -Wl,-soname -Wl,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) $$initfini'
        SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
        # no gprof for Irix...
        PROFFLAGS=-p