Most recent version of binutils-gdb HEAD fails to build on OSX 10.9 with: nm.c: In function 'main': nm.c:1699:7: error: 'sbrk' is deprecated (declared at /usr/include/unistd.h:582) [-Werror=deprecated-declarations] char *lim = (char *) sbrk (0); ^ when built with GCC 4.8. Steps to reproduce: ./configure CC=gcc-4.8 make The build succeeds if configured as: ./configure CC=gcc-4.8 CFLAGS="-Wno-error=deprecated-declarations" Let me know if any additional info is needed.
On 07 Jul 2014, at 18:08, andrew.smirnov at gmail dot com <sourceware-bugzilla@sourceware.org> wrote: > https://sourceware.org/bugzilla/show_bug.cgi?id=17122 > > Bug ID: 17122 > Summary: OSX 10.9 build failure > Product: binutils > Version: 2.25 (HEAD) > Status: NEW > Severity: normal > Priority: P2 > Component: binutils > Assignee: unassigned at sourceware dot org > Reporter: andrew.smirnov at gmail dot com > > Most recent version of binutils-gdb HEAD fails to build on OSX 10.9 with: > > nm.c: In function 'main': > nm.c:1699:7: error: 'sbrk' is deprecated (declared at > /usr/include/unistd.h:582) [-Werror=deprecated-declarations] > char *lim = (char *) sbrk (0); This is not very new, and the easiest work-around is to configure with --disable-werror.
(In reply to gingold@adacore.com from comment #1) > On 07 Jul 2014, at 18:08, andrew.smirnov at gmail dot com > <sourceware-bugzilla@sourceware.org> wrote: > > > This is not very new, and the easiest work-around is to configure with > --disable-werror. Well yes, I am sure that issues like this existed ever since -Werror was turned on by default. And the new ones probably surface every time GCC tweaks its definition of -Werror. But just as the one mentioned in my original message this is still a work-around and it doesn't fix the underlying problem.
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6577f365ebdee7dda71cb996efa29d3714cbccd0 commit 6577f365ebdee7dda71cb996efa29d3714cbccd0 Author: Alan Modra <amodra@gmail.com> Date: Fri Jul 22 12:11:24 2022 +0930 PR17122, OSX 10.9 build failure sbrk hasn't been used in binutils/ or ld/ for quite some time (so the PR was fixed a while ago). Tidy up configury. PR 17122 binutils/ * configure.ac: Don't check for sbrk. * sysdep.h (sbrk): Don't supply fallback declaration. * config.in: Regenerate. * configure: Regenerate. ld/ * configure.ac: Don't check for sbrk. * config.in: Regenerate. * configure: Regenerate.
.