Welcome to mirror list, hosted at ThFree Co, Russian Federation.

libgloss.exp « lib « testsuite « libgloss - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4335f3e3e1381a5bfbf6487e118b39625b266ffc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# This file was written by Rob Savoye. (rob@cygnus.com)

# The default option list can be overridden by
# TORTURE_OPTIONS="{ { list1 } ... { listN } }"

if ![info exists TORTURE_OPTIONS] {
    # FIXME: We should test -g at least once.
    set TORTURE_OPTIONS [list \
        { -O0 } { -O1 } { -O2 } \
        { -O2 -fomit-frame-pointer -finline-functions } \
        { -O2 -fomit-frame-pointer -finline-functions -funroll-all-loops }]
}

# These globals are used if no compiler arguments are provided.
# They are also used by the various testsuites to define the environment:
# where to find stdio.h, libc.a, etc.

global CC
if ![info exists CC] then {
    set CC [findfile $base_dir/xgcc "$base_dir/xgcc -B$base_dir/" [transform gcc
]]
}
if { [which $CC] == 0 } then {
    perror "$CC does not exist"
    exit 1
}

global CFLAGS
if ![info exists CFLAGS] then {
    set CFLAGS ""
}

global LIBS
if ![info exists LIBS] then {
    set LIBS ""
}

# It is difficult to come up with a situation where one has to use LDFLAGS
# and not LIBS (why two?).  Both are useful in makefiles, so maybe it's better
# to just continue existing practice.  However, there is still a lot of
# confusion about when to use one or the other.
global LDFLAGS
if ![info exists LDFLAGS] then {
    set LDFLAGS ""
}

proc just_compile { file } {
    global CFLAGS
    set output "$tmpdir/[file tail [file rootname $src]].o"
    
    append CFLAGS " -w -c -o $output $option"
}

proc just_link { file } {
}

proc just_execute { file } {
}

proc run_test { file } {
}