From 4bab8cb243d083c79f79068f6c74cae6abb28349 Mon Sep 17 00:00:00 2001 From: david raistrick Date: Wed, 29 Mar 2023 20:31:18 -0400 Subject: [PATCH] fix darwin f16c flags check ...there was no check. ported upstream from https://github.com/zanussbaum/gpt4all.cpp/pull/2 (I dont see any clean path for upstream patches) --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9cfa89f7a..83a4514ef 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,10 @@ endif # feel free to update the Makefile for your architecture and send a pull request or issue ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686)) ifeq ($(UNAME_S),Darwin) - CFLAGS += -mf16c + F16C_M := $(shell sysctl machdep.cpu.features) + ifneq (,$(findstring F16C,$(F16C_M))) + CFLAGS += -mf16c + endif AVX1_M := $(shell sysctl machdep.cpu.features) ifneq (,$(findstring FMA,$(AVX1_M))) CFLAGS += -mfma