Skip to contentSkip to conversation

mk: remove "u" modifier from "ar" command

PATCH Superseded Bruce Richardson 3 participants 6 messages Jun 5, 2015 – Jun 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mk: remove "u" modifier from "ar" command

On Fedora 22, the "ar" binary operates by default in deterministic mode, making the "u" parameter irrelevant, and leading to warning messages getting printed in the build output like below.

INSTALL-LIB librte_kvargs.a
ar: u' modifier ignored since D' is the default (see `U')

There are two options to remove these warnings:
* add in the "U" flag to make "ar" non-deterministic again
* remove the "u" flag to have all objects always updated

This patch takes the second approach.

---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mk/rte.lib.mk +1 -1
index 0d7482d..6bd67aa 100644
@@ -70,7 +70,7 @@ else
 _CPU_LDFLAGS := $(CPU_LDFLAGS)
 endif
 
-O_TO_A = $(AR) crus $(LIB) $(OBJS-y)
+O_TO_A = $(AR) crs $(LIB) $(OBJS-y)
 O_TO_A_STR = $(subst ','\'',$(O_TO_A)) #'# fix syntax highlight
 O_TO_A_DISP = $(if $(V),"$(O_TO_A_STR)","  AR $(@)")
 O_TO_A_CMD = "cmd_$@ = $(O_TO_A_STR)"
Signature · 1 line
2.4.2
#1 lore raw

Hi Bruce,

Quoted 10 lines · Bruce Richardson

On Fedora 22, the "ar" binary operates by default in deterministic mode, making the "u" parameter irrelevant, and leading to warning messages getting printed in the build output like below.

INSTALL-LIB librte_kvargs.a
ar: u' modifier ignored since D' is the default (see `U')

There are two options to remove these warnings:
* add in the "U" flag to make "ar" non-deterministic again
* remove the "u" flag to have all objects always updated

Indeed, I think that removing 'u' won't have any impact in this case, as we always regenerate the full archive without updating it. However, why not explicitly use 'D' to have the same behavior across distributions?

Regards,
Olivier

Quoted 22 lines

This patch takes the second approach.

---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mk/rte.lib.mk +1 -1
index 0d7482d..6bd67aa 100644
@@ -70,7 +70,7 @@ else
 _CPU_LDFLAGS := $(CPU_LDFLAGS)
 endif
 
-O_TO_A = $(AR) crus $(LIB) $(OBJS-y)
+O_TO_A = $(AR) crs $(LIB) $(OBJS-y)
 O_TO_A_STR = $(subst ','\'',$(O_TO_A)) #'# fix syntax highlight
 O_TO_A_DISP = $(if $(V),"$(O_TO_A_STR)","  AR $(@)")
 O_TO_A_CMD = "cmd_$@ = $(O_TO_A_STR)"
#2 lore raw
Quoted 14 lines · Olivier MATZ

Hi Bruce,

Quoted 10 lines · Bruce Richardson

On Fedora 22, the "ar" binary operates by default in deterministic mode, making the "u" parameter irrelevant, and leading to warning messages getting printed in the build output like below.

INSTALL-LIB librte_kvargs.a
ar: u' modifier ignored since D' is the default (see `U')

There are two options to remove these warnings:
* add in the "U" flag to make "ar" non-deterministic again
* remove the "u" flag to have all objects always updated

Quoted 8 lines

Indeed, I think that removing 'u' won't have any impact in this case, as we always regenerate the full archive without updating it. However, why not explicitly use 'D' to have the same behavior across distributions?

Regards,
Olivier

Good question. I didn't bother adding in the "D" flag as I didn't see the need. [Basically, I asked "why" instead of "why not" :-)]
However, if folks think it's worthwhile doing, I don't think doing a V2 of this patch would tax me unduly :-)

/Bruce

Quoted 23 lines
Quoted 23 lines

This patch takes the second approach.

---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mk/rte.lib.mk +1 -1
index 0d7482d..6bd67aa 100644
@@ -70,7 +70,7 @@ else
 _CPU_LDFLAGS := $(CPU_LDFLAGS)
 endif
 
-O_TO_A = $(AR) crus $(LIB) $(OBJS-y)
+O_TO_A = $(AR) crs $(LIB) $(OBJS-y)
 O_TO_A_STR = $(subst ','\'',$(O_TO_A)) #'# fix syntax highlight
 O_TO_A_DISP = $(if $(V),"$(O_TO_A_STR)","  AR $(@)")
 O_TO_A_CMD = "cmd_$@ = $(O_TO_A_STR)"
#3 lore raw

PATCH v2 1/1 mk: remove "u" modifier from "ar" command

In reply to Bruce Richardson

On Fedora 22, the "ar" binary operates by default in deterministic mode, making the "u" parameter irrelevant, and leading to warning messages getting printed in the build output like below.

INSTALL-LIB librte_kvargs.a
ar: u' modifier ignored since D' is the default (see `U')

There are two options to remove these warnings:
* add in the "U" flag to make "ar" non-deterministic again
* remove the "u" flag to have all objects always updated

This patch takes the second approach. It also explicitly adds in the "D" flag to make behaviour consistent across different distributions which may have different defaults.

---
V2 Changes: Add in "D" flag for consistency across distros.

---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mk/rte.lib.mk +1 -1
index 0d7482d..25aa989 100644
@@ -70,7 +70,7 @@ else
 _CPU_LDFLAGS := $(CPU_LDFLAGS)
 endif
 
-O_TO_A = $(AR) crus $(LIB) $(OBJS-y)
+O_TO_A = $(AR) crDs $(LIB) $(OBJS-y)
 O_TO_A_STR = $(subst ','\'',$(O_TO_A)) #'# fix syntax highlight
 O_TO_A_DISP = $(if $(V),"$(O_TO_A_STR)","  AR $(@)")
 O_TO_A_CMD = "cmd_$@ = $(O_TO_A_STR)"
Signature · 1 line
2.4.2
Acked-by on v2 1/1
#4 lore raw

Hi Bruce,

Quoted 11 lines · Bruce Richardson

On Fedora 22, the "ar" binary operates by default in deterministic mode, making the "u" parameter irrelevant, and leading to warning messages getting printed in the build output like below.

INSTALL-LIB librte_kvargs.a
ar: u' modifier ignored since D' is the default (see `U')

There are two options to remove these warnings:
* add in the "U" flag to make "ar" non-deterministic again
* remove the "u" flag to have all objects always updated

Quoted 5 lines

This patch takes the second approach. It also explicitly adds in the "D" flag to make behaviour consistent across different distributions which may have different defaults.

Quoted 21 lines

---
V2 Changes: Add in "D" flag for consistency across distros.

---
  mk/rte.lib.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
mk/rte.lib.mk +1 -1
index 0d7482d..25aa989 100644
@@ -70,7 +70,7 @@ else
  _CPU_LDFLAGS := $(CPU_LDFLAGS)
  endif
 
-O_TO_A = $(AR) crus $(LIB) $(OBJS-y)
+O_TO_A = $(AR) crDs $(LIB) $(OBJS-y)
  O_TO_A_STR = $(subst ','\'',$(O_TO_A)) #'# fix syntax highlight
  O_TO_A_DISP = $(if $(V),"$(O_TO_A_STR)","  AR $(@)")
  O_TO_A_CMD = "cmd_$@ = $(O_TO_A_STR)"
#5 lore raw

2015-06-09 16:17, Olivier MATZ:

Quoted 12 lines · Bruce Richardson
Quoted 11 lines

On Fedora 22, the "ar" binary operates by default in deterministic mode, making the "u" parameter irrelevant, and leading to warning messages getting printed in the build output like below.

INSTALL-LIB librte_kvargs.a
ar: u' modifier ignored since D' is the default (see `U')

There are two options to remove these warnings:
* add in the "U" flag to make "ar" non-deterministic again
* remove the "u" flag to have all objects always updated

Quoted 7 lines
Quoted 5 lines

This patch takes the second approach. It also explicitly adds in the "D" flag to make behaviour consistent across different distributions which may have different defaults.

Applied, thanks