Skip to content

Commit

Permalink
posix.mak: Don't link pthread and libmath on MacOS
Browse files Browse the repository at this point in the history
The linker errors out on MacOS 11.
  • Loading branch information
Geod24 committed Aug 7, 2022
1 parent 1d93fa3 commit 8e5ef25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ OUTFILEFLAG = -o
NODEFAULTLIB=-defaultlib= -debuglib=
ifeq (,$(findstring win,$(OS)))
CFLAGS=$(MODEL_FLAG) -fPIC -std=c11 -DHAVE_UNISTD_H
NODEFAULTLIB += -L-lpthread -L-lm
# Bundled with the system library on OSX, and doesn't work with >= MacOS 11
ifneq (osx,$(OS))
NODEFAULTLIB += -L-lpthread -L-lm
endif
ifeq ($(BUILD),debug)
CFLAGS += -g
else
Expand Down

0 comments on commit 8e5ef25

Please sign in to comment.