public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/101387] New: Unconditional use of <sys/cdefs.h>
@ 2021-07-09 12:13 ro at gcc dot gnu.org
  2021-08-15 14:30 ` [Bug modula2/101387] " gaiusmod2 at gmail dot com
  2021-08-15 21:29 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: ro at gcc dot gnu.org @ 2021-07-09 12:13 UTC (permalink / raw)
  To: gcc-bugs

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.

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

* [Bug modula2/101387] Unconditional use of <sys/cdefs.h>
  2021-07-09 12:13 [Bug modula2/101387] New: Unconditional use of <sys/cdefs.h> ro at gcc dot gnu.org
@ 2021-08-15 14:30 ` gaiusmod2 at gmail dot com
  2021-08-15 21:29 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: gaiusmod2 at gmail dot com @ 2021-08-15 14:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Gaius Mulley <gaiusmod2 at gmail dot com> ---
many thanks for the bug report - now fixed in the git repro.
The bugfix emits a prototype for throw (if required) rather than use a non
portable header file.

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

* [Bug modula2/101387] Unconditional use of <sys/cdefs.h>
  2021-07-09 12:13 [Bug modula2/101387] New: Unconditional use of <sys/cdefs.h> ro at gcc dot gnu.org
  2021-08-15 14:30 ` [Bug modula2/101387] " gaiusmod2 at gmail dot com
@ 2021-08-15 21:29 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-15 21:29 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.

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

end of thread, other threads:[~2021-08-15 21:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 12:13 [Bug modula2/101387] New: Unconditional use of <sys/cdefs.h> ro at gcc dot gnu.org
2021-08-15 14:30 ` [Bug modula2/101387] " gaiusmod2 at gmail dot com
2021-08-15 21:29 ` pinskia 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).