From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22904 invoked by alias); 3 May 2013 08:28:21 -0000 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 Received: (qmail 22895 invoked by uid 89); 3 May 2013 08:28:20 -0000 X-Spam-SWARE-Status: No, score=-6.7 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TVD_APPROVED autolearn=no version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 03 May 2013 08:28:18 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UYBLk-00064l-Uc from Thomas_Schwinge@mentor.com ; Fri, 03 May 2013 01:28:16 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 3 May 2013 01:28:17 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Fri, 3 May 2013 09:28:15 +0100 From: Thomas Schwinge To: =?utf-8?B?6ZmG5bKz?= CC: , Subject: Re: [patch] for mig check in GDB's configure In-Reply-To: References: User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Fri, 03 May 2013 08:28:00 -0000 Message-ID: <8738u4sc19.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Virus-Found: No X-SW-Source: 2013-05/txt/msg00048.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 3974 Hi! Adding the gdb-patches mailing list. While of course this is only relevant for the GNU Hurd port of GDB, it will get committed to the GDB source repository, so should be reviewed on the gdb-patches mailing list. It is fine (and encouraged) to CC the bug-hurd mailing list for Hurd-specific issues, though. For the GDB folks, Yue Lu is a candidate for improving the GNU Hurd GDB port as a Google Summer of Code 2013 project, and is sending here a first patch. Welcome to the project! On Fri, 3 May 2013 15:15:39 +0800, =E9=99=86=E5=B2=B3 wrote: > I found that when you missing the mid under GNU Hurd, the GDB's > configure doesn't complain about that. > But you will get a compile error until you do the make. > So I add the check. > By the way, I just check the existence of mig, have not check whether > mig work correct yet. >=20 > This is my first time to submit patch, I just build this by git > format-patch. If something wrong, just tell me, I will fix it. I acknowledge the issue: as $(MIG) will be empty, you'll get the command line =C2=BBgcc [...] | -cc [...]=C2=AB resulting in a confusing =C2=BB-cc:= command not found=C2=AB. So, thanks for the patch! Given this is your first patch, it looks very good already! > Subject: [PATCH] patch for check mig under GNU Hurd >=20 > if no mig for use then exit! As GDB is a GNU project, instead of just a commit message it uses ChangeLog files. See the several ChangeLog files in the GDB sources. As your change only touches files in gdb/, only gdb/ChangeLog is relevant. The format of the individual "snippets" is rather strict, see the existing ones as well as this chapter in the GNU Coding Standards: . What developers typically do when committing their changes is re-using the ChangeLog snippet as the commit message. Commits are still done with CVS, by the way -- the Git repository is just a read-only mirror. Until you're approved for getting commit access yourself, another developer will commit any approved patches for you. (I can do that then.) > --- a/gdb/configure > +++ b/gdb/configure I take it you used autoconf to regenerate that file? > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -488,6 +488,15 @@ AC_CHECK_TOOL(WINDRES, windres) >=20 > # Needed for GNU/Hurd. > AC_CHECK_TOOL(MIG, mig) > +case "${host}" in Hmm, I think that instead of only examining the host system, $host, this also needs to examine the target system, $target. (Please tell if the difference between build, host, and target system is not clear to you.) The MIG tool is used to generate files (from RPC definition files) that are used by the native GDB port for GNU Hurd (which, of couse, is the only GNU Hurd port that currently exists.) But if someone, for example, builds GDB targeting mips-linux-gnu on a GNU Hurd system, they would not need the MIG tool. GDB folks, would it make sense to use something like: case $gdb_native:$host in [...] yes:i[[3456]]86-*-gnu*) [error if MIG not found] ..., to check that both host and target are GNU Hurd? > + *-linux*|*-k*bsd-gnu*) > + ;; Very right: these triples need to be special-cased first, as the following *-gnu* will also match i686-pc-linux-gnu, for example. > + i[[3456789]]86-*-gnu*) Typically, only i[3456]86 are used, I think. Or, just use i?86. > + if test "$MIG" =3D "" ; then > + AC_MSG_ERROR([no mig for use]) I'd say something like =C2=BBMIG not found but required for $host=C2=AB. > + fi > + ;; > +esac >=20 > # ---------------------- # > # Checks for libraries. # Can you change your patch according to my review and then resend it? (Don't worry -- it is completely normal that patches are revised, even several times, before they're approved. This helps to maintain a high code quality.) Gr=C3=BC=C3=9Fe, Thomas --=-=-= Content-Type: application/pgp-signature Content-length: 489 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBAgAGBQJRg3USAAoJEGe3hdm9kOiiAL0H+wd3aYfJ1ZQii7cEXrMeJpED GMV9cR1olBy+fmivp8MieAV63Gxmajs+zlY8Y5W3EeQBykOOfXyKC33RLFbqAf7y 3Mt+LwPslAjLV7yzZ8oxmqHho+SnwQWEmQq8vyFl6OHKc7rnPSmyAKjkHGYGxdKE HLiPHYj/Vui6UBC01W2a2G7TnHT36oSV4LQykGgb5Vut6wNYjx/FGFzRsTGQ7+yn k5fOMRqL4kgDnR43KH0l/qO/0gglwm7nZdo7n/HRdY9isAaaTl+e5qbTShvz9CX/ uaYrzTC+oUdqvID7CV6PUdPsIuV9NWcZJu5RWbQ4osKhMgSesIZEfiCbySvGecg= =jPzJ -----END PGP SIGNATURE----- --=-=-=--