public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation
@ 2022-07-03  4:50 unlvsur at live dot com
  2022-07-03  4:54 ` [Bug lto/106170] x86_64-w64-mingw32 host GCC with win32 thread model does not provide " unlvsur at live dot com
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-07-03  4:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

            Bug ID: 106170
           Summary: win32 thread model does not pthread.h. lto-plugin
                    fails with canadian compilation
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

make[4]: Entering directory
'/home/cqwrteur/toolchains_build/gcc_build/x86_64-w64-mingw32/x86_64-w64-mingw32/gcc/gmp/demos'
Making all in calc
../../../../../gcc/lto-plugin/lto-plugin.c:62:10: fatal error: pthread.h: No
such file or directory
   62 | #include <pthread.h>
      |          ^~~~~~~~~~~

win32 thread model's gcc does not have pthread.h

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
@ 2022-07-03  4:54 ` unlvsur at live dot com
  2022-07-03  5:30 ` unlvsur at live dot com
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-07-03  4:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

--- Comment #1 from cqwrteur <unlvsur at live dot com> ---
windows does not provide those things. You can use EnterCriticalSection/
LeaveCriticalSection instead.

I can write a patch to fix it for windows.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
  2022-07-03  4:54 ` [Bug lto/106170] x86_64-w64-mingw32 host GCC with win32 thread model does not provide " unlvsur at live dot com
@ 2022-07-03  5:30 ` unlvsur at live dot com
  2022-07-03  5:42 ` unlvsur at live dot com
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-07-03  5:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

cqwrteur <unlvsur at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |unlvsur at live dot com

--- Comment #2 from cqwrteur <unlvsur at live dot com> ---
Created attachment 53242
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53242&action=edit
This patch just fixed the compilation part for windows. -pthread flag is a huge
issue

I do not know how to fix that.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
  2022-07-03  4:54 ` [Bug lto/106170] x86_64-w64-mingw32 host GCC with win32 thread model does not provide " unlvsur at live dot com
  2022-07-03  5:30 ` unlvsur at live dot com
@ 2022-07-03  5:42 ` unlvsur at live dot com
  2022-07-03  6:16 ` unlvsur at live dot com
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-07-03  5:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

cqwrteur <unlvsur at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #53242|0                           |1
        is obsolete|                            |

--- Comment #3 from cqwrteur <unlvsur at live dot com> ---
Created attachment 53243
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53243&action=edit
Update patch

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (2 preceding siblings ...)
  2022-07-03  5:42 ` unlvsur at live dot com
@ 2022-07-03  6:16 ` unlvsur at live dot com
  2022-07-03  7:00 ` unlvsur at live dot com
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-07-03  6:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

cqwrteur <unlvsur at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #53243|0                           |1
        is obsolete|                            |

--- Comment #4 from cqwrteur <unlvsur at live dot com> ---
Created attachment 53244
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53244&action=edit
My patch without autoreconf. Please run autoreconf by yourself

I have just fixed them, but need to run autoreconf by yourself.

BTW. -lpthread -pthread lpthreads whatever i remember they all exist.

Plus win32 does not need -lpthread anymore since it uses win32 CriticalSection
api.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (3 preceding siblings ...)
  2022-07-03  6:16 ` unlvsur at live dot com
@ 2022-07-03  7:00 ` unlvsur at live dot com
  2022-07-04  6:41 ` [Bug lto/106170] [13 Regression] " rguenth at gcc dot gnu.org
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-07-03  7:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

cqwrteur <unlvsur at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #53244|0                           |1
        is obsolete|                            |

--- Comment #5 from cqwrteur <unlvsur at live dot com> ---
Created attachment 53245
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53245&action=edit
Patch by manually copying autoconf. better use autoreconf

pthread_mutex_lock and pthread_mutex_unlock can fail. Better just let the
program crash if they fail.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (4 preceding siblings ...)
  2022-07-03  7:00 ` unlvsur at live dot com
@ 2022-07-04  6:41 ` rguenth at gcc dot gnu.org
  2022-07-04  9:42 ` unlvsur at live dot com
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-04  6:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|x86_64-w64-mingw32 host GCC |[13 Regression]
                   |with win32 thread model     |x86_64-w64-mingw32 host GCC
                   |does not provide pthread.h. |with win32 thread model
                   |lto-plugin fails with       |does not provide pthread.h.
                   |canadian compilation        |lto-plugin fails with
                   |                            |canadian compilation
   Target Milestone|---                         |13.0
           Keywords|                            |build
           Priority|P3                          |P1

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Another possibility would be to white-list targets that should have a
thread-safe plugin.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (5 preceding siblings ...)
  2022-07-04  6:41 ` [Bug lto/106170] [13 Regression] " rguenth at gcc dot gnu.org
@ 2022-07-04  9:42 ` unlvsur at live dot com
  2022-07-04 11:38 ` marxin at gcc dot gnu.org
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-07-04  9:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

