From patchwork Fri Mar 27 15:15:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 5847 Received: (qmail 106501 invoked by alias); 27 Mar 2015 15:15:49 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 106489 invoked by uid 89); 27 Mar 2015 15:15:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: einhorn.in-berlin.de Received: from einhorn.in-berlin.de (HELO einhorn.in-berlin.de) (192.109.42.8) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 27 Mar 2015 15:15:47 +0000 X-Envelope-From: doko@ubuntu.com Received: from [192.168.42.218] (dslb-088-073-084-132.088.073.pools.vodafone-ip.de [88.73.84.132]) (authenticated bits=0) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id t2RFFcer006802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 27 Mar 2015 16:15:38 +0100 Message-ID: <55157417.10605@ubuntu.com> Date: Fri, 27 Mar 2015 16:15:35 +0100 From: Matthias Klose User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [patch] fix the triplet regexp to recognize triplets, not only quadruplets References: <551006B4.2040404@ubuntu.com> <5513D980.7000002@redhat.com> In-Reply-To: <5513D980.7000002@redhat.com> On 03/26/2015 11:03 AM, Pedro Alves wrote: > On 03/23/2015 12:27 PM, Matthias Klose wrote: >> This allows triplets where the vendor is not set. Should go to the trunk and the >> 7.9 branch. >> >> Matthias >> >> * compile/compile.c (compile_to_object): Allow triplets. >> >> --- a/gdb/compile/compile.c >> +++ b/gdb/compile/compile.c >> @@ -483,7 +483,7 @@ compile_to_object (struct command_line * >> >> os_rx = osabi_triplet_regexp (gdbarch_osabi (gdbarch)); >> arch_rx = gdbarch_gnu_triplet_regexp (gdbarch); >> - triplet_rx = concat (arch_rx, "-[^-]*-", os_rx, (char *) NULL); >> + triplet_rx = concat (arch_rx, "(-[^-]*)?-", os_rx, (char *) NULL); > > Add comment like: > > /* Allow triplets with or without vendor set. */ > > OK with that change. updated patch attached. Please could somebody commit the patch? Matthias * compile/compile.c (compile_to_object): Allow triplets with or without vendor set. --- a/gdb/compile/compile.c +++ b/gdb/compile/compile.c @@ -483,7 +483,9 @@ compile_to_object (struct command_line * os_rx = osabi_triplet_regexp (gdbarch_osabi (gdbarch)); arch_rx = gdbarch_gnu_triplet_regexp (gdbarch); - triplet_rx = concat (arch_rx, "-[^-]*-", os_rx, (char *) NULL); + + /* Allow triplets with or without vendor set. */ + triplet_rx = concat (arch_rx, "(-[^-]*)?-", os_rx, (char *) NULL); make_cleanup (xfree, triplet_rx); /* Set compiler command-line arguments. */