[Bug modula2/101387] New: Unconditional use of <sys/cdefs.h>

ro at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 9 12:13:26 GMT 2021


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

            Bug ID: 101387
           Summary: Unconditional use of <sys/cdefs.h>
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: gaiusmod2 at gmail dot com
  Target Milestone: ---
            Target: *-*-solaris2.11

When I tried to build the devel/modula-2 branch as of 20210708 on Solaris 11
(both SPARC and x86), the build failed early with

/vol/gcc/src/git/modula-2/gcc/m2/mc-boot/GRTExceptions.c:42:13: fatal error:
sys/cdefs.h: No such file or directory
 #   include "sys/cdefs.h"
             ^~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/vol/gcc/src/git/modula-2/gcc/m2/Make-lang.in:1579:
m2/mc-boot/GRTExceptions.o] Error 1

<sys/defs.h> (preferably with <> rather than "") originates from *BSD, I
believe
and is certainly not universal.

sys/defs.h also emitted in gcc/m2/mc/keyc.mod, mc-boot/Gkeyc.c

To hack around this, I've disabled/commented the header in the affected files
with no apparent ill effect.


More information about the Gcc-bugs mailing list