Skip to content

Commit 1f0414f

Browse files
authored
make : fix darwin f16c flags check (#615)
...there was no check. ported upstream from zanussbaum#2 (I dont see any clean path for upstream patches)
1 parent 77efdf5 commit 1f0414f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ endif
7171
# feel free to update the Makefile for your architecture and send a pull request or issue
7272
ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
7373
ifeq ($(UNAME_S),Darwin)
74-
CFLAGS += -mf16c
74+
F16C_M := $(shell sysctl machdep.cpu.features)
75+
ifneq (,$(findstring F16C,$(F16C_M)))
76+
CFLAGS += -mf16c
77+
endif
7578
AVX1_M := $(shell sysctl machdep.cpu.features)
7679
ifneq (,$(findstring FMA,$(AVX1_M)))
7780
CFLAGS += -mfma

0 commit comments

Comments
 (0)