From 516ad1c9bf7dceeeb055e250d8cd83598c01a531 Mon Sep 17 00:00:00 2001 From: Paul Mulders Date: Tue, 29 Jun 2021 11:13:54 +0200 Subject: [PATCH] Allow passing RTLIB=compiler-rt to make Not all linux users will have libatomic installed. When using clang as the system compiler with compiler-rt as the default runtime library instead of libgcc, atomic builtins may be provided by compiler-rt. This change allows such users to pass RTLIB=compiler-rt to make sure the build doesn't error out on the missing (unnecessary) libatomic. closes https://github.com/official-stockfish/Stockfish/pull/3597 No functional change --- src/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Makefile b/src/Makefile index bf3c3560..1d972cff 100644 --- a/src/Makefile +++ b/src/Makefile @@ -386,10 +386,12 @@ ifeq ($(COMP),clang) ifneq ($(KERNEL),Darwin) ifneq ($(KERNEL),OpenBSD) ifneq ($(KERNEL),FreeBSD) + ifneq ($(RTLIB),compiler-rt) LDFLAGS += -latomic endif endif endif + endif ifeq ($(arch),$(filter $(arch),armv7 armv8)) ifeq ($(OS),Android) -- 2.39.2