]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/lib/compiler.cc
2004-01-02 Michael Chastain <mec.gnu@mindspring.com>
[thirdparty/binutils-gdb.git] / gdb / testsuite / lib / compiler.cc
1 /* This test file is part of GDB, the GNU debugger.
2
3 Copyright 1995, 1999, 2003, 2004 Free Software Foundation, Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 Please email any bugs, comments, and/or additions to this file to:
20 bug-gdb@prep.ai.mit.edu */
21
22 /* Often the behavior of any particular test depends upon what compiler was
23 used to compile the test. As each test is compiled, this file is
24 preprocessed by the same compiler used to compile that specific test
25 (different tests might be compiled by different compilers, particularly
26 if compiled at different times), and used to generate a *.ci (compiler
27 info) file for that test.
28
29 I.E., when callfuncs is compiled, a callfuncs.ci file will be generated,
30 which can then be sourced by callfuncs.exp to give callfuncs.exp access
31 to information about the compilation environment.
32
33 TODO: It might be a good idea to add expect code that tests each
34 definition made with 'set" to see if one already exists, and if so
35 warn about conflicts if it is being set to something else. */
36
37 #if defined (__GNUC__)
38 set gcc_compiled __GNUC__
39 set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
40 #else
41 set gcc_compiled 0
42 set compiler_info ""
43 #endif
44
45 return 0