Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: David Blaikie <dblaikie@gmail.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org, Eric Christopher <echristo@gmail.com>
Subject: Re: gdb/testsuite/compiler.c[c]: Identify clang
Date: Mon, 07 Apr 2014 21:07:00 -0000	[thread overview]
Message-ID: <CAENS6EsocWyv3HFb3fEKdgyRRFN4mNe-vmcgRrOPXOZrMe2QTA@mail.gmail.com> (raw)
In-Reply-To: <21315.4246.96784.712706@ruffy.mtv.corp.google.com>

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


  reply	other threads:[~2014-04-07 21:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07 20:39 David Blaikie
2014-04-07 20:54 ` Doug Evans
2014-04-07 21:07   ` David Blaikie [this message]
2014-04-07 21:16     ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAENS6EsocWyv3HFb3fEKdgyRRFN4mNe-vmcgRrOPXOZrMe2QTA@mail.gmail.com \
    --to=dblaikie@gmail.com \
    --cc=dje@google.com \
    --cc=echristo@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox