Skip to content

Commit f157088

Browse files
authored
makefile: Fix CPU feature detection on Haiku (abetlen#218)
1 parent c86ba03 commit f157088

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,20 +133,20 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
133133
CFLAGS += -mavx512pf
134134
endif
135135
else ifeq ($(UNAME_S),Haiku)
136-
AVX1_M := $(shell sysinfo -cpu | grep "AVX ")
137-
ifneq (,$(findstring avx,$(AVX1_M)))
136+
AVX1_M := $(shell sysinfo -cpu | grep -w "AVX")
137+
ifneq (,$(findstring AVX,$(AVX1_M)))
138138
CFLAGS += -mavx
139139
endif
140-
AVX2_M := $(shell sysinfo -cpu | grep "AVX2 ")
141-
ifneq (,$(findstring avx2,$(AVX2_M)))
140+
AVX2_M := $(shell sysinfo -cpu | grep -w "AVX2")
141+
ifneq (,$(findstring AVX2,$(AVX2_M)))
142142
CFLAGS += -mavx2
143143
endif
144-
FMA_M := $(shell sysinfo -cpu | grep "FMA ")
145-
ifneq (,$(findstring fma,$(FMA_M)))
144+
FMA_M := $(shell sysinfo -cpu | grep -w "FMA")
145+
ifneq (,$(findstring FMA,$(FMA_M)))
146146
CFLAGS += -mfma
147147
endif
148-
F16C_M := $(shell sysinfo -cpu | grep "F16C ")
149-
ifneq (,$(findstring f16c,$(F16C_M)))
148+
F16C_M := $(shell sysinfo -cpu | grep -w "F16C")
149+
ifneq (,$(findstring F16C,$(F16C_M)))
150150
CFLAGS += -mf16c
151151
endif
152152
else

0 commit comments

Comments
 (0)