Skip to content

Commit 1489275

Browse files
justinkbMichaelB7
authored andcommitted
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 official-stockfish#3597 No functional change
1 parent 7b936af commit 1489275

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,12 @@ ifeq ($(COMP),clang)
387387
ifneq ($(KERNEL),Darwin)
388388
ifneq ($(KERNEL),OpenBSD)
389389
ifneq ($(KERNEL),FreeBSD)
390+
ifneq ($(RTLIB),compiler-rt)
390391
LDFLAGS += -latomic
391392
endif
392393
endif
393394
endif
395+
endif
394396

395397
ifeq ($(arch),$(filter $(arch),armv7 armv8))
396398
ifeq ($(OS),Android)

0 commit comments

Comments
 (0)