From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20072 invoked by alias); 4 Feb 2004 15:41:48 -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 20055 invoked from network); 4 Feb 2004 15:41:47 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 4 Feb 2004 15:41:47 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 0B6E12B92; Wed, 4 Feb 2004 10:41:49 -0500 (EST) Message-ID: <402112BC.9020704@gnu.org> Date: Wed, 04 Feb 2004 15:41:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 MIME-Version: 1.0 To: Michael Elizabeth Chastain Cc: brobecker@gnat.com, gdb-patches@sources.redhat.com Subject: Re: Problems with dejagnu and c++ tests... References: <20040204140131.D58B14B364@berman.michael-chastain.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-02/txt/msg00073.txt.bz2 > Well, you could just add "return 1" to skip_cplus_tests on that system. > > But in the long run, get_compiler_info needs to be smarter. > (Really, default_target_compile needs to have a better interface, > but we can't touch that). > > Perhaps we should just kill get_compiler_info and add some more > code to initialization. Have it compile and run two test programs, > one in C, and one in C++. Like this: > > #include > int main () > { > #if defined(__GNUC__) > printf ("set compiler_info gcc-%d-%d\n", __GNUC__, __GNUC__MINOR__); > printf ("set gcc_compiled %d\n", __GNUC__); > else > printf ("set gcc_compiled 0\n") > #endif > } (aren't we trying to delete gcc_compiled? :-) > just save the results and have get_compiler_info set the right > results for the language specified. Something based on CPP would be more robust, and avoid assumptions such as the target has output and can correctly compile / execute code. Consider what happens when trying to bring up a new GDB+GCC+.... Andrew