From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7842 invoked by alias); 7 Apr 2014 21:16:06 -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 7832 invoked by uid 89); 7 Apr 2014 21:16:05 -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-f175.google.com Received: from mail-vc0-f175.google.com (HELO mail-vc0-f175.google.com) (209.85.220.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 07 Apr 2014 21:16:02 +0000 Received: by mail-vc0-f175.google.com with SMTP id lh14so12763vcb.34 for ; Mon, 07 Apr 2014 14:16:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=EoJMGG8qDZBO+ilHRVtiuXKnidNm5BTi/ZB6esHCwqU=; b=kL1CpjfD15TfCNV/SyXvhe2JaD2TYu96K3zXxbCKhDKaVG4csXGnh/LWKm9Ti9tSO1 0CIn9ZNxX7huDxzB8MxMhwiLZsXOKUVW1KXG4k/sLUJH8OXkIWj7f7Gq5vWmub3ziBxq 0+N3BQMu+8n9dfzwvlu7Hr0cLKBrbFr5n8rL8rBUjHM2OjkQaMX1T/jdvN4QRRoXrZkF jJbPbppLJtNmGg17jnNiMQzioqaDL5m4Sur8DWJIUUtSahEn8VcCtEVetkEP4WkD8dMY zr+QLVPv0Wl3ugTb0rCr1VjOFXNoE8OhBz2Hnguuvhq1+feRZt1hNNnFs4+KEFfhPSfL PbOA== X-Gm-Message-State: ALoCoQlfRk2Xk7GMSpI+7rt9u6Cr2+8h7tX3VwbWHsO+y8vcnCeUc/S3sBFlMrTF0VUEokEu2JYWy5oBdG4AzN/bhicYxr/ehGjWCGVs7TqOCfQMiaq2xR8g5TZAw3130uN/8QUkl/5m/xTWgI43UgBrqa4bwa/bomyDaGAWgi5g4OFWaIlGknnZpAfcQeqzw0ElTX5Q/IqTjuOIxKsGXM8g7ZMD0Hnc6w== MIME-Version: 1.0 X-Received: by 10.220.105.4 with SMTP id r4mr2504086vco.27.1396905360556; Mon, 07 Apr 2014 14:16:00 -0700 (PDT) Received: by 10.52.13.101 with HTTP; Mon, 7 Apr 2014 14:16:00 -0700 (PDT) In-Reply-To: References: <21315.4246.96784.712706@ruffy.mtv.corp.google.com> Date: Mon, 07 Apr 2014 21:16:00 -0000 Message-ID: Subject: Re: gdb/testsuite/compiler.c[c]: Identify clang From: Doug Evans To: David Blaikie Cc: gdb-patches , Eric Christopher Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00086.txt.bz2 On Mon, Apr 7, 2014 at 2:07 PM, David Blaikie wrote: > On Mon, Apr 7, 2014 at 1:54 PM, Doug Evans 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 >> >> * 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.