This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

(patch) hpjyg14: dejagnu/lib/target.exp cleanup


Cleans up HP compiler warning message filter code a bit.

Cleans up usage of env() equivalents, which was introduced some months
ago from HP but was found to be problematic for those in the larger gdb
development community doing build check from top build directories.  HP
has since backed out the change in our tree and made use of site.exp to
specify compiler / flag choices.

ChangeLog:

1999-11-05	Jimmy Guo	<guo@cup.hp.com>

	* lib/target.exp: Remove usage of env() equivalents of CC,
          CFLAGS, etc. etc. which can pick up something not intended for
          test runs if make check is issued from higher build
          directories; also cleans up HP compiler warning message
          filtering code a bit.

Index: dejagnu/lib/target.exp
/opt/gnu/bin/diff -r -c -N  /view/guo.import//CLO/Components/WDB/Src/gnu/dejagnu/lib/target.exp dejagnu/lib/target.exp
*** /view/guo.import//CLO/Components/WDB/Src/gnu/dejagnu/lib/target.exp	Fri Sep 10 16:50:58 1999
--- dejagnu/lib/target.exp	Fri Nov  5 13:51:15 1999
***************
*** 142,204 ****
      if [ishost "alpha*-*-*"] {
          regsub -all "(^|\n)(/usr/(ucb|bin)/ld.*without exceptions was\[^\n\]+\n?)" $text "\\1" text
      }
      if [ishost "hppa*-*-hpux*"] {
         # Ignore the compiler's warnings about PA incompatibility.
         regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text 
   
!        regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text 
! 
!        # And the linker's +vcompatwarnings verbage.
!        regsub -all "(^|\n)\[^\n\]*Linker features were used that may not be supported\[^\n\]*.\[^\n\]*." $text "" text
  
!        # Ignore these warnings, which the HP aCC compiler seems to
!        # generate on HP-UX 10.30 and 11.0.  (Something is probably
!        # wrong with some system headers, but still...)
!        #
!        # This particular warning always is given with a line of warning
!        # text, followed by a source line, followed by a line with "^^^"
!        # underlining an offending symbol name.  Here we slurp up the
!        # warning text and the next two lines, assuming that they are
!        # the source line and underline chars.
!        #
!        regsub -all "Warning .*The linkage directive is ignored for an object or function declared static..\[^\n\]*.\[^\n\]*." $text "" text
   
!        # Ignore these warnings, which I often see from the ANSI C
!        # compiler installed on HP-UX 11.0 machines.  (Something is
!        # probably wrong with an installation, or perhaps NLS isn't
!        # quite healthy yet on 11.0.  In either case, it's easier to
!        # "fix" this nit here, than it is to track down & fix the
!        # root cause.)
!        #
!        # This particular warning always is given with a line of warning
!        # text, followed by line that says "Using internal messages".
!        #
!        regsub -all "Warning: Unable to open pxdb message catalog.*" $text "" text
!        regsub -all ".* Using internal messages.*" $text "" text
   
!        # Another form of the "unable to find message catalog" warning.
!        #
!        regsub -all "cpp: warning .*Possibly incorrect message catalog." $text "" text
   
!        # Another odd warning on 11.0.
!        #
!        regsub -all "aCC .assigner.: Warning .*Could not find library for -l.*" $text "" text
   
!        # Oh heck, just keep adding 'em here...
!        #
!        regsub -all "aCC .assigner.: Warning .*Could not satisfy instantiation request for \[^\n\]* contained in\[^\n\]*\n\t/lib/pa20_64/lib\[a-zA-Z0-9\]*.sl" $text "" text
         
!       # Remove the lines that are output by the HP F77 compiler to
!       # indicate the functions that are being compiled.
!       upvar compiler_type compiler_type
!       if { [info exists compiler_type] && $compiler_type == "f77" } {
! 	  regsub -all "\[ \ta-zA-Z_0-9\./\]*:\[\r\n\]+" $text "" text
!       }
  
!       # Ignore the warnings about unknown options
!       regsub -all ".*warning \[0-9\]+: Unknown option.*ignored.*" $text "" text
! 
!       }
  
      # Ignore these.
      regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
--- 142,204 ----
      if [ishost "alpha*-*-*"] {
          regsub -all "(^|\n)(/usr/(ucb|bin)/ld.*without exceptions was\[^\n\]+\n?)" $text "\\1" text
      }
