From c0a91ab548616ec50bf0c8c4cd43621c62e7e847 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sat, 15 Jul 2023 01:19:43 +0200 Subject: [PATCH] fix: fix LDFLAGS for rwkv.cpp Previously the libs were added by other deps that made the linker add those as well (by chance). Signed-off-by: Ettore Di Giacinto --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 3ec2213..c381203 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,15 @@ WHITE := $(shell tput -Txterm setaf 7) CYAN := $(shell tput -Txterm setaf 6) RESET := $(shell tput -Txterm sgr0) +ifndef UNAME_S +UNAME_S := $(shell uname -s) +endif + +# workaround for rwkv.cpp +ifeq ($(UNAME_S),Darwin) + CGO_LDFLAGS += -lcblas -framework Accelerate +endif + ifeq ($(BUILD_TYPE),openblas) CGO_LDFLAGS+=-lopenblas endif