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

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/testsuite/lib/libgloss.exp')
-rw-r--r--libgloss/testsuite/lib/libgloss.exp77
1 files changed, 77 insertions, 0 deletions
diff --git a/libgloss/testsuite/lib/libgloss.exp b/libgloss/testsuite/lib/libgloss.exp
new file mode 100644
index 000000000..4335f3e3e
--- /dev/null
+++ b/libgloss/testsuite/lib/libgloss.exp
@@ -0,0 +1,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 } {
+}