public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpelinux@gmail.com>
To: newlib@sourceware.org
Subject: [BUG] newlib-4.4.0 fails to build for m68k-elf
Date: Sun, 14 Jan 2024 16:47:09 +0100	[thread overview]
Message-ID: <20240114154727.2980243-1-mikpelinux@gmail.com> (raw)

Building newlib-4.4.0 for m68k-unknown-elf fails with

m68k-unknown-elf-gcc -B/tmp/objdir/m68k-unknown-elf/newlib/ -isystem /tmp/objdir/m68k-unknown-elf/newlib/targ-include -isystem /tmp/newlib-4.4.0.20231231/newlib/libc/include -B/tmp/objdir/m68k-unknown-elf/libgloss/m68k -L/tmp/objdir/m68k-unknown-elf/libgloss/libnosys -L/tmp/newlib-4.4.0.20231231/libgloss/m68k    -g -O2 -O2 -I. -I/tmp/newlib-4.4.0.20231231/libgloss/m68k/.. -I./.. -idirafter /tmp/newlib-4.4.0.20231231/libgloss/m68k/../../include -c -g -O2 /tmp/newlib-4.4.0.20231231/libgloss/m68k/../read.c
/tmp/newlib-4.4.0.20231231/libgloss/m68k/../read.c:24:1: error: conflicting types for 'read'; have 'int(int,  void *, size_t)' {aka 'int(int,  void *, long unsigned int)'}
   24 | read (int fd,
      | ^~~~
In file included from /tmp/newlib-4.4.0.20231231/newlib/libc/include/unistd.h:4,
                 from /tmp/newlib-4.4.0.20231231/libgloss/m68k/../glue.h:16,
                 from /tmp/newlib-4.4.0.20231231/libgloss/m68k/../read.c:15:
/tmp/newlib-4.4.0.20231231/newlib/libc/include/sys/unistd.h:179:25: note: previous declaration of 'read' with type '_ssize_t(int,  void *, size_t)' {aka 'long int(int,  void *, long unsigned int)'}
  179 | _READ_WRITE_RETURN_TYPE read (int __fd, void *__buf, size_t __nbyte);
      |                         ^~~~
make[4]: *** [Makefile:528: read.o] Error 1
make[4]: Leaving directory '/tmp/objdir/m68k-unknown-elf/libgloss/m68k'
make[3]: *** [Makefile:4954: all-recursive] Error 1
make[3]: Leaving directory '/tmp/objdir/m68k-unknown-elf/libgloss'
make[2]: *** [Makefile:1225: all] Error 2
make[2]: Leaving directory '/tmp/objdir/m68k-unknown-elf/libgloss'
make[1]: *** [Makefile:9528: all-target-libgloss] Error 2
make[1]: Leaving directory '/tmp/objdir'
make: *** [Makefile:879: all] Error 2

Toolchain built from binutils-2.41 and gcc-13.2.0.

newlib-4.3.0 built fine, the issue started with:

# first new commit: [3d10b04f1ed9bf53c282081c88165951e8c32cec] Fix various c99/gcc-14 issues in generic libgloss code

             reply	other threads:[~2024-01-14 15:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-14 15:47 Mikael Pettersson [this message]
2024-01-14 15:59 ` Joel Sherrill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240114154727.2980243-1-mikpelinux@gmail.com \
    --to=mikpelinux@gmail.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).