From patchwork Mon Mar 23 12:27:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 5757 Received: (qmail 86621 invoked by alias); 23 Mar 2015 12:27:54 -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 86609 invoked by uid 89); 23 Mar 2015 12:27:53 -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; Mon, 23 Mar 2015 12:27:52 +0000 X-Envelope-From: doko@ubuntu.com X-Envelope-To: Received: from [192.168.42.218] (dslb-088-073-105-153.088.073.pools.vodafone-ip.de [88.73.105.153]) (authenticated bits=0) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id t2NCRmLU000806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 23 Mar 2015 13:27:48 +0100 Message-ID: <551006B4.2040404@ubuntu.com> Date: Mon, 23 Mar 2015 13:27:32 +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: gdb-patches@sourceware.org Subject: [patch] fix the triplet regexp to recognize triplets, not only quadruplets 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); make_cleanup (xfree, triplet_rx); /* Set compiler command-line arguments. */