lvs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sergey V. Lobanov" <sergey@lobanov.in>
To: lvs-devel@vger.kernel.org
Cc: "Sergey V. Lobanov" <sergey@lobanov.in>
Subject: [PATCH] ipvsadm: allow to redefine AR (libipvs)
Date: Sat,  5 Feb 2022 00:52:15 +0300	[thread overview]
Message-ID: <20220204215215.94422-1-sergey@lobanov.in> (raw)

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 <sergey@lobanov.in>
---
 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)


             reply	other threads:[~2022-02-04 21:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 21:52 Sergey V. Lobanov [this message]
2022-02-20 11:02 ` [PATCH] ipvsadm: allow to redefine AR (libipvs) Julian Anastasov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220204215215.94422-1-sergey@lobanov.in \
    --to=sergey@lobanov.in \
    --cc=lvs-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).