From: Julian Anastasov Subject: Re: [PATCH] ipvsadm: allow to redefine AR (libipvs) Date: Sun, 20 Feb 2022 13:02:30 +0200 (EET) Message-ID: <5bd787cd-aba-88cb-ad8e-a197af6bf19b@ssi.bg> References: <20220204215215.94422-1-sergey@lobanov.in> Mime-Version: 1.0 Return-path: In-Reply-To: <20220204215215.94422-1-sergey@lobanov.in> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "Sergey V. Lobanov" Cc: Jesper Dangaard Brouer , Simon Horman , lvs-devel@vger.kernel.org Hello, On Sat, 5 Feb 2022, Sergey V. Lobanov wrote: > libipvs Makefile uses `ar` to build archive. On cross-compile > cross-platfrom build it fails due system ar might be incompatible > with the objects generated by $(CC). It happens if build ipvsadm > on macos using GCC Toolchain (Linux target) > > This patch allows to redefine `ar` using AR var in libipvs Makefile > > Signed-off-by: Sergey V. Lobanov Looks good to me, thanks! Acked-by: Julian Anastasov > --- > libipvs/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libipvs/Makefile b/libipvs/Makefile > index f845c8b..7e02d4d 100644 > --- a/libipvs/Makefile > +++ b/libipvs/Makefile > @@ -1,5 +1,6 @@ > # Makefile for libipvs > > +AR = ar > CC = gcc > CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC > ifneq (0,$(HAVE_NL)) > @@ -30,7 +31,7 @@ SHARED_LIB = libipvs.so > all: $(STATIC_LIB) $(SHARED_LIB) > > $(STATIC_LIB): libipvs.o ip_vs_nl_policy.o > - ar rv $@ $^ > + $(AR) rv $@ $^ > > $(SHARED_LIB): libipvs.o ip_vs_nl_policy.o > $(CC) -shared -Wl,-soname,$@ -o $@ $^ > -- > 2.32.0 (Apple Git-132) Regards -- Julian Anastasov