From ff449fd9b74aa88fba58530de5aaf376f3d16510 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 23 Nov 2024 15:02:27 -0500 Subject: build: Check for -pthread before using it QNX's qcc, for example, will complain that cc1: error: command-line option '-pthread' is valid for the driver but not for C --- build/flags.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'build/flags.mk') diff --git a/build/flags.mk b/build/flags.mk index 2562e03..9f552a8 100644 --- a/build/flags.mk +++ b/build/flags.mk @@ -8,7 +8,7 @@ include gen/vars.mk # Internal flags _CPPFLAGS := -Isrc -Igen -include src/prelude.h -_CFLAGS := -std=c17 -pthread +_CFLAGS := -std=c17 _LDFLAGS := _LDLIBS := @@ -16,6 +16,7 @@ _LDLIBS := LDLIBS,DragonFly := -lposix1e LDLIBS,Linux := -lrt LDLIBS,NetBSD := -lutil +LDLIBS,QNX := -lregex -lsocket LDLIBS,SunOS := -lsec -lsocket -lnsl _LDLIBS += ${LDLIBS,${OS}} @@ -90,7 +91,8 @@ AUTO_FLAGS := \ gen/flags/Wstrict-prototypes.mk \ gen/flags/Wundef-prefix.mk \ gen/flags/bind-now.mk \ - gen/flags/deps.mk + gen/flags/deps.mk \ + gen/flags/pthread.mk gen/flags.mk: ${AUTO_FLAGS} ${MSG} "[ GEN] $@" -- cgit v1.2.3