From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44612 invoked by alias); 15 Apr 2016 15:00:26 -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 44588 invoked by uid 89); 15 Apr 2016 15:00:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2126, HX-Received:10.98.10.156 X-HELO: mail-pf0-f176.google.com Received: from mail-pf0-f176.google.com (HELO mail-pf0-f176.google.com) (209.85.192.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 15 Apr 2016 15:00:16 +0000 Received: by mail-pf0-f176.google.com with SMTP id n1so57703211pfn.2 for ; Fri, 15 Apr 2016 08:00:15 -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:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=R/ffKP8jPX/A+ibznObAnrZeam4xqf/JO+T3QH+j5vw=; b=TahGNc6VSIMDV51Rv2HVIystxwzmfNEKQiVyLg5Cv4r5Prx8CSo5+jTjVdbH+zzTdR RPRGt8xJTmKQQ49lkTC4pbDvw3luzs5MpW8l5oL2RUoHWSbK4Tn5dbS3RhDWBVuEOSxX yRzsTkEuMxtFGn4hjC9qRlPhUvnoTWsiuIWI6pPRwdYPXV84LnI/4SINNSjtYI1uff3p 2MS8lehSTWOtH9hAwAaPXtLveu3R+wOjq5iAIES/SZNhXJzSroEtEA2rEUZxvOXYjqQ8 TKtayOT6IArGyckEtCiVC86sq0GhKsiyW1u8da6pXtj/P15VAcAPm2M61xf8IxZXzMhV QsKw== X-Gm-Message-State: AOPr4FXy94jr2B6yw16QYxT76Anx6wozNKu+ImmhQeEmamfgm3VtaIV7xqHBGUy0lAARXg== X-Received: by 10.98.10.156 with SMTP id 28mr30147000pfk.130.1460732414345; Fri, 15 Apr 2016 08:00:14 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id dh8sm65524073pad.46.2016.04.15.08.00.11 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 15 Apr 2016 08:00:13 -0700 (PDT) From: Yao Qi To: Bernhard Heckel Cc: qiyaoltc@gmail.com, gdb-patches@sourceware.org, brobecker@adacore.com Subject: Re: [PATCH V2 1/2] testsuite: Support detection of Intel compilers via test_compiler_version. References: <1460724297-23523-1-git-send-email-bernhard.heckel@intel.com> <1460724297-23523-2-git-send-email-bernhard.heckel@intel.com> Date: Fri, 15 Apr 2016 15:00:00 -0000 In-Reply-To: <1460724297-23523-2-git-send-email-bernhard.heckel@intel.com> (Bernhard Heckel's message of "Fri, 15 Apr 2016 14:44:56 +0200") Message-ID: <86k2jylxxu.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00360.txt.bz2 Bernhard Heckel writes: > Add Intel specific preprocessor macros to query the version of the compil= er. > Looks you query the version of c/c++ compiler, and use it for fortran. Can we assume that fortran compiler's version is the same as the c/c++ compiler version? In an extreme case, user can set c compiler to icc, and set fortran compiler to gfortran. Looks we've already had such assumption in ada, that is, we determine ada compiler version by the c compiler, so I am OK to do the same for fortran. > --- a/gdb/testsuite/lib/compiler.cc > +++ b/gdb/testsuite/lib/compiler.cc > @@ -44,3 +44,15 @@ set compiler_info [join {armcc __ARMCC_VERSION} -] > #if defined (__clang__) > set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_p= atchlevel__} -] > #endif > + > +#if defined (__ICC) > +set icc_major [string range __ICC 0 1] > +set icc_minor [format "%d" [string range __ICC 2 [expr {[string length _= _ICC] -1}]]] > +set icc_update __INTEL_COMPILER_UPDATE > +set compiler_info [join "icc $icc_major $icc_minor $icc_update" -] > +#elif defined (__ICL) > +set icc_major [string range __ICL 0 1] > +set icc_minor [format "%d" [string range __ICL 2 [expr {[string length _= _ICL] -1}]]] > +set icc_update __INTEL_COMPILER_UPDATE > +set compiler_info [join "icc $icc_major $icc_minor $icc_update" -] > +#endif Do we really need the change to compiler.cc? Since we query the info of compilers for different languages through c compiler, we don't need the change compiler.cc unless we need to know the compiler info in some c++ tests. > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index 1ef6a96..75c5e68 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -3553,6 +3553,9 @@ proc gdb_compile_shlib {sources dest options} { > lappend obj_options "additional_flags=3D-fpic" > } > } > + "icc-*" { > + lappend obj_options "additional_flags=3D-fpic" > + } Why do we need this change? How is it related to this patch series? --=20 Yao (=E9=BD=90=E5=B0=A7)