Skip to contentSkip to conversation

util_lib: Silence ar informational message

PATCH Applied Geoff Levand 2 participants 4 messages Oct 8, 2015 – Oct 20, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 util_lib: Silence ar informational message

Add the -c option to ar to silence the informational message 'ar creating libutil.a'. ar outputs this message to stderr, and some tools interpret this as a build warning.

---
 util_lib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
util_lib/Makefile +1 -1
index 54ccdc5..15b84e5 100644
@@ -18,5 +18,5 @@ $(UTIL_LIB): CPPFLAGS += -I$(srcdir)/util_lib/include
 
 $(UTIL_LIB): $(UTIL_LIB_OBJS)
 	@$(MKDIR) -p $(@D)
-	$(AR) rs $(UTIL_LIB) $(UTIL_LIB_OBJS)
+	$(AR) rs -c $(UTIL_LIB) $(UTIL_LIB_OBJS)
 
Signature · 7 lines
2.5.0


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw

Hi Geoff,

Quoted 4 lines · Geoff Levand

Add the -c option to ar to silence the informational message 'ar creating libutil.a'. ar outputs this message to stderr, and some tools interpret this as a build warning.

I am wondering about the portability of -c.
I tried to find some documentation of it and drew a blank. Do you have any thoughts on this?

Quoted 19 lines
---
 util_lib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
util_lib/Makefile +1 -1
index 54ccdc5..15b84e5 100644
@@ -18,5 +18,5 @@ $(UTIL_LIB): CPPFLAGS += -I$(srcdir)/util_lib/include
 
 $(UTIL_LIB): $(UTIL_LIB_OBJS)
 	@$(MKDIR) -p $(@D)
-	$(AR) rs $(UTIL_LIB) $(UTIL_LIB_OBJS)
+	$(AR) rs -c $(UTIL_LIB) $(UTIL_LIB_OBJS)
 
Signature · 1 line
2.5.0

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw

Hi Simon,

Quoted 9 lines · Simon Horman
Quoted 4 lines · Geoff Levand

Add the -c option to ar to silence the informational message 'ar creating libutil.a'. ar outputs this message to stderr, and some tools interpret this as a build warning.

I am wondering about the portability of -c.
I tried to find some documentation of it and drew a blank. Do you have any thoughts on this?

I couldn't find any info either. At this point I would say don't include this.

I'll think about something else. Maybe capture the output from ar, then only print it if ar returns an error.

-Geoff

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#3 lore raw
Quoted 13 lines · Geoff Levand

Hi Simon,

Quoted 9 lines · Simon Horman
Quoted 4 lines · Geoff Levand

Add the -c option to ar to silence the informational message 'ar creating libutil.a'. ar outputs this message to stderr, and some tools interpret this as a build warning.

I am wondering about the portability of -c.
I tried to find some documentation of it and drew a blank. Do you have any thoughts on this?

Quoted 5 lines

I couldn't find any info either. At this point I would say don't include this.

I'll think about something else. Maybe capture the output from ar, then only print it if ar returns an error.

Sounds messy but it may be the lest-worst solution.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec