From 861508ad68ac0176379c26faf6fe44f4f1b3d54f Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 28 Apr 2016 18:41:47 +0200 Subject: [PATCH] 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. --- repos/base/mk/lib.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/base/mk/lib.mk b/repos/base/mk/lib.mk index 623b14d36d..22a175af15 100644 --- a/repos/base/mk/lib.mk +++ b/repos/base/mk/lib.mk @@ -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 #