From patchwork Mon Apr 7 20:39:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Blaikie X-Patchwork-Id: 422 Return-Path: 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 ; 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 ; 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: 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 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 ; 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: Subject: gdb/testsuite/compiler.c[c]: Identify clang From: David Blaikie To: gdb-patches@sourceware.org, Eric Christopher , Doug Evans X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in 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