From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24511 invoked by alias); 15 Mar 2013 11:24:49 -0000 Received: (qmail 24496 invoked by uid 22791); 15 Mar 2013 11:24:46 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_20,KHOP_THREADED,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.201.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Mar 2013 11:24:32 +0000 Received: from md15.u-strasbg.fr (md15.u-strasbg.fr [130.79.200.204]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id r2FBOPc9072733 ; Fri, 15 Mar 2013 12:24:25 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms12.u-strasbg.fr [130.79.204.112]) by md15.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id r2FBOOqE006944 ; Fri, 15 Mar 2013 12:24:25 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id r2FBOOEg010927 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Fri, 15 Mar 2013 12:24:24 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Yao Qi'" Cc: References: <20130315020212.GA23545@sourceware.org> <5142E409.5090109@codesourcery.com> <002901ce2162$414d7530$c3e85f90$@muller@ics-cnrs.unistra.fr> <51430063.2060007@codesourcery.com> In-Reply-To: <51430063.2060007@codesourcery.com> Subject: RE: Compilation failure for mingw64 target (was New ARI warning Fri Mar 15 02:02:12 UTC 2013 in -D 2013-03-15-gmt) Date: Fri, 15 Mar 2013 11:24:00 -0000 Message-ID: <006c01ce216f$a5075250$ef15f6f0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-03/txt/msg00664.txt.bz2 I confirm that your patch fixes the compilation error introduced for x86_64-w64-mingw32 host. GDB compiles again! Thanks, Pierre Muller > -----Message d'origine----- > De : gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Yao Qi > Envoy=C3=A9 : vendredi 15 mars 2013 12:05 > =C3=80 : Pierre Muller > Cc : gdb-patches@sourceware.org > Objet : Re: Compilation failure for mingw64 target (was New ARI warning F= ri > Mar 15 02:02:12 UTC 2013 in -D 2013-03-15-gmt) >=20 > Sorry for breaking the build for mingw target. >=20 > On 03/15/2013 05:48 PM, Pierre Muller wrote: > > ../../src/gdb/ctf.c: In function 'ctf_save_metadata_header': > > ../../src/gdb/ctf.c:223:7: erreur: 'BYTE_ORDER' undeclared (first use in > this fu > > nction) > > ../../src/gdb/ctf.c:223:7: note: each undeclared identifier is reported > only onc > > e for each function it appears in > > ../../src/gdb/ctf.c:223:21: erreur: 'LITTLE_ENDIAN' undeclared (first u= se > in thi > > s function) >=20 > This problem is addressed by using "native" endianness in CTF metadata, > so BYTE_ORDER and LITTLE_ENDIAN can be avoided. >=20 > > ../../src/gdb/ctf.c: In function 'ctf_start': > > ../../src/gdb/ctf.c:279:33: erreur: 'S_IRGRP' undeclared (first use in > this func > > tion) > > ../../src/gdb/ctf.c:279:43: erreur: 'S_IXGRP' undeclared (first use in > this func > > tion) > > ../../src/gdb/ctf.c:279:53: erreur: 'S_IROTH' undeclared (first use in > this func > > tion) > > ../../src/gdb/ctf.c:279:63: erreur: 'S_IXOTH' undeclared (first use in > this func > > tion) >=20 > These modes are not necessary. Removed. >=20 > > ../../src/gdb/ctf.c:279:3: erreur: too many arguments to function 'mkdi= r' >=20 > Fixed. >=20 > The patch below fix these errors for i686-pc-mingw32 target. It should > also fix your errors for mingw64 target (I don't have mingw64 toolchain > on hand). >=20 > -- > Yao (=E9=BD=90=E5=B0=A7) >=20 > gdb: >=20 > 2013-03-15 Yao Qi >=20 > * ctf.c (ctf_save_metadata_header): Save CTF in native > endianness. > (ctf_start) [USE_WIN32API]: Call mkdir with DIRNAME only. > [!USE_WIN32API]: Call mkdir with DIRNAME and mode parameter. > --- > gdb/ctf.c | 15 ++++++++++----- > 1 files changed, 10 insertions(+), 5 deletions(-) >=20 > diff --git a/gdb/ctf.c b/gdb/ctf.c > index 44c4e9e..05022b7 100644 > --- a/gdb/ctf.c > +++ b/gdb/ctf.c > @@ -194,7 +194,7 @@ ctf_save_metadata_header (struct trace_write_handler > *handler) > "\ntrace {\n" > " major =3D %u;\n" > " minor =3D %u;\n" > - " byte_order =3D %s;\n" /* be or le */ > + " byte_order =3D native;\n" > " packet.header :=3D struct {\n" > " uint32_t magic;\n" > " };\n" > @@ -243,8 +243,7 @@ ctf_save_metadata_header (struct trace_write_handler > *handler) > ctf_save_write_metadata (handler, "\n"); >=20 > ctf_save_write_metadata (handler, metadata_fmt, > - CTF_SAVE_MAJOR, CTF_SAVE_MINOR, > - BYTE_ORDER =3D=3D LITTLE_ENDIAN ? "le" : "be"); > + CTF_SAVE_MAJOR, CTF_SAVE_MINOR); > ctf_save_write_metadata (handler, "\n"); > } >=20 > @@ -298,10 +297,16 @@ ctf_start (struct trace_file_writer *self, const ch= ar > *dirname) > struct ctf_trace_file_writer *writer > =3D (struct ctf_trace_file_writer *) self; > int i; > + int ret =3D 0; >=20 > /* Create DIRNAME. */ > - if (mkdir (dirname, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) > - && errno !=3D EEXIST) > +#ifdef USE_WIN32API > + ret =3D mkdir (dirname); > +#else > + ret =3D mkdir (dirname, S_IRUSR | S_IWUSR | S_IXUSR); > +#endif > + > + if (ret && errno !=3D EEXIST) > error (_("Unable to open directory '%s' for saving trace data (%s)"), > dirname, safe_strerror (errno)); >=20 > -- > 1.7.7.6