From fe5a6f33e057bac52e28f73bae2f378667fa27ff Mon Sep 17 00:00:00 2001 From: Potuz Date: Fri, 24 May 2024 08:01:52 -0300 Subject: [PATCH] Bypass clang's assembler --- src/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Makefile b/src/Makefile index b785234..38536f7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -25,12 +25,23 @@ WIN = $(shell $(CC) -dM -E - < /dev/null | grep "__WIN64__" | awk '{ print $$3 } VERSION := 0.1.0 + ASFLAGS += -g -fpic CFLAGS += -g -Wall -Werror +CLANG_ASFLAGS = "-fno-integrated-as" LDFLAGS += -L . testlibs = -lhashtree benchlibs = -lhashtree -lm +COMPILER_NAME := $(shell $(CC) --version 2>/dev/null | head -n 1) +IS_CLANG := $(findstring clang, $(COMPILER_NAME)) + +ifeq ($(IS_CLANG),clang) +ifneq ($(ARM),1) + ASFLAGS += $(CLANG_ASFLAGS) +endif +endif + ifeq ($(HAVE_OPENSSL),1) CFLAGS += -DHAVE_OPENSSL benchlibs += -lcrypto