mk: allow AR override

To ease cross-development Gentoo alows installing only fully
qualified toolchains tools:
    x86_64-pc-linux-gnu-ar
and similar.

The change allow overriding RANLIB variable similar
to existing CC, HOST_CC, LD and friends.

Reported-by: Agostino Sarubbo
Bug: https://bugs.gentoo.org/720700
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This commit is contained in:
Sergei Trofimovich 2020-05-23 12:51:29 +01:00 committed by Anton Kochkov
parent 56faae7627
commit ca91720aed
3 changed files with 5 additions and 3 deletions

View File

@ -3,7 +3,8 @@ _INCLUDE_MK_CLANG_=1
CC?=clang
RANLIB?=ranlib
ONELIB=0
CC_AR=ar q ${LIBAR}
AR?=ar
CC_AR=${AR} q ${LIBAR}
CFLAGS+=-MD
CFLAGS_INCLUDE=-I
LDFLAGS_LINK=-l

View File

@ -4,7 +4,8 @@ CC?=gcc
OBJCOPY?=objcopy
RANLIB?=ranlib
ONELIB=0
CC_AR=ar q ${LIBAR}
AR?=ar
CC_AR=${AR} q ${LIBAR}
CFLAGS+=-MD
CFLAGS_INCLUDE=-I
LDFLAGS_LINK=-l

View File

@ -1,7 +1,7 @@
CC=tcc
RANLIB?=ranlib
ONELIB=0
AR=ar
AR?=ar
CC_AR=${AR} -r ${LIBAR}
CC_LIB=${CC} -shared -o ${LIBSO}
CFLAGS_INCLUDE=-I