Skip to content

Commit

Permalink
Fix issue #175
Browse files Browse the repository at this point in the history
  • Loading branch information
saleyn committed Mar 29, 2024
1 parent 5150d2b commit 2e151f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion c_src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@ HAVE_FORMAT ?= $(C20_FEATURES)
HAVE_SRCLOC ?= $(C20_FEATURES)

ifeq ($(UNAME_SYS),linux)
ifeq ($(shell gcc -march=native -dM -E - </dev/null | awk '/__AVX2__/ { print $$3 }'),1)
CXXFLAGS += -mavx2
else ifeq ($(shell gcc -march=native -dM -E - </dev/null | awk '/__AVX__/ { print $$3 }'),1)
CXXFLAGS += -mavx
endif

SYSROOT := $(shell $(CXX) -print-sysroot)
CXXFLAGS += -mavx2 -DHAVE_SETRESUID -DHAVE_PIPE2 $(X64)
CXXFLAGS += -DHAVE_SETRESUID -DHAVE_PIPE2 $(X64)
# Check for Linux capability API (Install package: libcap-devel)
ifneq ($(wildcard $(SYSROOT)/usr/include/sys/capability.h),)
CXXFLAGS += -DHAVE_CAP
Expand Down

0 comments on commit 2e151f2

Please sign in to comment.