This is the mail archive of the gdb-patches@sources.redhat.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]
Other format: [Raw text]

[patch] update gdb.base/so-impl-ld.exp to use new shared library infrastructure


2005-04-14  Paul Gilliam  <pgilliam@us.ibm.com>

	* gdb.base/so-impl-ld.exp: Use new shared library infrastructure and update copyright.

Index: gdb.base/so-impl-ld.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/so-impl-ld.exp,v
retrieving revision 1.6
diff -c -3 -p -r1.6 so-impl-ld.exp
*** gdb.base/so-impl-ld.exp	5 Dec 2003 01:53:46 -0000	1.6
--- gdb.base/so-impl-ld.exp	12 Apr 2005 22:51:31 -0000
***************
*** 1,4 ****
! # Copyright 1997, 1998, 1999, 2000, 2001, 2003 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
--- 1,5 ----
! # Copyright 1997, 1998, 1999, 2000, 2001, 2003, 2005
! # 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
***************
*** 12,21 ****
  # 
  # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
! 
! # Please email any bugs, comments, and/or additions to this file to:
! # bug-gdb@prep.ai.mit.edu
  
  if $tracelevel then {
  	strace $tracelevel
--- 13,19 ----
  # 
  # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  
  if $tracelevel then {
  	strace $tracelevel
*************** if ![isnative] then {
*** 29,98 ****
      return
  }
  
- # This test is presently only valid on HP-UX, since it requires
- # that we use HP-UX-specific compiler & linker options to build
- # the testcase.
- # Actually this test works on solaris, and linux too.
-  
- if {! ([istarget "hppa*-*-*hpux*"]
-        || [istarget "sparc-sun-solaris*"]
-        || [istarget "*-*-linux-gnu*"]) } {
- 	 return
- }
- 
- set libfile "solib"
  set testfile "so-impl-ld"
! set srcfile ${testfile}.c
! set binfile ${objdir}/${subdir}/${testfile}
! 
! if [get_compiler_info ${binfile}] {
!     return -1
! }
! 
! # Build the shared libraries this test case needs.
! #
! #cd ${subdir}
! #remote_exec build "$CC -g +z -c ${libfile}1.c -o ${libfile}1.o"
! 
  
! if { [test_compiler_info gcc-*-*] } then {
!     set additional_flags "additional_flags=-fpic"
! } else {
!     if [istarget "hppa*-hp-hpux*"] then {
! 	set additional_flags "additional_flags=+z"
!     } else {
! 	# don't know that the compiler is, hope for the best...
! 	set additional_flags ""
!     }
! }
  
! if {[gdb_compile "${srcdir}/${subdir}/${libfile}1.c" "${libfile}1.o" object [list debug $additional_flags]] != ""} {
!     perror "Couldn't compile ${libfile}1.c"
      return -1
  }
  
! if [istarget "hppa*-hp-hpux*"] then {
!     remote_exec build "ld -b ${libfile}1.o -o ${objdir}/${subdir}/${libfile}1.sl"
! } else {
!     set additional_flags "additional_flags=-shared"
!     gdb_compile "${libfile}1.o" "${objdir}/${subdir}/${libfile}1.sl" executable [list debug $additional_flags]
! }
! 
! # Build the test case
! #remote_exec build "$CC -Aa -g ${srcfile} ${libfile}1.sl -o ${binfile}"
! 
! 
! if {$hp_cc_compiler} {
!     set additional_flags "additional_flags=-Ae"
! } else {
!     set additional_flags ""
! }
! 
! if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${objdir}/${subdir}/${libfile}1.sl" "${binfile}" executable [list debug $additional_flags]] != ""} {
!     perror "Couldn't build ${binfile}"
!     return -1
  }
- #cd ..
  
  # Start with a fresh gdb
  
--- 27,50 ----
      return
  }
  
  set testfile "so-impl-ld"
! set libfile "solib1"
! set srcfile $srcdir/$subdir/$testfile.c
! set libsrc  $srcdir/$subdir/$libfile.c
! set binfile $objdir/$subdir/$testfile
! set lib_sl  $objdir/$subdir/$libfile.sl
  
! set lib_opts  debug
! set exec_opts [list debug shlib=$lib_sl]
  
! if [get_compiler_info ${binfile}] {
      return -1
  }
  
! if {[gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
! ||  [gdb_compile $srcfile $binfile executable $exec_opts] != ""} {
!     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
  }
  
  # Start with a fresh gdb
  


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