Skip to content

Commit 516ad1c

Browse files
justinkbvondele
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 #3597 No functional change
1 parent ec8dfe7 commit 516ad1c

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
@@ -386,10 +386,12 @@ ifeq ($(COMP),clang)
386386
ifneq ($(KERNEL),Darwin)
387387
ifneq ($(KERNEL),OpenBSD)
388388
ifneq ($(KERNEL),FreeBSD)
389+
ifneq ($(RTLIB),compiler-rt)
389390
LDFLAGS += -latomic
390391
endif
391392
endif
392393
endif
394+
endif
393395

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

0 commit comments

Comments
 (0)