Connor Abbott : winegcc: Pass through -pthread.

Alexandre Julliard julliard at winehq.org
Fri Jul 2 14:46:40 CDT 2021


Module: wine
Branch: master
Commit: d209d9feb6ee63e45ecdb23d8d8440f88fe9a64a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d209d9feb6ee63e45ecdb23d8d8440f88fe9a64a

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Fri Jul  2 11:47:59 2021 +0200

winegcc: Pass through -pthread.

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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;




More information about the wine-cvs mailing list