Switch the license of all .exp files to GPLv3.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.hp / gdb.defects / solib-d.exp
index 81d8bdaf3fae48ce0391f9f10d08984f78b90b27..db647729475802126a8a614d7ef83ca352d95e76 100644 (file)
@@ -1,18 +1,17 @@
-#   Copyright (C) 1997 Free Software Foundation, Inc.
+#   Copyright (C) 1997, 2007 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
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # 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.  */
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 # This file was written by srikanth (with huge chunks borrowed from old ones) 
 #
@@ -75,16 +74,32 @@ set testfile2 ${objdir}/${subdir}/${testfile}2.o
 set libfile1 ${objdir}/${subdir}/${testfile}1.sl
 set libfile2 ${objdir}/${subdir}/${testfile}2.sl
 
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info ${binfile}] {
+    return -1;
+}
+
+# set up appropriate compile option to recognize long double
+if {$hp_aCC_compiler || $hp_cc_compiler} {
+    set picflag "+z"
+    set ansiflag "-Ae"
+} else {
+    set picflag "-fpic"
+    set ansiflag ""
+}
+
+
 # Build the shared libraries this test case needs.
 #
 #cd ${subdir}
 
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile1}" object {debug additional_flags=+z}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile1}" object "{debug additional_flags=${picflag}}"] != "" } {
     perror "Couldn't compile ${testfile}1.c"
     return -1
 }
 
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile2}" object {debug additional_flags=+z}] != ""} {
+if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile2}" object "{debug additional_flags=${picflag}}"] != ""} {
     perror "Couldn't compile ${testfile}2.c"
     return -1
 }
@@ -94,7 +109,7 @@ remote_exec build "ld -b ${testfile2} -o ${libfile2}"
 
 # Build the test case
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${libfile1} ${libfile2}" "${binfile}" executable {debug additional_flags=-Ae -Wl,-aarchive}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${libfile1} ${libfile2}" "${binfile}" executable "{debug additional_flags=${ansiflag} -Wl,-aarchive}"] != "" } {
     perror "Couldn't build ${binfile}"
     return -1
 }
This page took 0.02467 seconds and 4 git commands to generate.