Always recreate library archives

GNU ar only uses a flat module (object) name space but supports multiple
instances of objects with the same name. As we use subdirectories with
source file names that may clash (e.g., signal/common.cc and
server/common.cc in the base library) some of our static library
archives have multiple object instances. This is not an issue on archive
creation but works not as expected when updating archives. To avoid
updates of library archives we delete the files before calling GNU ar.
This commit is contained in:
Christian Helmuth 2016-04-28 18:41:47 +02:00
parent 549f77eafe
commit 861508ad68

View File

@ -145,7 +145,8 @@ include $(BASE_DIR)/mk/generic.mk
#
$(LIB_A): $(OBJECTS)
$(MSG_MERGE)$(LIB_A)
$(VERBOSE)$(AR) -rc $@ $(OBJECTS)
$(VERBOSE)$(RM) -f $@
$(VERBOSE)$(AR) -rcs $@ $(OBJECTS)
#
# Rename from object to rlib
#