diff options
author | Pavol Rusnak <pavol@rusnak.io> | 2023-04-30 20:48:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-30 20:48:38 +0200 |
commit | 6f796992869f306c48484d62a39f2a181ae2fd6f (patch) | |
tree | 3adef9653fbe9f8573f3b97ac838c0476670adb9 /Makefile | |
parent | a5d30b1f53677cb50791fec41c43e93274347303 (diff) |
build: add armv{6,7,8} support to cmake (#1251)
- flags copied from Makefile
- updated comments in both CMakeLists.txt and Makefile to match reality
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -135,19 +135,21 @@ ifdef LLAMA_PERF CXXFLAGS += -DGGML_PERF endif ifneq ($(filter aarch64%,$(UNAME_M)),) + # Apple M1, M2, etc. + # Raspberry Pi 3, 4, Zero 2 (64-bit) CFLAGS += -mcpu=native CXXFLAGS += -mcpu=native endif ifneq ($(filter armv6%,$(UNAME_M)),) - # Raspberry Pi 1, 2, 3 + # Raspberry Pi 1, Zero CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access endif ifneq ($(filter armv7%,$(UNAME_M)),) - # Raspberry Pi 4 + # Raspberry Pi 2 CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations endif ifneq ($(filter armv8%,$(UNAME_M)),) - # Raspberry Pi 4 + # Raspberry Pi 3, 4, Zero 2 (32-bit) CFLAGS += -mfp16-format=ieee -mno-unaligned-access endif |