mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
tools: ynl: build archives with $(AR)
Use $(AR) to allow build system to override the archiver tool (e.g., when cross-compiling for a different architecture) by setting the AR environment variable. GNU Make defaults AR to ar, so this change will not break existing build environments that do not explicitly set AR. Fixes:07c3cc51a0("tools: net: package libynl for use in selftests") Fixes:86878f14d7("tools: ynl: user space helpers") Signed-off-by: Greg Thelen <gthelen@google.com> Link: https://patch.msgid.link/20260622161659.145047-1-gthelen@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
87ab8276ed
commit
8c37e76f96
@@ -22,7 +22,7 @@ tests: | lib generated libynl.a
|
||||
ynltool: | lib generated libynl.a
|
||||
libynl.a: | lib generated
|
||||
@echo -e "\tAR $@"
|
||||
@ar rcs $@ lib/ynl.o generated/*-user.o
|
||||
@$(AR) rcs $@ lib/ynl.o generated/*-user.o
|
||||
|
||||
$(SUBDIRS):
|
||||
@if [ -f "$@/Makefile" ] ; then \
|
||||
|
||||
@@ -37,7 +37,7 @@ all: protos.a $(HDRS) $(SRCS) $(KHDRS) $(KSRCS) $(UAPI) $(RSTS)
|
||||
|
||||
protos.a: $(OBJS)
|
||||
@echo -e "\tAR $@"
|
||||
@ar rcs $@ $(OBJS)
|
||||
@$(AR) rcs $@ $(OBJS)
|
||||
|
||||
%-user.h: $(SPECS_DIR)/%.yaml $(TOOL)
|
||||
@echo -e "\tGEN $@"
|
||||
|
||||
@@ -15,7 +15,7 @@ all: ynl.a
|
||||
|
||||
ynl.a: $(OBJS)
|
||||
@echo -e "\tAR $@"
|
||||
@ar rcs $@ $(OBJS)
|
||||
@$(AR) rcs $@ $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.d *~
|
||||
|
||||
Reference in New Issue
Block a user