From 512d9746bfcb6fc5b6ba6532c00584a2c3a9bc88 Mon Sep 17 00:00:00 2001 From: cebtenzzre Date: Tue, 14 Nov 2023 00:08:58 -0500 Subject: [PATCH] use a more conventional macro name also fix an issue with CMake <3.26 compatibility --- CMakeLists.txt | 2 +- Makefile | 2 +- ggml-quants.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d36797f6c..db1f42f1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -464,7 +464,7 @@ execute_process( ERROR_VARIABLE output ) if (output MATCHES "dyld-1015\.7") - add_compile_definitions(-DBUGGY_APPLE_LINKER) + add_compile_definitions(HAVE_BUGGY_APPLE_LINKER) endif() # Architecture specific diff --git a/Makefile b/Makefile index 785060c14..36d08811e 100644 --- a/Makefile +++ b/Makefile @@ -241,7 +241,7 @@ endif # this version of Apple ld64 is buggy ifneq '' '$(findstring dyld-1015.7,$(shell $(CC) $(LDFLAGS) -Wl,-v 2>&1))' - MK_CPPFLAGS += -DBUGGY_APPLE_LINKER + MK_CPPFLAGS += -DHAVE_BUGGY_APPLE_LINKER endif # OS specific diff --git a/ggml-quants.c b/ggml-quants.c index 8ea22548a..dcfdfb8f4 100644 --- a/ggml-quants.c +++ b/ggml-quants.c @@ -1273,7 +1273,7 @@ static float make_qkx2_quants(int n, int nmax, const float * restrict x, const f float max = x[0]; float sum_w = weights[0]; float sum_x = sum_w * x[0]; -#ifdef BUGGY_APPLE_LINKER +#ifdef HAVE_BUGGY_APPLE_LINKER // use 'volatile' to prevent unroll and work around a bug in Apple ld64 1015.7 for (volatile int i = 1; i < n; ++i) { #else