gcc/libcc1
Sergei Trofimovich 3b21c21f3f c++: avoid <memory> poisoning on musl [PR106102]
On musl <pthread.h> uses calloc() (via <sched.h>). <memory> includes
it indirectly and exposes use of poisoned calloc() when module code
is built:

    /build/build/./prev-gcc/xg++ ... ../../gcc-13-20220626/gcc/cp/mapper-resolver.cc
        In file included from /<<NIX>>/musl-1.2.3-dev/include/pthread.h:30,
                 from /build/build/prev-x86_64-unknown-linux-musl/libstdc++-v3/include/x86_64-unknown-linux-musl/bits/gthr-default.h:35,
                 ....
                 from /build/build/prev-x86_64-unknown-linux-musl/libstdc++-v3/include/memory:77,
                 from ../../gcc-13-20220626/gcc/../libcody/cody.hh:24,
                 from ../../gcc-13-20220626/gcc/cp/../../c++tools/resolver.h:25,
                 from ../../gcc-13-20220626/gcc/cp/../../c++tools/resolver.cc:23,
                 from ../../gcc-13-20220626/gcc/cp/mapper-resolver.cc:32:
    /<<NIX>>/musl-1.2.3-dev/include/sched.h:84:7: error: attempt to use poisoned "calloc"
       84 | void *calloc(size_t, size_t);
          |       ^
    /<<NIX>>/musl-1.2.3-dev/include/sched.h:124:36: error: attempt to use poisoned "calloc"
      124 | #define CPU_ALLOC(n) ((cpu_set_t *)calloc(1,CPU_ALLOC_SIZE(n)))
          |                                    ^

gcc/cp/

	PR c++/106102
	* mapper-client.cc: Include <memory> via "system.h".
	* mapper-resolver.cc: Ditto.
	* module.cc: Ditto.

libcc1/

	PR c++/106102
	* libcc1plugin.cc: Include <memory> via "system.h".
	* libcp1plugin.cc: Ditto.
2022-06-27 23:22:02 +01:00
..
aclocal.m4
callbacks.cc
callbacks.hh
cc1plugin-config.h.in
ChangeLog
compiler-name.hh
compiler.cc
compiler.hh
configure
configure.ac
connection.cc
connection.hh
context.cc
context.hh
deleter.hh
findcomp.cc
findcomp.hh
gdbctx.hh
libcc1.cc
libcc1.sym
libcc1plugin.cc c++: avoid <memory> poisoning on musl [PR106102] 2022-06-27 23:22:02 +01:00
libcc1plugin.sym
libcp1.cc
libcp1plugin.cc c++: avoid <memory> poisoning on musl [PR106102] 2022-06-27 23:22:02 +01:00
libcp1plugin.sym
Makefile.am
Makefile.in
marshall-cp.hh
marshall.cc
marshall.hh
names.cc
names.hh
rpc.hh
status.hh