From: clach04 Date: Wed, 29 Mar 2023 20:11:35 +0000 (-0700) Subject: make : 32-bit ARM flags (#486) X-Git-Tag: upstream/1.7.4~1528 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=aac1710afb5c021429bde4f5631d855ca2fbf8b7;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp make : 32-bit ARM flags (#486) * issue #470 - working 32-bit ARM * Update Makefile * Update Makefile --------- Co-authored-by: Georgi Gerganov --- diff --git a/Makefile b/Makefile index 12c40fb0..ecf07cac 100644 --- a/Makefile +++ b/Makefile @@ -151,12 +151,15 @@ ifneq ($(filter aarch64%,$(UNAME_M)),) CXXFLAGS += -mcpu=native endif ifneq ($(filter armv6%,$(UNAME_M)),) - # Raspberry Pi 1, 2, 3 - CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access + # 32-bit Raspberry Pi 1, 2, 3 + CFLAGS += -mfpu=neon -mfp16-format=ieee -mno-unaligned-access endif ifneq ($(filter armv7%,$(UNAME_M)),) - # Raspberry Pi 4 - CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations + # 32-bit ARM, for example on Armbian or possibly raspbian + CFLAGS += -mfpu=neon -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations + + # 64-bit ARM, use these (TODO: auto-detect 64-bit) + # CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations endif ifneq ($(filter armv8%,$(UNAME_M)),) # Raspberry Pi 4