From 1d4d9db45b377feeeb45c610023bc27ea296bf1c Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Fri, 11 Jul 2025 00:53:06 +0200 Subject: [PATCH] fix bug on Makefile with detection of Apple Silicon systems --- src/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index cf85746aa..575c23589 100644 --- a/src/Makefile +++ b/src/Makefile @@ -85,7 +85,7 @@ AR := /usr/bin/ar SED := /usr/bin/sed SED_IN_PLACE := -i "" DARWIN_VERSION := $(shell uname -r | cut -d. -f1) -IS_APPLE_SILICON := $(shell lipo /bin/zsh -verify_arch arm64e && echo 1 || echo 0) +IS_APPLE_SILICON := $(shell [ "$$(sysctl -in hw.optional.arm64 2>/dev/null)" = "1" ] && echo 1 || echo 0) endif ifneq (,$(filter $(UNAME),FreeBSD NetBSD)) @@ -237,8 +237,10 @@ CFLAGS_UNRAR += -Wno-class-memaccess CFLAGS_UNRAR += -Wno-misleading-indentation CFLAGS_UNRAR += -Wno-format-overflow else +ifeq ($(IS_APPLE_SILICON),0) CFLAGS_UNRAR += -Wno-nontrivial-memcall endif +endif CFLAGS_UNRAR += -Wno-missing-braces CFLAGS_UNRAR += -Wno-unused-variable CFLAGS_UNRAR += -Wno-unused-parameter