Skip to content

Commit aac1710

Browse files
clach04ggerganov
andauthored
make : 32-bit ARM flags (#486)
* issue #470 - working 32-bit ARM * Update Makefile * Update Makefile --------- Co-authored-by: Georgi Gerganov <[email protected]>
1 parent 21c1e6a commit aac1710

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,15 @@ ifneq ($(filter aarch64%,$(UNAME_M)),)
151151
CXXFLAGS += -mcpu=native
152152
endif
153153
ifneq ($(filter armv6%,$(UNAME_M)),)
154-
# Raspberry Pi 1, 2, 3
155-
CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access
154+
# 32-bit Raspberry Pi 1, 2, 3
155+
CFLAGS += -mfpu=neon -mfp16-format=ieee -mno-unaligned-access
156156
endif
157157
ifneq ($(filter armv7%,$(UNAME_M)),)
158-
# Raspberry Pi 4
159-
CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations
158+
# 32-bit ARM, for example on Armbian or possibly raspbian
159+
CFLAGS += -mfpu=neon -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations
160+
161+
# 64-bit ARM, use these (TODO: auto-detect 64-bit)
162+
# CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations
160163
endif
161164
ifneq ($(filter armv8%,$(UNAME_M)),)
162165
# Raspberry Pi 4

0 commit comments

Comments
 (0)