diff mbox series

[2/2] libtracefs: make the libtracefs.a gen more robust

Message ID 20210820235043.1450620-3-warthog9@eaglescrag.net (mailing list archive)
State Accepted
Commit 550d8358bc7535c1d59cfa5caec773f2fdab1eb8
Headers show
Series [1/2] libtracefs: sqlhist - fix build dependency | expand

Commit Message

John 'Warthog9' Hawley Aug. 20, 2021, 11:50 p.m. UTC
There apparently is a possibility (during an SMP compile) of ar getting
confused about what's going on with libtracefs.a, and throwing a hard to
track down error and truncating the file.  Making the rm operation a bit
 more atomic seems to alleviate this error

Signed-off-by: John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net>
---
 scripts/utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/utils.mk b/scripts/utils.mk
index 32a9b3c..7a88b10 100644
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -52,7 +52,7 @@  do_app_build =						\
 
 do_build_static_lib =				\
 	($(print_static_lib_build)		\
-	$(RM) $@;  $(AR) rcs $@ $^)
+	mv $@ $@.rm; $(RM) $@.rm;  $(AR) rcs $@ $^)
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\