+ 
      if [ishost "hppa*-*-hpux*"] {
         # Ignore the compiler's warnings about PA incompatibility.
         regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text 
   
!         # And the linker's +vcompatwarnings verbage.
!         regsub -all "(^|\n)\[^\n\]*Linker features were used that may not be supported\[^\n\]*.\[^\n\]*." $text "" text
  
!         # Ignore these warnings, which the HP aCC compiler seems to
!         # generate on HP-UX 10.30 and 11.0.  (Something is probably
!         # wrong with some system headers, but still...)
!         #
!         # This particular warning always is given with a line of warning
!         # text, followed by a source line, followed by a line with "^^^"
!         # underlining an offending symbol name.  Here we slurp up the
!         # warning text and the next two lines, assuming that they are
!         # the source line and underline chars.
!         #
!         regsub -all "Warning .*The linkage directive is ignored for an object or function declared static..\[^\n\]*.\[^\n\]*." $text "" text
   
!         # Ignore these warnings, which I often see from the ANSI C
!         # compiler installed on HP-UX 11.0 machines.  (Something is
!         # probably wrong with an installation, or perhaps NLS isn't
!         # quite healthy yet on 11.0.  In either case, it's easier to
!         # "fix" this nit here, than it is to track down & fix the
!         # root cause.)
!         #
!         # This particular warning always is given with a line of warning
!         # text, followed by line that says "Using internal messages".
!         #
!         regsub -all "Warning: Unable to open pxdb message catalog.*" $text "" text
!         regsub -all ".* Using internal messages.*" $text "" text
   
!         # Another form of the "unable to find message catalog" warning.
!         #
!         regsub -all "cpp: warning .*Possibly incorrect message catalog." $text "" text
   
!         # Another odd warning on 11.0.
!         #
!         regsub -all "aCC .assigner.: Warning .*Could not find library for -l.*" $text "" text
   
!         # Oh heck, just keep adding 'em here...
!         #
!         regsub -all "aCC .assigner.: Warning .*Could not satisfy instantiation request for \[^\n\]* contained in\[^\n\]*\n\t/lib/pa20_64/lib\[a-zA-Z0-9\]*.sl" $text "" text
         
!         # Remove the lines that are output by the HP F77 / F90 compiler to
!         # indicate the functions that are being compiled.
!         upvar compiler_type compiler_type
!         if { [info exists compiler_type]
! 	    &&
! 	    ($compiler_type == "f77") } {
! 	    regsub -all "\[ \ta-zA-Z_0-9\./\-\]*(:|)\[\r\n\]+.*" $text "" text
!         }
  
!         # Ignore the warnings about unknown options
!         regsub -all ".*warning \[0-9\]+: Unknown option.*ignored.*" $text "" text
!     }
  
      # Ignore these.
      regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
