From 8735c4782ae3344b7997549ad7d50bbad92d6de5 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Fri, 14 Jan 2022 01:18:33 -0500 Subject: [PATCH] Fixed compilation on Mac ARM - #22 --- CHANGELOG.md | 4 ++++ Makefile | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index db91a25..9a27218 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.2 (unreleased) + +- Fixed compilation on Mac ARM + ## 0.2.1 (2022-01-02) - Fixed `operator is not unique` error diff --git a/Makefile b/Makefile index 9188844..cd9accb 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,13 @@ REGRESS_OPTS = --inputdir=test OPTFLAGS = -march=native +# Mac ARM doesn't support -march=native +ifeq ($(shell uname -s), Darwin) + ifeq ($(shell uname -p), arm) + OPTFLAGS = + endif +endif + # For auto-vectorization: # - GCC (needs -ftree-vectorize OR -O3) - https://gcc.gnu.org/projects/tree-ssa/vectorization.html # - Clang (could use pragma instead) - https://llvm.org/docs/Vectorizers.html