diff --git a/Make.defaults b/Make.defaults index 2531ff6..e0c5a10 100755 --- a/Make.defaults +++ b/Make.defaults @@ -117,6 +117,12 @@ GCCNEWENOUGH := $(shell ( [ $(GCCVERSION) -gt "4" ] \ && [ $(GCCMINOR) -ge "7" ] ) ) \ && echo 1) +AR_IS_LLVM := $(shell $(AR) --version 2>&1 | grep -q 'llvm' && echo 1) +IS_APPLE := $(shell $(CC) --version 2>&1 | grep -q 'appleclang' && echo 1) +ifeq ($(IS_APPLE),1) +AR_IS_LLVM = 1 +endif + # # Where to build the package # @@ -220,10 +226,13 @@ ifneq ($(IS_MINGW32),) CFLAGS += -Wno-error=maybe-uninitialized -Wno-maybe-uninitialized endif -ifeq ($(V),1) -ARFLAGS := rDv +ifeq ($(AR_IS_LLVM),1) +ARFLAGS = r else -ARFLAGS := rD +ARFLAGS = rD +endif +ifeq ($(V),1) +ARFLAGS += v endif ASFLAGS += $(ARCH3264) LDFLAGS += -nostdlib