Message ID | CAENS6EvYff12_nS5JeLZ_B2-1rirWYdosj-4PseNktGfTtbR+Q@mail.gmail.com |
---|---|
State | Committed |
Headers |
Return-Path: <x14314964@homiemail-mx20.g.dreamhost.com> X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 30900360078 for <siddhesh@wilcox.dreamhost.com>; Mon, 7 Apr 2014 13:39:43 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14314964) id D753040E20247; Mon, 7 Apr 2014 13:39:42 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx20.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx20.g.dreamhost.com (Postfix) with ESMTPS id AD95440DE4FA4 for <gdb@patchwork.siddhesh.in>; Mon, 7 Apr 2014 13:39:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:date:message-id:subject:from:to :content-type; q=dns; s=default; b=MlQIQQX2PNPV81qnFgkb76AQ+JZVu skh+EEu8ix66FQwgdgAP37byH3h0Ox2CKgOjkpOR3iFVKzLNgqzcTW9/0dfl9Qnq qIRLYw0uppriDlABCVhWnjVkg5SS2TfrefRHcQ4o8mdzHOta/A/U55G7JwwmwRFg QZdzO+v6EynFXY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:date:message-id:subject:from:to :content-type; s=default; bh=VZdPz6Sq8zS8jiAqBBsd+/ZfZ2E=; b=jLd gwvvB6DLxWIrc+83T8w76lup87U6D6NdPDvTROBCIJWp77cVZvCzwPF62LzUA+CW fCslTFCazYOyrHQO1N9enMVd+onp6okB3pcHzWbfpPkLZhIGtnQHj/YsRNTq6mT1 xe8MI2Mdr6wVWgcbJhUH+GA0iKBGaMidUMqXV0h0= Received: (qmail 7426 invoked by alias); 7 Apr 2014 20:39:40 -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-gdb=patchwork.siddhesh.in@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 7416 invoked by uid 89); 7 Apr 2014 20:39:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f41.google.com Received: from mail-qa0-f41.google.com (HELO mail-qa0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 07 Apr 2014 20:39:37 +0000 Received: by mail-qa0-f41.google.com with SMTP id j5so6457478qaq.14 for <gdb-patches@sourceware.org>; Mon, 07 Apr 2014 13:39:36 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.140.87.151 with SMTP id r23mr16903015qgd.75.1396903175932; Mon, 07 Apr 2014 13:39:35 -0700 (PDT) Received: by 10.140.30.74 with HTTP; Mon, 7 Apr 2014 13:39:35 -0700 (PDT) Date: Mon, 7 Apr 2014 13:39:35 -0700 Message-ID: <CAENS6EvYff12_nS5JeLZ_B2-1rirWYdosj-4PseNktGfTtbR+Q@mail.gmail.com> Subject: gdb/testsuite/compiler.c[c]: Identify clang From: David Blaikie <dblaikie@gmail.com> To: gdb-patches@sourceware.org, Eric Christopher <echristo@gmail.com>, Doug Evans <dje@google.com> Content-Type: multipart/mixed; boundary=001a11c13d6496629004f679dd43 X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in |
Commit Message
David Blaikie
April 7, 2014, 8:39 p.m. UTC
Adding support for the testsuite to correctly identify the clang compiler (previously it caught the generic GCC detection and was identified as GCC 4.2). This reduces some of the test failures when running the suite with Clang - for example the macro tests no longer run or fail (since they're only enabled for GCC). * compiler.c: identify the clang compiler (do I need a separate ChangeLog line for compiler.cc too? should the ChangeLog entry have the full path (gdb/testsuite/lib/compiler.c)?)
Comments
David Blaikie writes: > Adding support for the testsuite to correctly identify the clang > compiler (previously it caught the generic GCC detection and was > identified as GCC 4.2). > > This reduces some of the test failures when running the suite with > Clang - for example the macro tests no longer run or fail (since > they're only enabled for GCC). > > * compiler.c: identify the clang compiler > > (do I need a separate ChangeLog line for compiler.cc too? should the > ChangeLog entry have the full path (gdb/testsuite/lib/compiler.c)?) > diff --git gdb/testsuite/lib/compiler.c gdb/testsuite/lib/compiler.c > index afa0e59..c28367b 100644 > --- gdb/testsuite/lib/compiler.c > +++ gdb/testsuite/lib/compiler.c > @@ -73,3 +73,7 @@ set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info] > #if defined (__ARMCC_VERSION) > set compiler_info [join {armcc __ARMCC_VERSION} -] > #endif > + > +#if defined (__clang__) > +set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -] > +#endif > diff --git gdb/testsuite/lib/compiler.cc gdb/testsuite/lib/compiler.cc > index ee251bc..79c68b4 100644 > --- gdb/testsuite/lib/compiler.cc > +++ gdb/testsuite/lib/compiler.cc > @@ -61,3 +61,7 @@ set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info] > #if defined (__ARMCC_VERSION) > set compiler_info [join {armcc __ARMCC_VERSION} -] > #endif > + > +#if defined (__clang__) > +set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -] > +#endif Hi. Here's a changelog entry to use for this particular case. The format has lots of precise rules behind it, but Monkey-See-Monkey-Do hacking should get you most if not all of the way there. 2014-04-07 David Blaikie <dblaikie@gmail.com> * lib/compiler.c: Identify the clang compiler. * lib/compiler.cc: Ditto. In general, all edited files need to be mentioned (though there is debate over this for some cases, wheee....), and path names are required to be relative to the directory in which the ChangeLog lives. There is a convention for how to submit a changelog entry involving multiple ChangeLog files, but there's no need to go into that here.
On Mon, Apr 7, 2014 at 1:54 PM, Doug Evans <dje@google.com> wrote: > David Blaikie writes: > > Adding support for the testsuite to correctly identify the clang > > compiler (previously it caught the generic GCC detection and was > > identified as GCC 4.2). > > > > This reduces some of the test failures when running the suite with > > Clang - for example the macro tests no longer run or fail (since > > they're only enabled for GCC). > > > > * compiler.c: identify the clang compiler > > > > (do I need a separate ChangeLog line for compiler.cc too? should the > > ChangeLog entry have the full path (gdb/testsuite/lib/compiler.c)?) > > diff --git gdb/testsuite/lib/compiler.c gdb/testsuite/lib/compiler.c > > index afa0e59..c28367b 100644 > > --- gdb/testsuite/lib/compiler.c > > +++ gdb/testsuite/lib/compiler.c > > @@ -73,3 +73,7 @@ set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info] > > #if defined (__ARMCC_VERSION) > > set compiler_info [join {armcc __ARMCC_VERSION} -] > > #endif > > + > > +#if defined (__clang__) > > +set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -] > > +#endif > > diff --git gdb/testsuite/lib/compiler.cc gdb/testsuite/lib/compiler.cc > > index ee251bc..79c68b4 100644 > > --- gdb/testsuite/lib/compiler.cc > > +++ gdb/testsuite/lib/compiler.cc > > @@ -61,3 +61,7 @@ set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info] > > #if defined (__ARMCC_VERSION) > > set compiler_info [join {armcc __ARMCC_VERSION} -] > > #endif > > + > > +#if defined (__clang__) > > +set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -] > > +#endif > > Hi. > > Here's a changelog entry to use for this particular case. > The format has lots of precise rules behind it, but Monkey-See-Monkey-Do hacking should get you most if not all of the way there. > > 2014-04-07 David Blaikie <dblaikie@gmail.com> > > * lib/compiler.c: Identify the clang compiler. > * lib/compiler.cc: Ditto. > > In general, all edited files need to be mentioned (though there is debate over this for some cases, wheee....), and path names are required to be relative to the directory in which the ChangeLog lives. > There is a convention for how to submit a changelog entry involving multiple ChangeLog files, but there's no need to go into that here. Thanks Oh, and I realized I didn't actually specify, but I don't have commit access to gdb so if the patch (and suggested ChangeLog) are acceptable it'd be great if someone could commit it for me. Thanks! - David
On Mon, Apr 7, 2014 at 2:07 PM, David Blaikie <dblaikie@gmail.com> wrote: > On Mon, Apr 7, 2014 at 1:54 PM, Doug Evans <dje@google.com> wrote: >> David Blaikie writes: >> > Adding support for the testsuite to correctly identify the clang >> > compiler (previously it caught the generic GCC detection and was >> > identified as GCC 4.2). >> > >> > This reduces some of the test failures when running the suite with >> > Clang - for example the macro tests no longer run or fail (since >> > they're only enabled for GCC). >> > >> > * compiler.c: identify the clang compiler >> > >> > (do I need a separate ChangeLog line for compiler.cc too? should the >> > ChangeLog entry have the full path (gdb/testsuite/lib/compiler.c)?) >> > diff --git gdb/testsuite/lib/compiler.c gdb/testsuite/lib/compiler.c >> > index afa0e59..c28367b 100644 >> > --- gdb/testsuite/lib/compiler.c >> > +++ gdb/testsuite/lib/compiler.c >> > @@ -73,3 +73,7 @@ set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info] >> > #if defined (__ARMCC_VERSION) >> > set compiler_info [join {armcc __ARMCC_VERSION} -] >> > #endif >> > + >> > +#if defined (__clang__) >> > +set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -] >> > +#endif >> > diff --git gdb/testsuite/lib/compiler.cc gdb/testsuite/lib/compiler.cc >> > index ee251bc..79c68b4 100644 >> > --- gdb/testsuite/lib/compiler.cc >> > +++ gdb/testsuite/lib/compiler.cc >> > @@ -61,3 +61,7 @@ set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info] >> > #if defined (__ARMCC_VERSION) >> > set compiler_info [join {armcc __ARMCC_VERSION} -] >> > #endif >> > + >> > +#if defined (__clang__) >> > +set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -] >> > +#endif >> >> Hi. >> >> Here's a changelog entry to use for this particular case. >> The format has lots of precise rules behind it, but Monkey-See-Monkey-Do hacking should get you most if not all of the way there. >> >> 2014-04-07 David Blaikie <dblaikie@gmail.com> >> >> * lib/compiler.c: Identify the clang compiler. >> * lib/compiler.cc: Ditto. >> >> In general, all edited files need to be mentioned (though there is debate over this for some cases, wheee....), and path names are required to be relative to the directory in which the ChangeLog lives. >> There is a convention for how to submit a changelog entry involving multiple ChangeLog files, but there's no need to go into that here. > > Thanks > > Oh, and I realized I didn't actually specify, but I don't have commit > access to gdb so if the patch (and suggested ChangeLog) are acceptable > it'd be great if someone could commit it for me. > > Thanks! > - David Done.
diff --git gdb/testsuite/lib/compiler.c gdb/testsuite/lib/compiler.c index afa0e59..c28367b 100644 --- gdb/testsuite/lib/compiler.c +++ gdb/testsuite/lib/compiler.c @@ -73,3 +73,7 @@ set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info] #if defined (__ARMCC_VERSION) set compiler_info [join {armcc __ARMCC_VERSION} -] #endif + +#if defined (__clang__) +set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -] +#endif diff --git gdb/testsuite/lib/compiler.cc gdb/testsuite/lib/compiler.cc index ee251bc..79c68b4 100644 --- gdb/testsuite/lib/compiler.cc +++ gdb/testsuite/lib/compiler.cc @@ -61,3 +61,7 @@ set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info] #if defined (__ARMCC_VERSION) set compiler_info [join {armcc __ARMCC_VERSION} -] #endif + +#if defined (__clang__) +set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -] +#endif