libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread Florian Weimer via Gcc
I've received a report of a mingw build failure: ../../../gcc/libgcc/libgcov-interface.c: In function '__gcov_fork': ../../../gcc/libgcc/libgcov-interface.c:185:9: error: implicit declaration of function 'fork' [-Wimplicit-function-declaration] 185 | pid = fork (); | ^~~~ make[2

Re: libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread Eli Zaretskii via Gcc
> Cc: Jonathan Yong <10wa...@gmail.com>, Jan Hubicka , Nathan > Sidwell > Date: Fri, 01 Dec 2023 09:02:55 +0100 > X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, > DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, > RCVD_IN_MSPIKE_H3, RCVD_IN_

Re: Update on GCC 14 C type safety changes/warnings as errors

2023-12-01 Thread Sam James via Gcc
Florian Weimer via Gcc writes: > [...] > Numbers do not tally up because one package can have multiple issues. > The autoconf column counts packages where file-name based heuristics > suggest the critical errors are in autoconf-style feature probes, where > they are ignored and could silently a

Re: libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread Richard Biener via Gcc
On Fri, Dec 1, 2023 at 9:04 AM Florian Weimer via Gcc wrote: > > I've received a report of a mingw build failure: > > ../../../gcc/libgcc/libgcov-interface.c: In function '__gcov_fork': > ../../../gcc/libgcc/libgcov-interface.c:185:9: error: implicit declaration of > function 'fork' [-Wimplicit-f

Re: libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread Florian Weimer via Gcc
* Richard Biener: > On Fri, Dec 1, 2023 at 9:04 AM Florian Weimer via Gcc wrote: >> >> I've received a report of a mingw build failure: >> >> ../../../gcc/libgcc/libgcov-interface.c: In function '__gcov_fork': >> ../../../gcc/libgcc/libgcov-interface.c:185:9: error: implicit declaration >> of fu

Re: libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread LIU Hao via Gcc
在 2023/12/1 16:19, Eli Zaretskii via Gcc 写道: As far as I understand it, mingw doesn't have fork and doesn't declare it in , so it's not clear to me how this has ever worked. I would expect a linker failure. Maybe that doesn't happen because the object containing a reference to fork is only ever

Re: libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread Richard Biener via Gcc
On Fri, Dec 1, 2023 at 9:57 AM Florian Weimer wrote: > > * Richard Biener: > > > On Fri, Dec 1, 2023 at 9:04 AM Florian Weimer via Gcc > > wrote: > >> > >> I've received a report of a mingw build failure: > >> > >> ../../../gcc/libgcc/libgcov-interface.c: In function '__gcov_fork': > >> ../../..

Re: libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread Alexander Monakov
On Fri, 1 Dec 2023, LIU Hao via Gcc wrote: > >> What's the best way to fix this? I expect it's going to impact other > >> targets (perhaps for different functions) because all of > >> libgcov-interface.c is built unconditionally. I don't think we run > >> configure for the target, so we can't

Re: libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread Alexander Monakov
On Fri, 1 Dec 2023, Richard Biener via Gcc wrote: > On Fri, Dec 1, 2023 at 9:57 AM Florian Weimer wrote: > > > > * Richard Biener: > > > > > On Fri, Dec 1, 2023 at 9:04 AM Florian Weimer via Gcc > > > wrote: > > >> > > >> I've received a report of a mingw build failure: > > >> > > >> ../../..

Re: libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread LIU Hao via Gcc
在 2023/12/1 17:09, Richard Biener via Gcc 写道: Hmm, so why's it then referenced and not "GCed"? The classical "solution" is to make the reference weak via sth like extern typeof(fork) fork () __attribute__((weak)); There are issues about weak symbols on mingw targets. Calls to weak functions c

Re: libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread Andreas Schwab
On Dez 01 2023, Richard Biener via Gcc wrote: > Hmm, so why's it then referenced and not "GCed"? This has nothing to do with garbage collection. It's just the way libgcc avoids having too many source files. It would be exactly the same if every function were in its own file. -- Andreas Schwab

Re: libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread Jan Hubicka via Gcc
> On Dez 01 2023, Richard Biener via Gcc wrote: > > > Hmm, so why's it then referenced and not "GCed"? > > This has nothing to do with garbage collection. It's just the way > libgcc avoids having too many source files. It would be exactly the > same if every function were in its own file. THe

Re: libgcov, fork, and mingw (and other targets without the full POSIX set)

2023-12-01 Thread Jakub Jelinek via Gcc
On Fri, Dec 01, 2023 at 01:03:01PM +0100, Jan Hubicka via Gcc wrote: > > On Dez 01 2023, Richard Biener via Gcc wrote: > > > > > Hmm, so why's it then referenced and not "GCed"? > > > > This has nothing to do with garbage collection. It's just the way > > libgcc avoids having too many source fil

gcc-12-20231201 is now available

2023-12-01 Thread GCC Administrator via Gcc
Snapshot gcc-12-20231201 is now available on https://gcc.gnu.org/pub/gcc/snapshots/12-20231201/ and on various mirrors, see https://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 12 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch