From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6411 invoked by alias); 16 Nov 2003 16:08:17 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6403 invoked from network); 16 Nov 2003 16:08:17 -0000 Received: from unknown (HELO granger.mail.mindspring.net) (207.69.200.148) by sources.redhat.com with SMTP; 16 Nov 2003 16:08:17 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by granger.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1ALPRg-0004EO-00; Sun, 16 Nov 2003 11:08:16 -0500 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 0D6D14B408; Sun, 16 Nov 2003 11:08:05 -0500 (EST) To: ac131313@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [patch/rfc/testsuite] Add "compiler_info" Message-Id: <20031116160805.0D6D14B408@berman.michael-chastain.com> Date: Sun, 16 Nov 2003 16:08:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2003-11/txt/msg00341.txt.bz2 Proofread and tested, no problems. I'm appending a little snippet of test code. I tested with: gcc 2.95.3 # reports gnuc-2-95 gcc 3.2-7-rh # reports gnuc-3-2 gcc 3.3.2 # reports gnuc-3-3 gcc gcc-3_3-branch # reports gnuc-3-3 gcc HEAD # reports gnuc-3-4 I didn't test the non-gcc path. I prefer "gcc" to "gnuc" but "gnuc" is okay by me. Recommended for approval. Michael C === 2003-11-14 Andrew Cagney * lib/gdb.exp (compiler_info): New global. (test_compiler_info): New function. (get_compiler_info): Set compiler_info. * lib/compiler.c, lib/compiler.cc: Add copyright. When GNUC, set "compiler_info". === global compiler_info warning "compiler_info: ${compiler_info}" if [test_compiler_info gnuc-2-*] { warning "test_compiler_info: gnuc-2-*" } if [test_compiler_info gnuc-3-*] { warning "test_compiler_info: gnuc-3-*" } if [test_compiler_info gnuc-3-2] { warning "test_compiler_info: gnuc-3-2" } if [test_compiler_info gnuc-3-3] { warning "test_compiler_info: gnuc-3-3" } if [test_compiler_info gnuc-3-4] { warning "test_compiler_info: gnuc-3-4" }