Skip to content

Commit bc6bcdf

Browse files
committed
make : pass Raspberry Pi arch flags to g++ as well
1 parent 8fab099 commit bc6bcdf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,20 @@ endif
193193

194194
ifneq ($(filter armv6%,$(UNAME_M)),)
195195
# Raspberry Pi 1, Zero
196-
CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access
196+
CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access
197+
CXXFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access
197198
endif
198199

199200
ifneq ($(filter armv7%,$(UNAME_M)),)
200201
# Raspberry Pi 2
201-
CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations
202+
CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations
203+
CXXFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations
202204
endif
203205

204206
ifneq ($(filter armv8%,$(UNAME_M)),)
205207
# Raspberry Pi 3, 4, Zero 2 (32-bit)
206-
CFLAGS += -mfp16-format=ieee -mno-unaligned-access
208+
CFLAGS += -mfp16-format=ieee -mno-unaligned-access
209+
CXXFLAGS += -mfp16-format=ieee -mno-unaligned-access
207210
endif
208211

209212
ifneq ($(filter ppc64%,$(UNAME_M)),)

0 commit comments

Comments
 (0)