***************
*** 283,289 ****
  proc default_target_compile {source destfile type options} {
      global target_triplet
      global tool_root_dir
-     global env
      global CFLAGS_FOR_TARGET
      global compiler_flags
  
--- 283,288 ----
***************
*** 300,310 ****
  
      if [info exists CFLAGS_FOR_TARGET] {
  	append add_flags " $CFLAGS_FOR_TARGET"
- # The top level Makefile sets (and exports) a *FLAGS_FOR_TARGET
- # that may not be applicable to testsuite runs.  This conflict
- # needs to be resolved.
- #    } elseif [info exists env(CFLAGS_FOR_TARGET)] {
- #	append add_flags " $env(CFLAGS_FOR_TARGET)"
      }
  
      if [info exists target_info(host,name)] {
--- 299,304 ----
***************
*** 393,440 ****
      global CC_FOR_TARGET
      global CXX_FOR_TARGET
      global F77_FOR_TARGET
!     
      if [info exists CC_FOR_TARGET] {
  	if { $compiler == "" } {
  	    set compiler $CC_FOR_TARGET
  	}
- # When started from a mid-level directory (eg gdb)
- # the Makefile may export a *_FOR_TARGET that isn't
- # applicable.
- #    } elseif [info exists env(CC_FOR_TARGET)] {
- #	if { $compiler == "" } {
- #	    set compiler $env(CC_FOR_TARGET)
- #	}
-     } elseif { [info exists env(CC_FOR_TARGET)] && $env(CC_FOR_TARGET) != "" } {
- 	if { $compiler == "" } {
- 	    set compiler $env(CC_FOR_TARGET)
- 	}
      }
  
      if [info exists CXX_FOR_TARGET] {
  	if { $compiler_type == "c++" } {
  	    set compiler $CXX_FOR_TARGET
  	}
- # When started from a mid-level directory (eg gdb)
- # the Makefile may export a *_FOR_TARGET that isn't
- # applicable.
- #    } elseif [info exists env(CXX_FOR_TARGET)] {
- #	if { $compiler_type == "c++" } {
- #	    set compiler $env(CXX_FOR_TARGET)
- #	}
      }
  
      if [info exists F77_FOR_TARGET] {
  	if { $compiler_type == "f77" } {
  	    set compiler $F77_FOR_TARGET
  	}
- # When started from a mid-level directory (eg gdb)
- # the Makefile may export a *_FOR_TARGET that isn't
- # applicable.
- #    } elseif [info exists env(F77_FOR_TARGET)] {
- #	if { $compiler_type == "f77" } {
- #	    set compiler $env(F77_FOR_TARGET)
- #	}
      }
  
      if { $compiler == "" } {
--- 387,409 ----
      global CC_FOR_TARGET
      global CXX_FOR_TARGET
      global F77_FOR_TARGET
! 
      if [info exists CC_FOR_TARGET] {
  	if { $compiler == "" } {
  	    set compiler $CC_FOR_TARGET
  	}
      }
  
      if [info exists CXX_FOR_TARGET] {
  	if { $compiler_type == "c++" } {
  	    set compiler $CXX_FOR_TARGET
  	}
      }
  
      if [info exists F77_FOR_TARGET] {
  	if { $compiler_type == "f77" } {
  	    set compiler $F77_FOR_TARGET
  	}
      }
  
      if { $compiler == "" } {
***************
*** 642,655 ****
  }
  
  proc default_target_assemble { source destfile flags } {
!     global env
!     global AS_FOR_TARGET;
!     global ASFLAGS_FOR_TARGET;
  
      if [info exists AS_FOR_TARGET] {
  	set AS "$AS_FOR_TARGET";
-     } elseif [info exists env(AS_FOR_TARGET)] {
- 	set AS $env(AS_FOR_TARGET)
      } else {
  	if ![board_info target exists assembler] {
  	    set AS [find_gas];
--- 611,621 ----
  }
  
  proc default_target_assemble { source destfile flags } {
!     global AS_FOR_TARGET
!     global ASFLAGS_FOR_TARGET
  
      if [info exists AS_FOR_TARGET] {
  	set AS "$AS_FOR_TARGET";
      } else {
  	if ![board_info target exists assembler] {
  	    set AS [find_gas];
***************
*** 660,670 ****
  
      if [info exists ASFLAGS_FOR_TARGET] {
  	append flags " $ASFLAGS_FOR_TARGET";
- # The top level Makefile sets (and exports) a *FLAGS_FOR_TARGET
- # that may not be applicable to testsuite runs.  This conflict
- # needs to be resolved.
- #    } elseif [info exists env(ASFLAGS_FOR_TARGET)] {
- #	append flags " $env(ASFLAGS_FOR_TARGET)"
      }
  
      if [is_remote host] {
--- 626,631 ----
***************
*** 698,706 ****
  }
  
  proc default_link { board objects destfile flags } {
!     global env
!     global LD_FOR_TARGET;
!     global LDFLAGS_FOR_TARGET;
  
      # return -L's in ldflags
      proc only--Ls { ldflags } {
--- 659,666 ----
  }
  
  proc default_link { board objects destfile flags } {
!     global LD_FOR_TARGET
!     global LDFLAGS_FOR_TARGET
  
      # return -L's in ldflags
      proc only--Ls { ldflags } {
***************
*** 729,736 ****
  
      if [info exists LD_FOR_TARGET] {
  	set LD "$LD_FOR_TARGET";
-     } elseif [info exists env(LD_FOR_TARGET)] {
- 	set LD $env(LD_FOR_TARGET)
      } else {
  	if ![board_info target exists linker] {
  	    set LD [find_ld];
--- 689,694 ----
***************
*** 741,751 ****
  
      if [info exists LDFLAGS_FOR_TARGET] {
  	append flags " $LDFLAGS_FOR_TARGET";
- # The top level Makefile sets (and exports) a *FLAGS_FOR_TARGET
- # that may not be applicable to testsuite runs.  This conflict
- # needs to be resolved.
- #    } elseif [info exists env(LDFLAGS_FOR_TARGET)] {
- #	append flags " $env(LDFLAGS_FOR_TARGET)"
      }
  
      # `ldflags' consists of arguments to gcc (that are then
--- 699,704 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]