From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17176 invoked by alias); 7 Apr 2014 20:54:52 -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 17125 invoked by uid 89); 7 Apr 2014 20:54:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f201.google.com Received: from mail-vc0-f201.google.com (HELO mail-vc0-f201.google.com) (209.85.220.201) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 07 Apr 2014 20:54:49 +0000 Received: by mail-vc0-f201.google.com with SMTP id ik5so1003789vcb.0 for ; Mon, 07 Apr 2014 13:54:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to :references; bh=7SdpT5fBTMrwrmhHi1xP/Hk30CcfHyUmXiHXoo+cyjI=; b=LBKjm+BYevXV9bBjxMqqXDs9hLxhHSLowYfkLE9kBVe8U6UgVHoN45jtzfh1PiXs6z LrtuFAADLjB5atbCXb5IZ9Bu75YWyuyzGMepJALHNXNZiysjp0ntFABAw4rlT4/KiGv0 KiyN7FjZARu+82x6amkHtYRi/1qg/1kDu242RjYFJH3CIheNbJhqS5PXcvLRdNkIGrmT lhLvVlXHLnt9yQ5UUGicJuDRUv+eD9Y8jb1NZAOS0TtxVH2pzM20mkK1fI9vsclVyxNY CzI9j1mE+4Y3zkw1nxokkNcOwr4A4lSv3aCnPHmjDdmN6l6AYwSnXKKRPGkrk2jrbele 7eKA== X-Gm-Message-State: ALoCoQl295Qvj15c9F5hBAIDyzgVkT/dle9L6WmqFhyf8haY04S62O0QO/p7823HxzU5MVZUPeb0RtVgf0Yumt0ouSJM23EbBkYsLLaSw5Rttbh38A5B+9fxesjYYv+sROYzSwtblyW903xeCu+ii2Ez5bl4K6Fr6/n3d9l24gv6RCDv+Xmkk9xkG4sKQrx9tZ5qfxGY8ERd21eHzooJACC8HMDZsmRBGA== X-Received: by 10.236.112.130 with SMTP id y2mr15765706yhg.6.1396904087334; Mon, 07 Apr 2014 13:54:47 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id a44si3453315yhb.6.2014.04.07.13.54.47 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Apr 2014 13:54:47 -0700 (PDT) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id A2D9D31C267; Mon, 7 Apr 2014 13:54:46 -0700 (PDT) From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21315.4246.96784.712706@ruffy.mtv.corp.google.com> Date: Mon, 07 Apr 2014 20:54:00 -0000 To: David Blaikie Cc: gdb-patches@sourceware.org, Eric Christopher Subject: Re: gdb/testsuite/compiler.c[c]: Identify clang In-Reply-To: References: X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00084.txt.bz2 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 * 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.