From 369676baf4f1dce0c6290d6b126fab0df8472d49 Mon Sep 17 00:00:00 2001 From: Attila Rajmund Nohl Date: Tue, 30 Nov 2021 09:48:56 +0100 Subject: [PATCH] Fix NIF compilation on Apple M1. The Apple M1 processor is not x86_64, so don't specify this architecture for all C compilations on Mac OS. --- priv/templates/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/priv/templates/Makefile b/priv/templates/Makefile index 1e9b6cbb8..fdfc4b2dd 100644 --- a/priv/templates/Makefile +++ b/priv/templates/Makefile @@ -18,9 +18,9 @@ C_SRC_OUTPUT ?= $(CURDIR)/../priv/$(PROJECT).so UNAME_SYS := $(shell uname -s) ifeq ($(UNAME_SYS), Darwin) CC ?= cc - CFLAGS ?= -O3 -std=c99 -arch x86_64 -finline-functions -Wall -Wmissing-prototypes - CXXFLAGS ?= -O3 -arch x86_64 -finline-functions -Wall - LDFLAGS ?= -arch x86_64 -flat_namespace -undefined suppress + CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes + CXXFLAGS ?= -O3 -finline-functions -Wall + LDFLAGS ?= -flat_namespace -undefined suppress else ifeq ($(UNAME_SYS), FreeBSD) CC ?= cc CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes