Patch: avoid errors with missing profile support on solaris2 and irix6

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Sun Oct 27 09:53:00 GMT 2002


Currently we get errors for gcc.dg/20021014-1.c on both irix6 and
solaris2 because these platforms require locating an extra module or
archive for profile support which doesn't exist on those systems.

In the solaris2 case, we need to find mcrt1.o which comes with Sun's
proprietary cc.  We cannot necessarily predict where the user has
installed that package, and the specific file location of mcrt1.o is
sensitive to the cc version number which is used as part of the
directory path where it is installed.  E.g. It might look something
like this /<directory>/SUNWspro/SC<version>/lib/mcrt1.o but I can't be
sure what the <> bracketed components will be so I'd rather not guess.

Irix6 requires libprof1.a but I've seen no evidence that it exists on
any of my irix6 boxes.  I've also noted that other irix6 testsuite
results posted on the website also fail to find it and fail the
testcase.

Again on irix6, -pg fails because no one has yet implemented gcrt1.o
and we get link failures for that too.

I tested this via make -k check on sparc-sun-solaris2.7 and
mips-sgi-irix6.5 and examined gcc.log to verify that the testsuite
attempted to run the particular testcases and caught the error on the
respective platforms.

The 20021014-1.c testcase also exists on the 3.2.x branch so I'd like
to install that hunk there and both hunks on the trunk.

Ok to install?

		Thanks,
		--Kaveh


2002-10-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* gcc.dg/20021014-1.c: Bypass errors on solaris2 and irix6.
	* gcc.dg/nest.c: Bypass errors on irix6.

diff -rup orig/egcc-CVS20021027/gcc/testsuite/gcc.dg/20021014-1.c egcc-CVS20021027/gcc/testsuite/gcc.dg/20021014-1.c
--- orig/egcc-CVS20021027/gcc/testsuite/gcc.dg/20021014-1.c	2002-10-26 07:00:42.000000000 -0400
+++ egcc-CVS20021027/gcc/testsuite/gcc.dg/20021014-1.c	2002-10-27 10:03:27.089019331 -0500
@@ -1,6 +1,14 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -p" } */
 /* { dg-build "profiler" "No profiler support" { xfail mmix-*-* } } */
+/* Support for -p on solaris2 relies on mcrt1.o which comes with the
+   vendor compiler.  We cannot reiably predict the directory where the
+   vendor compiler (and thus mcrt1.o) is installed so we can't
+   necessarily find mcrt1.o even if we have it.  */
+/* { dg-error "mcrt1.o" "Optional vendor profiler support missing" { target *-*-solaris2* } 0 } */
+/* Support for -p on irix relies on libprof1.a which doesn't appear to
+   exist on any irix6 system currently posting testsuite results.  */
+/* { dg-error "libprof1.a" "Profiler support missing" { target mips*-*-irix* } 0 } */
 
 extern void abort (void);
 extern void exit (int);
diff -rup orig/egcc-CVS20021027/gcc/testsuite/gcc.dg/nest.c egcc-CVS20021027/gcc/testsuite/gcc.dg/nest.c
--- orig/egcc-CVS20021027/gcc/testsuite/gcc.dg/nest.c	2002-10-26 07:00:42.000000000 -0400
+++ egcc-CVS20021027/gcc/testsuite/gcc.dg/nest.c	2002-10-27 10:02:47.412915771 -0500
@@ -1,6 +1,9 @@
 /* PR 5967, PR 7114 */
 /* { dg-do run } */
 /* { dg-options "-O2 -pg" } */
+/* Support for -pg on irix relies on gcrt1.o which doesn't exist yet.
+   See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html */
+/* { dg-error "gcrt1.o" "Profiler support missing" { target mips*-*-irix* } 0 } */
 
 long foo (long x)
 {



More information about the Gcc-patches mailing list