--- Comment #7 from cqwrteur <unlvsur at live dot com> ---
(In reply to Richard Biener from comment #6)
> Another possibility would be to white-list targets that should have a
> thread-safe plugin.

std::atomic is freestanding. so technically adding a spin lock for an
unsupported target would be possible. However, it is still risky.

Whatever, for windows, I would suggest for using win32 CriticalSection api.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (6 preceding siblings ...)
  2022-07-04  9:42 ` unlvsur at live dot com
@ 2022-07-04 11:38 ` marxin at gcc dot gnu.org
  2022-07-07 10:17 ` marxin at gcc dot gnu.org
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-04 11:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-07-04
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (7 preceding siblings ...)
  2022-07-04 11:38 ` marxin at gcc dot gnu.org
@ 2022-07-07 10:17 ` marxin at gcc dot gnu.org
  2022-07-07 13:19 ` cvs-commit at gcc dot gnu.org
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-07 10:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
Mine.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (8 preceding siblings ...)
  2022-07-07 10:17 ` marxin at gcc dot gnu.org
@ 2022-07-07 13:19 ` cvs-commit at gcc dot gnu.org
  2022-07-07 13:20 ` marxin at gcc dot gnu.org
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-07 13:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:d89fa97ff318b1f892e2629c5a249313872a01b1

commit r13-1558-gd89fa97ff318b1f892e2629c5a249313872a01b1
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Jul 7 12:15:28 2022 +0200

    lto-plugin: use locking only for selected targets

    For now, support locking only for linux targets that are different from
    riscv* where the target depends on libatomic (and fails during
    bootstrap).

            PR lto/106170

    lto-plugin/ChangeLog:

            * configure.ac: Configure HAVE_PTHREAD_LOCKING.
            * lto-plugin.c (LOCK_SECTION): New.
            (UNLOCK_SECTION): New.
            (claim_file_handler): Use the newly added macros.
            (onload): Likewise.
            * config.h.in: Regenerate.
            * configure: Regenerate.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (9 preceding siblings ...)
  2022-07-07 13:19 ` cvs-commit at gcc dot gnu.org
@ 2022-07-07 13:20 ` marxin at gcc dot gnu.org
  2022-07-07 15:33 ` unlvsur at live dot com
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-07 13:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> ---
Should be fixed now.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (10 preceding siblings ...)
  2022-07-07 13:20 ` marxin at gcc dot gnu.org
@ 2022-07-07 15:33 ` unlvsur at live dot com
  2022-07-08  7:59 ` marxin at gcc dot gnu.org
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-07-07 15:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

--- Comment #11 from cqwrteur <unlvsur at live dot com> ---
(In reply to Martin Liška from comment #10)
> Should be fixed now.

So it does not matter not for adding locks for windows hosts? No need for using
CriticalSection APIs as locks?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (11 preceding siblings ...)
  2022-07-07 15:33 ` unlvsur at live dot com
@ 2022-07-08  7:59 ` marxin at gcc dot gnu.org
  2022-07-08 20:08 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-08  7:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

--- Comment #12 from Martin Liška <marxin at gcc dot gnu.org> ---
> So it does not matter not for adding locks for windows hosts? No need for
> using CriticalSection APIs as locks?

Well, we need the critical section for the multi-threaded linker mold for that
we define a new API. And the linker does not work on Windows, so we won't need
it.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (12 preceding siblings ...)
  2022-07-08  7:59 ` marxin at gcc dot gnu.org
@ 2022-07-08 20:08 ` pinskia at gcc dot gnu.org
  2022-07-08 20:09 ` unlvsur at live dot com
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-07-08 20:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #12)
> > So it does not matter not for adding locks for windows hosts? No need for
> > using CriticalSection APIs as locks?
> 
> Well, we need the critical section for the multi-threaded linker mold for
> that we define a new API. And the linker does not work on Windows, so we
> won't need it.

Even as cross to an elf target?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (13 preceding siblings ...)
  2022-07-08 20:08 ` pinskia at gcc dot gnu.org
@ 2022-07-08 20:09 ` unlvsur at live dot com
  2022-07-11  9:16 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-07-08 20:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

--- Comment #14 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #13)
> (In reply to Martin Liška from comment #12)
> > > So it does not matter not for adding locks for windows hosts? No need for
> > > using CriticalSection APIs as locks?
> > 
> > Well, we need the critical section for the multi-threaded linker mold for
> > that we define a new API. And the linker does not work on Windows, so we
> > won't need it.
> 
> Even as cross to an elf target?

I actually do this. Cross compile x86_64-linux-gnu or aarch64-linux-gnu
programs on windows.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (14 preceding siblings ...)
  2022-07-08 20:09 ` unlvsur at live dot com
@ 2022-07-11  9:16 ` marxin at gcc dot gnu.org
  2022-07-27 22:54 ` unlvsur at live dot com
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-11  9:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|marxin at gcc dot gnu.org          |unassigned at gcc dot gnu.org
             Status|RESOLVED                    |NEW
         Resolution|FIXED                       |---

--- Comment #15 from Martin Liška <marxin at gcc dot gnu.org> ---
Feel free to provide Windows implementation of the critical section.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (15 preceding siblings ...)
  2022-07-11  9:16 ` marxin at gcc dot gnu.org
@ 2022-07-27 22:54 ` unlvsur at live dot com
  2022-07-27 22:58 ` unlvsur at live dot com
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-07-27 22:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

--- Comment #16 from cqwrteur <unlvsur at live dot com> ---
(In reply to Martin Liška from comment #15)
> Feel free to provide Windows implementation of the critical section.

make[4]: Leaving directory
'/home/cqwrteur/toolchains_build/gcc_build/x86_64-w64-mingw32/loongarch64-linux-gnu/gcc/gmp/doc'
/home/cqwrteur/toolchains/native/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/13.0.0/../../../../x86_64-w64-mingw32/bin/ld:
cannot find -lpthread: No such file or directory
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:472: liblto_plugin.la] Error 1
make[3]: Leaving directory
'/home/cqwrteur/toolchains_build/gcc_build/x86_64-w64-mingw32/loongarch64-linux-gnu/gcc/lto-plugin'
make[2]: *** [Makefile:383: all] Error 2
make[2]: Leaving directory
'/home/cqwrteur/toolchains_build/gcc_build/x86_64-w64-mingw32/loongarch64-linux-gnu/gcc/lto-plugin'
make[1]: *** [Makefile:12790: all-lto-plugin] Error 2
make[1]: *** Waiting for unfinished jobs....

It still has not yet fixed

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (16 preceding siblings ...)
  2022-07-27 22:54 ` unlvsur at live dot com
@ 2022-07-27 22:58 ` unlvsur at live dot com
  2022-08-01  8:33 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-07-27 22:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

--- Comment #17 from cqwrteur <unlvsur at live dot com> ---
(In reply to Martin Liška from comment #15)
> Feel free to provide Windows implementation of the critical section.

case $target in
  riscv*)
    # do not use locking as pthread depends on libatomic
    ;;
  *-linux*)
    use_locking=yes
    ;;
esac


This should be $host, not $target

case $host in
  riscv*)
    # do not use locking as pthread depends on libatomic
    ;;
  *-linux*)
    use_locking=yes
    ;;
