[PATCH 2/4] winegcc: Pass through -pthread
Connor Abbott
cwabbott0 at gmail.com
Fri Jul 2 04:47:59 CDT 2021
While you could get 90% of the way with "-lpthread", supporting -pthread
should be more reliable and is required for build systems like meson
that have special handling for the threads dependency.
Since this is both a compiler (really preprocessor) and linker option,
we can't just add it to is_linker_arg().
Signed-off-by: Connor Abbott <cwabbott0 at gmail.com>
---
tools/winegcc/winegcc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index bcabc4f7998..ebc60c1a2c8 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -1939,6 +1939,13 @@ int main(int argc, char **argv)
opts.output_name = option_arg;
raw_compiler_arg = 0;
break;
+ case 'p':
+ if (strcmp("-pthread", opts.args->base[i]) == 0)
+ {
+ raw_compiler_arg = 1;
+ raw_linker_arg = 1;
+ }
+ break;
case 's':
if (strcmp("-static", opts.args->base[i]) == 0)
linking = -1;
--
2.31.1
More information about the wine-devel
mailing list