This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] PA HP-UX testsuite fixes
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 6 Mar 2005 13:40:54 -0500 (EST)
- Subject: [committed] PA HP-UX testsuite fixes
The following change fixes various testsuite problems under hpux. Weak
support wasn't being detected on the 32-bit SOM ports under hpux 11.
Sadly, one of the previously UNRESOLVED tests is now a FAIL. It appears
to be a linker bug.
The other fixes are for the lack of TImode and stabs on hppa64.
Tested on hppa2.0w-hp-hpux11.11 (4.1.0), hppa64-hp-hpux11.11 (4.1.0)
and hppa1.1-hp-hp-hpux10.20 (4.0.0).
Committed to 4.0 and 4.1.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2005-03-06 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* lib/file-format.exp (gcc_target_object_format): Add check for som
format and hardcode object formats on hppa*-*-hpux*.
* lib/target-supports.exp (check_weak_available): Add check for som
object format. Always return 0 on hppa*-*-hpux10*.
* gcc.dg/titype-1.c, gcc.dg/uninit-C.c: Don't use TImode if __hppa__
is defined.
* objc.dg/stabs-1.m: hppa*64*-*-* doesn't have stabs.
Index: lib/file-format.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/file-format.exp,v
retrieving revision 1.7
diff -u -3 -p -r1.7 file-format.exp
--- lib/file-format.exp 28 Oct 2004 00:16:57 -0000 1.7
+++ lib/file-format.exp 6 Mar 2005 14:22:02 -0000
@@ -32,6 +32,13 @@ proc gcc_target_object_format { } {
} elseif { [string match "*-*-darwin*" $target_triplet] } {
# Darwin doesn't necessarily have objdump, so hand-code it.
set gcc_target_object_format_saved mach-o
+ } elseif { [string match "hppa*-*-hpux*" $target_triplet] } {
+ # HP-UX doesn't necessarily have objdump, so hand-code it.
+ if { [string match "hppa*64*-*-hpux*" $target_triplet] } {
+ set gcc_target_object_format_saved elf
+ } else {
+ set gcc_target_object_format_saved som
+ }
} else {
set objdump_name [find_binutils_prog objdump]
set open_file [open objfmtst.c w]
@@ -66,6 +73,9 @@ proc gcc_target_object_format { } {
pe {
set gcc_target_object_format_saved pe
}
+ som {
+ set gcc_target_object_format_saved som
+ }
default {
verbose "Unknown file format: $objformat" 3
set gcc_target_object_format_saved unknown
Index: lib/target-supports.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/target-supports.exp,v
retrieving revision 1.41
diff -u -3 -p -r1.41 target-supports.exp
--- lib/target-supports.exp 5 Mar 2005 10:08:31 -0000 1.41
+++ lib/target-supports.exp 6 Mar 2005 14:22:02 -0000
@@ -87,6 +87,12 @@ proc check_weak_available { } {
return 1
}
+ # HP-UX 10.X doesn't support it
+
+ if { [regexp "hppa.*hpux10" $target_triplet] } {
+ return 0
+ }
+
# ELF and ECOFF support it. a.out does with gas/gld but may also with
# other linkers, so we should try it
@@ -97,6 +103,7 @@ proc check_weak_available { } {
ecoff { return 1 }
a.out { return 1 }
mach-o { return 1 }
+ som { return 1 }
unknown { return -1 }
default { return 0 }
}
Index: gcc.dg/titype-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/titype-1.c,v
retrieving revision 1.3
diff -u -3 -p -r1.3 titype-1.c
--- gcc.dg/titype-1.c 23 Sep 2004 00:07:15 -0000 1.3
+++ gcc.dg/titype-1.c 5 Mar 2005 19:27:30 -0000
@@ -1,7 +1,7 @@
/* { dg-do run } */
/* Not all platforms support TImode integers. */
-#if defined(__LP64__)
+#if defined(__LP64__) && !defined(__hppa__)
typedef int TItype __attribute__ ((mode (TI)));
#else
typedef long TItype;
Index: gcc.dg/uninit-C.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/uninit-C.c,v
retrieving revision 1.4
diff -u -3 -p -r1.4 uninit-C.c
--- gcc.dg/uninit-C.c 2 Nov 2004 16:43:15 -0000 1.4
+++ gcc.dg/uninit-C.c 5 Mar 2005 19:27:30 -0000
@@ -3,7 +3,7 @@
/* { dg-options "-O -Wuninitialized" } */
/* Not all platforms support TImode integers. */
-#if defined(__LP64__)
+#if defined(__LP64__) && !defined(__hppa__)
typedef int TItype __attribute__ ((mode (TI)));
#else
typedef long TItype;
Index: objc.dg/stabs-1.m
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/objc.dg/stabs-1.m,v
retrieving revision 1.6
diff -u -3 -p -r1.6 stabs-1.m
--- objc.dg/stabs-1.m 30 Dec 2004 05:22:35 -0000 1.6
+++ objc.dg/stabs-1.m 5 Mar 2005 19:27:31 -0000
@@ -2,7 +2,7 @@
/* Contributed by Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile } */
-/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* ia64-*-* } { "*" } { "" } } */
+/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* } { "*" } { "" } } */
/* { dg-options "-gstabs" } */
@interface MyClass