esac

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (17 preceding siblings ...)
  2022-07-27 22:58 ` unlvsur at live dot com
@ 2022-08-01  8:33 ` cvs-commit at gcc dot gnu.org
  2022-08-01  8:33 ` marxin at gcc dot gnu.org
  2023-02-02 16:19 ` jakub at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-08-01  8:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:5d8637208d35f78b51f8cff38c984836ab2c860f

commit r13-1914-g5d8637208d35f78b51f8cff38c984836ab2c860f
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Aug 1 10:32:00 2022 +0200

    lto: replace $target with $host in configure.ac [PR106170]

            PR lto/106170

    lto-plugin/ChangeLog:

            * configure.ac: Replace $target with $host.
            * configure: Regenerate.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (18 preceding siblings ...)
  2022-08-01  8:33 ` cvs-commit at gcc dot gnu.org
@ 2022-08-01  8:33 ` marxin at gcc dot gnu.org
  2023-02-02 16:19 ` jakub at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-08-01  8:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

--- Comment #19 from Martin Liška <marxin at gcc dot gnu.org> ---
Should be fixed now.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug lto/106170] [13 Regression] x86_64-w64-mingw32 host GCC with win32 thread model does not provide pthread.h. lto-plugin fails with canadian compilation
  2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
                   ` (19 preceding siblings ...)
  2022-08-01  8:33 ` marxin at gcc dot gnu.org
@ 2023-02-02 16:19 ` jakub at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-02 16:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106170

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2023-02-02 16:19 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-03  4:50 [Bug lto/106170] New: win32 thread model does not pthread.h. lto-plugin fails with canadian compilation unlvsur at live dot com
2022-07-03  4:54 ` [Bug lto/106170] x86_64-w64-mingw32 host GCC with win32 thread model does not provide " unlvsur at live dot com
2022-07-03  5:30 ` unlvsur at live dot com
2022-07-03  5:42 ` unlvsur at live dot com
2022-07-03  6:16 ` unlvsur at live dot com
2022-07-03  7:00 ` unlvsur at live dot com
2022-07-04  6:41 ` [Bug lto/106170] [13 Regression] " rguenth at gcc dot gnu.org
2022-07-04  9:42 ` unlvsur at live dot com
2022-07-04 11:38 ` marxin at gcc dot gnu.org
2022-07-07 10:17 ` marxin at gcc dot gnu.org
2022-07-07 13:19 ` cvs-commit at gcc dot gnu.org
2022-07-07 13:20 ` marxin at gcc dot gnu.org
2022-07-07 15:33 ` unlvsur at live dot com
2022-07-08  7:59 ` marxin at gcc dot gnu.org
2022-07-08 20:08 ` pinskia at gcc dot gnu.org
2022-07-08 20:09 ` unlvsur at live dot com
2022-07-11  9:16 ` marxin at gcc dot gnu.org
2022-07-27 22:54 ` unlvsur at live dot com
2022-07-27 22:58 ` unlvsur at live dot com
2022-08-01  8:33 ` cvs-commit at gcc dot gnu.org
2022-08-01  8:33 ` marxin at gcc dot gnu.org
2023-02-02 16:19 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).