aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-11-22 18:19:43 +0000
committerIan Lance Taylor <ian@airs.com>1995-11-22 18:19:43 +0000
commit49c43d0201d2ce37d0d78e147f760b60635914da (patch)
tree45285ce973d4c20dbf73559469673e31e5d0a6a8 /binutils
parent53e174d692facac03f31752ad77fa80aecc7648b (diff)
downloadgdb-49c43d0201d2ce37d0d78e147f760b60635914da.zip
gdb-49c43d0201d2ce37d0d78e147f760b60635914da.tar.gz
gdb-49c43d0201d2ce37d0d78e147f760b60635914da.tar.bz2
* lib/utils-lib.exp (prune_system_crud): Discard -g -O warnings
from native compilers on OSF/1 and SunOS.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/testsuite/ChangeLog15
-rw-r--r--binutils/testsuite/lib/utils-lib.exp49
2 files changed, 64 insertions, 0 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index f089f63..16afefc 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,18 @@
+Wed Nov 22 13:18:58 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * lib/utils-lib.exp (prune_system_crud): Discard -g -O warnings
+ from native compilers on OSF/1 and SunOS.
+
+Fri Nov 17 10:36:09 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * lib/utils-lib.exp (default_binutils_compiler: Change error
+ message to say compilation rather than assembly.
+
+Wed Nov 15 18:34:42 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * binutils-all/objcopy.exp: Simple copy test does appear to work
+ on i*86-svr4.
+
Wed Nov 15 12:19:28 1995 Ian Lance Taylor <ian@cygnus.com>
* binutils-all/objcopy.exp: If assembly fails, call unresolved.
diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp
index 2ea9f83..395e762 100644
--- a/binutils/testsuite/lib/utils-lib.exp
+++ b/binutils/testsuite/lib/utils-lib.exp
@@ -43,6 +43,7 @@ proc binutil_version { prog } {
#
proc default_binutils_run { prog progargs } {
global binutils_run_failed
+ global host_triplet
set binutils_run_failed 0
@@ -67,6 +68,7 @@ proc default_binutils_run { prog progargs } {
# language.
regsub -all "\\$" $progargs "\\$" progq
catch "exec $prog $progq" exec_output
+ set exec_output [prune_system_crud $host_triplet $exec_output]
if {![string match "" $exec_output]} then {
send_log "$exec_output\n"
verbose "$exec_output"
@@ -81,6 +83,7 @@ proc default_binutils_run { prog progargs } {
proc default_binutils_assemble { as source object } {
global ASFLAGS
global srcdir
+ global host_triplet
if {[which $as] == 0} then {
perror "$as does not exist"
@@ -117,6 +120,46 @@ proc default_binutils_assemble { as source object } {
}
}
+#
+# default_binutils_compile
+# compile a file
+#
+proc default_binutils_compile { cc flags source object } {
+ global CFLAGS
+ global srcdir
+ global host_triplet
+
+ if {[which $cc] == 0} then {
+ perror "$cc does not exist"
+ return 0
+ }
+
+ if ![info exists CFLAGS] { set CFLAGS "" }
+
+ send_log "$cc $flags $CFLAGS -o $object $source\n"
+ verbose "$cc $flags $CFLAGS -o $object $source"
+ catch "exec $cc $flags $CFLAGS -o $object $source" exec_output
+
+ set exec_output [prune_system_crud $host_triplet $exec_output]
+
+ if [string match "" $exec_output] then {
+ return 1
+ } else {
+ send_log "$exec_output\n"
+ verbose "$exec_output"
+ perror "$source: compilation failed"
+ return 0
+ }
+}
+
+#
+# default_binutils_remove
+# remove a file
+#
+proc default_binutils_remove { file } {
+ catch "exec rm -f $file" exec_output
+}
+
# This definition is taken from an unreleased version of DejaGnu. Once
# that version gets released, and has been out in the world for a few
# months at least, it may be safe to delete this copy.
@@ -137,6 +180,12 @@ if ![string length [info proc prune_system_crud]] {
# The "\\1" is to try to preserve a "\n" but only if necessary.
regsub -all "(^|\n)(ld.so: warning:\[^\n\]*\n?)+" $text "\\1" text
+ # This happens when compiling on Alpha OSF/1 with cc -g -O.
+ regsub -all "(^|\n)(uopt: Warning: file not optimized; use -g3 if both optimization and debug wanted\n?)+" $text "\\1" text
+
+ # This happens on SunOS with cc -g -O.
+ regsub -all "(^|\n)(cc: Warning: -O conflicts with -g. -O turned off.\n?)+" $text "\\1" text
+
# It might be tempting to get carried away and delete blank lines, etc.
# Just delete *exactly* what we're ask to, and that's it.
return $text