Skip to content

Commit f471aec

Browse files
committed
Specify -pthread when needed
Without this patch, 'make ENABLE_GDBSTUB=0 ENABLE_SDL=1' would fail to link.
1 parent e7d873d commit f471aec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $(call set-feature, SDL)
6565
ifeq ($(call has, SDL), 1)
6666
OBJS_EXT += syscall_sdl.o
6767
$(OUT)/syscall_sdl.o: CFLAGS += $(shell sdl2-config --cflags)
68-
LDFLAGS += $(shell sdl2-config --libs)
68+
LDFLAGS += $(shell sdl2-config --libs) -pthread
6969
LDFLAGS += $(shell pkg-config --libs SDL2_mixer)
7070
endif
7171

@@ -83,7 +83,7 @@ $(GDBSTUB_LIB): src/mini-gdbstub/Makefile
8383
$(OUT)/decode.o: $(GDBSTUB_LIB)
8484
OBJS_EXT += gdbstub.o breakpoint.o
8585
CFLAGS += -D'GDBSTUB_COMM="$(GDBSTUB_COMM)"'
86-
LDFLAGS += $(GDBSTUB_LIB) -lpthread
86+
LDFLAGS += $(GDBSTUB_LIB) -pthread
8787
gdbstub-test: $(BIN)
8888
$(Q).ci/gdbstub-test.sh && $(call notice, [OK])
8989
endif

0 commit comments

Comments
 (0)