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]

Re: [patch] Allow compilatiion by IBM'x xlc compiler - shreloc.exp


Opps!   Here's the patch:

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

	* gdb.base/shreloc.exp: Allow for compilation by IBM's xlc compiler.

Index: gdb.base/shreloc.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/shreloc.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 shreloc.exp
*** gdb.base/shreloc.exp	11 Nov 2003 17:58:28 -0000	1.2
--- gdb.base/shreloc.exp	1 Apr 2005 22:06:59 -0000
*************** set bug_id 0
*** 41,55 ****
  
  set workdir ${objdir}/${subdir}
  
  foreach module [list "shreloc" "shreloc1" "shreloc2"] {
!     if {[gdb_compile "${srcdir}/${subdir}/${module}.c" "${workdir}/${module}.o" object {debug}] != ""} {
  	untested "Couldn't compile ${module}.c"
  	return -1
      }
  }
  
- set additional_flags "additional_flags=-shared"
- 
  if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"]) } {
      set additional_flags "${additional_flags} -Wl,--image-base,0x04000000"
  }
--- 41,66 ----
  
  set workdir ${objdir}/${subdir}
  
+ if [get_compiler_info ${workdir}/shreloc] {
+     return -1
+ }
+ 
+ if { [test_compiler_info "xlc-*"] } {
+     set additional_flags "additional_flags=-qstatsym -qdbxextra -qmkshrobj"
+     set libfileso1 "-Wl,${workdir}/shreloc1.dll"
+     set libfileso2 "-Wl,${workdir}/shreloc2.dll"
+ } else {
+     set additional_flags "additional_flags=-shared"
+     set libfileso1 "${workdir}/shreloc1.dll"
+     set libfileso2 "${workdir}/shreloc2.dll"
+ }
  foreach module [list "shreloc" "shreloc1" "shreloc2"] {
!     if {[gdb_compile "${srcdir}/${subdir}/${module}.c" "${workdir}/${module}.o" object [list debug $additional_flags]] != ""} {
  	untested "Couldn't compile ${module}.c"
  	return -1
      }
  }
  
  if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"]) } {
      set additional_flags "${additional_flags} -Wl,--image-base,0x04000000"
  }
*************** foreach module [list "shreloc1" "shreloc
*** 61,67 ****
      }
  }
  
! if {[gdb_compile [list "${workdir}/shreloc.o" "${workdir}/shreloc1.dll" "${workdir}/shreloc2.dll"] "${workdir}/shreloc" executable debug] != ""} {
      untested "Couldn't link shreloc executable"
      return -1
  }
--- 72,78 ----
      }
  }
  
! if {[gdb_compile [list "${workdir}/shreloc.o" ${libfileso1} ${libfileso2} ] "${workdir}/shreloc" executable debug] != ""} {
      untested "Couldn't link shreloc executable"
      return -1
  }


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