When the library already exists in the build directory, "ar" preserves
members not named on its command line.  This mattered when, for example,
a "configure" rerun dropped a file from $(LIBOBJS).  libpgport carried
the obsolete member until "make clean".  Back-patch to 9.0 (all
supported versions).
 
 ifndef haslibarule
 $(stlib): $(OBJS) | $(SHLIB_PREREQS)
+   rm -f $@
    $(LINK.static) $@ $^
    $(RANLIB) $@
 endif #haslibarule
 
 # AIX case
 $(shlib) $(stlib): $(OBJS) | $(SHLIB_PREREQS)
+   rm -f $(stlib)
    $(LINK.static) $(stlib) $^
    $(RANLIB) $(stlib)
    $(MKLDEXPORT) $(stlib) >$(exports_file)
    $(CC) $(CFLAGS)  -shared -o $@  $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE)
 
 $(stlib): $(OBJS) | $(SHLIB_PREREQS)
+   rm -f $@
    $(LINK.static) $@ $^
    $(RANLIB) $@
 
 
    rm -f '$(DESTDIR)$(libdir)/libpgcommon.a'
 
 libpgcommon.a: $(OBJS_FRONTEND)
+   rm -f $@
    $(AR) $(AROPT) $@ $^
 
 #
 #
 
 libpgcommon_srv.a: $(OBJS_SRV)
+   rm -f $@
    $(AR) $(AROPT) $@ $^
 
 # Because this uses its own compilation rule, it doesn't use the
 
    rm -f '$(DESTDIR)$(libdir)/libpgport.a'
 
 libpgport.a: $(OBJS)
+   rm -f $@
    $(AR) $(AROPT) $@ $^
 
 # thread.o needs PTHREAD_CFLAGS (but thread_srv.o does not)
 #
 
 libpgport_srv.a: $(OBJS_SRV)
+   rm -f $@
    $(AR) $(AROPT) $@ $^
 
 # Because this uses its own compilation rule, it doesn't use the