[dpdk-dev,v2] mk: remove "u" modifier from "ar" command

Message ID 1433854261-9079-1-git-send-email-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Bruce Richardson June 9, 2015, 12:51 p.m. UTC
  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.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

---
V2 Changes: Add in "D" flag for consistency across distros.
---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Olivier Matz June 9, 2015, 2:17 p.m. UTC | #1
Hi Bruce,

On 06/09/2015 02:51 PM, Bruce Richardson wrote:
> 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.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Acked-by: Olivier Matz <olivier.matz@6wind.com>


>
> ---
> V2 Changes: Add in "D" flag for consistency across distros.
> ---
>   mk/rte.lib.mk | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> index 0d7482d..25aa989 100644
> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -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)"
>
  
Thomas Monjalon June 29, 2015, 12:30 p.m. UTC | #2
2015-06-09 16:17, Olivier MATZ:
> On 06/09/2015 02:51 PM, Bruce Richardson wrote:
> > 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.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks
  

Patch

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index 0d7482d..25aa989 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -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)"