source: trunk/libs/newlib/src/libgloss/testsuite/lib/libgloss.exp @ 658

Last change on this file since 658 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 2.3 KB
Line 
1#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16
17# This file was written by Rob Savoye. (rob@cygnus.com)
18
19# The default option list can be overridden by
20# TORTURE_OPTIONS="{ { list1 } ... { listN } }"
21
22if ![info exists TORTURE_OPTIONS] {
23    # FIXME: We should test -g at least once.
24    set TORTURE_OPTIONS [list \
25        { -O0 } { -O1 } { -O2 } \
26        { -O2 -fomit-frame-pointer -finline-functions } \
27        { -O2 -fomit-frame-pointer -finline-functions -funroll-all-loops }]
28}
29
30# These globals are used if no compiler arguments are provided.
31# They are also used by the various testsuites to define the environment:
32# where to find stdio.h, libc.a, etc.
33
34global CC
35if ![info exists CC] then {
36    set CC [findfile $base_dir/xgcc "$base_dir/xgcc -B$base_dir/" [transform gcc
37]]
38}
39if { [which $CC] == 0 } then {
40    perror "$CC does not exist"
41    exit 1
42}
43
44global CFLAGS
45if ![info exists CFLAGS] then {
46    set CFLAGS ""
47}
48
49global LIBS
50if ![info exists LIBS] then {
51    set LIBS ""
52}
53
54# It is difficult to come up with a situation where one has to use LDFLAGS
55# and not LIBS (why two?).  Both are useful in makefiles, so maybe it's better
56# to just continue existing practice.  However, there is still a lot of
57# confusion about when to use one or the other.
58global LDFLAGS
59if ![info exists LDFLAGS] then {
60    set LDFLAGS ""
61}
62
63proc just_compile { file } {
64    global CFLAGS
65    set output "$tmpdir/[file tail [file rootname $src]].o"
66   
67    append CFLAGS " -w -c -o $output $option"
68}
69
70proc just_link { file } {
71}
72
73proc just_execute { file } {
74}
75
76proc run_test { file } {
77}
Note: See TracBrowser for help on using the repository browser.