Skip to content

Commit 5024b45

Browse files
committed
tools: fix linking errors with pthread on some environments
(cherry picked from commit d301cd8) # Conflicts: # tools/Makefile
1 parent e037067 commit 5024b45

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tools/Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
N64_GCCPREFIX ?= $(N64_INST)
22
INSTALLDIR ?= $(N64_INST)
3-
CFLAGS += -std=gnu11 -O2 -Wall -Werror -Wno-unused-result -Wno-error=unknown-pragmas -Wno-sign-compare -I../include -MMD
4-
CXXFLAGS += -std=gnu++17 -O2 -Wall -Werror -Wno-unused-result -Wno-error=unknown-pragmas -Wno-sign-compare -Wno-c++11-narrowing -Wno-narrowing -Wno-error=conversion-null -MMD
3+
4+
C_CXX_FLAGS += -O2 -pthread -Wall -Werror
5+
C_CXX_FLAGS += -I../include -MMD
6+
C_CXX_FLAGS += -fdiagnostics-color=always
7+
C_CXX_FLAGS += -Wno-unused-result -Wno-error=unknown-pragmas -Wno-sign-compare
8+
9+
LDFLAGS += -pthread
10+
11+
CFLAGS += -std=gnu11 $(C_CXX_FLAGS)
12+
CXXFLAGS += -std=gnu++17 $(C_CXX_FLAGS)
13+
CXXFLAGS += -Wno-c++11-narrowing -Wno-narrowing -Wno-error=conversion-null
514

615
ifeq ($(OS),Windows_NT)
716
CFLAGS += -static

0 commit comments

Comments
 (0)