xen: remove the usage of the P ar option
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 30 Dec 2020 17:34:46 +0000 (18:34 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 31 Dec 2020 16:19:00 +0000 (16:19 +0000)
It's not part of the POSIX standard [0] and as such non GNU ar
implementations don't usually have it.

It's not relevant for the use case here anyway, as the archive file is
recreated every time due to the rm invocation before the ar call. No
file name matching should happen so matching using the full path name
or a relative one should yield the same result.

This fixes the build on FreeBSD.

While there also drop the s option, as ar will already generate a
symbol table by default when creating the archive.

[0] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ar.html

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/Rules.mk

index aba6ca2a90f5aad049f624525d82a64290910688..ceb3d204b84f7ddfa452b61f9fedb3233611766f 100644 (file)
@@ -71,7 +71,7 @@ cmd_ld = $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %.a,$(real-prereqs)) \
 # ---------------------------------------------------------------------------
 
 quiet_cmd_ar = AR      $@
-cmd_ar = rm -f $@; $(AR) cPrs $@ $(real-prereqs)
+cmd_ar = rm -f $@; $(AR) cr $@ $(real-prereqs)
 
 # Objcopy
 # ---------------------------------------------------------------------------