Skip to content

Commit 5caab5c

Browse files
authored
fix darwin f16c flag check
there was no check. ported from zanussbaum#2
1 parent 6041736 commit 5caab5c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ endif
6262
# feel free to update the Makefile for your architecture and send a pull request or issue
6363
ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
6464
ifeq ($(UNAME_S),Darwin)
65-
CFLAGS += -mf16c
65+
F16C_M := $(shell sysctl machdep.cpu.features)
66+
ifneq (,$(findstring F16C,$(F16C_M)))
67+
CFLAGS += -mf16c
68+
endif
6669
AVX1_M := $(shell sysctl machdep.cpu.features)
6770
ifneq (,$(findstring FMA,$(AVX1_M)))
6871
CFLAGS += -mfma

0 commit comments

Comments
 (0)