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

            Bug ID: 98315
           Summary: [11 regression] libcody breaks Solaris bootstrap
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: nathan at gcc dot gnu.org
  Target Milestone: ---
            Target: *-*-solaris2.11

Since the introduction of libcody, Solaris 11 bootstrap is broken:

* On Solaris 11.4:

In file included from /usr/include/sys/socket.h:25,
                 from /vol/gcc/src/hg/master/local/gcc/../libcody/cody.hh:29,
                 from /vol/gcc/src/hg/master/local/gcc/cp/mapper-client.h:26,
                 from /vol/gcc/src/hg/master/local/gcc/cp/mapper-client.cc:26:
/usr/include/sys/uio.h:192:3: error: attempt to use poisoned "bzero"
   bzero(&(xuiop)->xu_hint, sizeof ((xuiop)->xu_hint)); \
   ^

  where <sys/uio.h> has

/*
 * Clear the hints portion of an xuio_t, leaving the initial uio_t and the
 * xu_ext union untouched.
 *
 * Note that this does not touch xu_type.  Since zero copy is recognized as
 * UIO_XUIO with xu_type of UIOTYPE_ZEROCOPY, if extending a uio_t not setup
 * for zero copy into a full xuio_t then chances are that xu_type should be
 * initialized too as if the xuio_t had been bzero'd - ie to UIOTYPE_ASYNCIO.
 */
#define XUIO_BZERO_HINTS(xuiop) do { \
                bzero(&(xuiop)->xu_hint, sizeof ((xuiop)->xu_hint)); \
        _NOTE(CONSTCOND) } while (0)

  This macros isn't used anywhere, so I wonder why #pragma poison would be
  offended.

* On Solaris 11.3:

In file included from /usr/include/sys/stream.h:16,
                 from /usr/include/netinet/in.h:66,
                 from /usr/include/sys/socket.h:32,
                 from /vol/gcc/src/hg/master/local/gcc/../libcody/cody.hh:29,
                 from /vol/gcc/src/hg/master/local/gcc/cp/mapper-client.h:26,
                 from /vol/gcc/src/hg/master/local/gcc/cp/mapper-client.cc:26:
/usr/include/sys/strmdep.h:25:26: error: attempt to use poisoned "bcopy"
 #define strbcpy(s, d, c) bcopy(s, d, c)
                          ^

  with the following in <sys/strmdep.h>:

/*
 * Copy data from one data buffer to another.
 * The addresses must be word aligned - if not, use bcopy!
 */
#define strbcpy(s, d, c)        bcopy(s, d, c)

I've hacked around both for no by removing bcopy and bzero from #pragma GCC
poison
in gcc/system.h.

Reply via email to