clach04 ggerganov commited on
Commit
4fc344e
·
unverified ·
1 Parent(s): 7988939

make : 32-bit ARM flags (#486)

Browse files

* issue #470 - working 32-bit ARM

* Update Makefile

* Update Makefile

---------

Co-authored-by: Georgi Gerganov <[email protected]>

Files changed (1) hide show
  1. Makefile +7 -4
Makefile CHANGED
@@ -151,12 +151,15 @@ ifneq ($(filter aarch64%,$(UNAME_M)),)
151
  CXXFLAGS += -mcpu=native
152
  endif
153
  ifneq ($(filter armv6%,$(UNAME_M)),)
154
- # Raspberry Pi 1, 2, 3
155
- CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access
156
  endif
157
  ifneq ($(filter armv7%,$(UNAME_M)),)
158
- # Raspberry Pi 4
159
- CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations
 
 
 
160
  endif
161
  ifneq ($(filter armv8%,$(UNAME_M)),)
162
  # Raspberry Pi 4
 
151
  CXXFLAGS += -mcpu=native
152
  endif
153
  ifneq ($(filter armv6%,$(UNAME_M)),)
154
+ # 32-bit Raspberry Pi 1, 2, 3
155
+ CFLAGS += -mfpu=neon -mfp16-format=ieee -mno-unaligned-access
156
  endif
157
  ifneq ($(filter armv7%,$(UNAME_M)),)
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
163
  endif
164
  ifneq ($(filter armv8%,$(UNAME_M)),)
165
  # Raspberry Pi 4