* lib/utils-lib.exp (prune_system_crud): Discard -g -O warnings

from native compilers on OSF/1 and SunOS.
This commit is contained in:
Ian Lance Taylor 1995-11-22 18:19:43 +00:00
parent 53e174d692
commit 49c43d0201
2 changed files with 64 additions and 0 deletions

View File

@ -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.

View File

@ -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