Message ID | 83wots34c9.fsf@gnu.org |
---|---|
State | New, archived |
Headers |
Received: (qmail 46949 invoked by alias); 18 Jul 2018 16:18:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 46864 invoked by uid 89); 18 Jul 2018 16:18:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=unavailable version=3.3.2 spammy=usa, USA X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Jul 2018 16:18:22 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <eliz@gnu.org>) id 1ffp9e-0006Gw-3m for gdb-patches@sourceware.org; Wed, 18 Jul 2018 12:18:21 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@gnu.org>) id 1ffp9d-0006Gl-VJ; Wed, 18 Jul 2018 12:18:18 -0400 Received: from [176.228.60.248] (port=2680 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <eliz@gnu.org>) id 1ffp9d-0005Oy-84; Wed, 18 Jul 2018 12:18:17 -0400 Date: Wed, 18 Jul 2018 19:18:14 +0300 Message-Id: <83wots34c9.fsf@gnu.org> From: Eli Zaretskii <eliz@gnu.org> To: DJ Delorie <dj@redhat.com> CC: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org Subject: Compilation error in simple-object-elf.c X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes |
Commit Message
Eli Zaretskii
July 18, 2018, 4:18 p.m. UTC
Hi, I've built the pretest of GDB 8.2 with MinGW today, and bumped into a compilation error in libiberty: if [ x"" != x ]; then \ gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. -I./../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -D_GNU_SOURCE ./simple-object-elf.c -o noasan/simple-object-elf.o; \ else true; fi gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. -I./../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -D_GNU_SOURCE ./simple-object-elf.c -o simple-object-elf.o ./simple-object-elf.c: In function 'simple_object_elf_copy_lto_debug_sections': ./simple-object-elf.c:1284:14: error: 'ENOTSUP' undeclared (first use in this function) *err = ENOTSUP; ^~~~~~~ ./simple-object-elf.c:1284:14: note: each undeclared identifier is reported only once for each function it appears in Suggested fix: 2018-07-18 Eli Zaretskii <eliz@gnu.org> * libiberty/simple-object-elf.c (ENOTSUP): If not defined by errno.h, redirect to ENOSYS.
Comments
On Wed, Jul 18, 2018 at 6:18 PM Eli Zaretskii <eliz@gnu.org> wrote: > > Hi, > > I've built the pretest of GDB 8.2 with MinGW today, and bumped into a > compilation error in libiberty: > > if [ x"" != x ]; then \ > gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. -I./../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -D_GNU_SOURCE ./simple-object-elf.c -o noasan/simple-object-elf.o; \ > else true; fi > gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. -I./../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -D_GNU_SOURCE ./simple-object-elf.c -o simple-object-elf.o > ./simple-object-elf.c: In function 'simple_object_elf_copy_lto_debug_sections': > ./simple-object-elf.c:1284:14: error: 'ENOTSUP' undeclared (first use in this function) > *err = ENOTSUP; > ^~~~~~~ > ./simple-object-elf.c:1284:14: note: each undeclared identifier is reported only once for each function it appears in > > Suggested fix: Works for me, thus OK. I'm going to check it in to make 8.2. Richard. > 2018-07-18 Eli Zaretskii <eliz@gnu.org> > > * libiberty/simple-object-elf.c (ENOTSUP): If not defined by > errno.h, redirect to ENOSYS. > > --- libiberty/simple-object-elf.c~0 2018-07-04 18:41:59.000000000 +0300 > +++ libiberty/simple-object-elf.c 2018-07-18 18:19:39.286654700 +0300 > @@ -22,6 +22,10 @@ Boston, MA 02110-1301, USA. */ > #include "simple-object.h" > > #include <errno.h> > +/* mingw.org's MinGW doesn't have ENOTSUP. */ > +#ifndef ENOTSUP > +# define ENOTSUP ENOSYS > +#endif > #include <stddef.h> > > #ifdef HAVE_STDLIB_H >
> From: Richard Biener <richard.guenther@gmail.com> > Date: Thu, 19 Jul 2018 10:46:01 +0200 > Cc: DJ Delorie <dj@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>, gdb-patches@sourceware.org > > > *err = ENOTSUP; > > ^~~~~~~ > > ./simple-object-elf.c:1284:14: note: each undeclared identifier is reported only once for each function it appears in > > > > Suggested fix: > > Works for me, thus OK. I'm going to check it in to make 8.2. Thanks. Joel/Pedro, is this okay for GDB's copy of libiberty, master and branch?
On 07/19/2018 02:06 PM, Eli Zaretskii wrote: >> From: Richard Biener <richard.guenther@gmail.com> >> Date: Thu, 19 Jul 2018 10:46:01 +0200 >> Cc: DJ Delorie <dj@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>, gdb-patches@sourceware.org >> >>> *err = ENOTSUP; >>> ^~~~~~~ >>> ./simple-object-elf.c:1284:14: note: each undeclared identifier is reported only once for each function it appears in >>> >>> Suggested fix: >> >> Works for me, thus OK. I'm going to check it in to make 8.2. > > Thanks. > > Joel/Pedro, is this okay for GDB's copy of libiberty, master and > branch? Yes. Thanks, Pedro Alves
> Cc: dj@redhat.com, gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org > From: Pedro Alves <palves@redhat.com> > Date: Thu, 19 Jul 2018 14:41:13 +0100 > > On 07/19/2018 02:06 PM, Eli Zaretskii wrote: > >> From: Richard Biener <richard.guenther@gmail.com> > >> Date: Thu, 19 Jul 2018 10:46:01 +0200 > >> Cc: DJ Delorie <dj@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>, gdb-patches@sourceware.org > >> > >>> *err = ENOTSUP; > >>> ^~~~~~~ > >>> ./simple-object-elf.c:1284:14: note: each undeclared identifier is reported only once for each function it appears in > >>> > >>> Suggested fix: > >> > >> Works for me, thus OK. I'm going to check it in to make 8.2. > > > > Thanks. > > > > Joel/Pedro, is this okay for GDB's copy of libiberty, master and > > branch? Thanks, done.
--- libiberty/simple-object-elf.c~0 2018-07-04 18:41:59.000000000 +0300 +++ libiberty/simple-object-elf.c 2018-07-18 18:19:39.286654700 +0300 @@ -22,6 +22,10 @@ Boston, MA 02110-1301, USA. */ #include "simple-object.h" #include <errno.h> +/* mingw.org's MinGW doesn't have ENOTSUP. */ +#ifndef ENOTSUP +# define ENOTSUP ENOSYS +#endif #include <stddef.h> #ifdef HAVE_STDLIB_H