diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-11-23 15:02:27 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-11-23 15:03:39 -0500 |
commit | ff449fd9b74aa88fba58530de5aaf376f3d16510 (patch) | |
tree | b9ac5dcdc28e48ba05b65c3c2bb681a62c021331 /build/flags.mk | |
parent | db6dfa79732b4ab227329dd435a99067e357774a (diff) | |
download | bfs-ff449fd9b74aa88fba58530de5aaf376f3d16510.tar.xz |
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
Diffstat (limited to 'build/flags.mk')
-rw-r--r-- | build/flags.mk | 6 |
1 files changed, 4 insertions, 2 deletions
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] $@" |