>From 4415adea632ca0fee80e10b6cd73b590417a2266 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 27 Jun 2019 08:10:04 +0000 Subject: [PATCH] configure: make AR and RANLIB customizable --- Makefile | 2 -- configure | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b46f8ca4..6842983b 100644 --- a/Makefile +++ b/Makefile @@ -51,8 +51,6 @@ CFLAGS_ALL += $(CPPFLAGS) $(CFLAGS_AUTO) $(CFLAGS) LDFLAGS_ALL = $(LDFLAGS_AUTO) $(LDFLAGS) -AR = $(CROSS_COMPILE)ar -RANLIB = $(CROSS_COMPILE)ranlib INSTALL = $(srcdir)/tools/install.sh ARCH_INCLUDES = $(wildcard $(srcdir)/arch/$(ARCH)/bits/*.h) diff --git a/configure b/configure index 60e0b1fc..86801281 100755 --- a/configure +++ b/configure @@ -172,6 +172,8 @@ case "$arg" in --host=*|--target=*) target=${arg#*=} ;; --build=*) build=${arg#*=} ;; -* ) echo "$0: unknown option $arg" ;; +AR=*) AR=${arg#*=} ;; +RANLIB=*) RANLIB=${arg#*=} ;; CC=*) CC=${arg#*=} ;; CFLAGS=*) CFLAGS=${arg#*=} ;; CPPFLAGS=*) CPPFLAGS=${arg#*=} ;; @@ -734,6 +736,8 @@ cat << EOF # This version of config.mak was generated by: # $cmdline # Any changes made here will be lost if configure is re-run +AR = ${AR:-\$(CROSS_COMPILE)ar} +RANLIB = ${RANLIB:-\$(CROSS_COMPILE)ranlib} ARCH = $ARCH SUBARCH = $SUBARCH ASMSUBARCH = $ASMSUBARCH -- 2.22.0