This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
port 20020312-2.c to Darwin
- From: Geoffrey Keating <gkeating at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 Sep 2002 16:01:26 -0700 (PDT)
- Subject: port 20020312-2.c to Darwin
This hadn't been fully ported to Darwin.
Tested by running c-torture on powerpc-darwin6.0.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-darwin20020312-2port.patch============
2002-09-19 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/20020312-2.c: Update for darwin.
Index: gcc.dg/20020312-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20020312-2.c,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 20020312-2.c
--- gcc.dg/20020312-2.c 16 Sep 2002 16:25:22 -0000 1.10
+++ gcc.dg/20020312-2.c 19 Sep 2002 22:59:14 -0000
@@ -72,8 +72,8 @@
/* No pic register. */
#elif defined(__pj__)
/* No pic register. */
-#elif defined(__powerpc__) || defined(__PPC__)
-# ifdef __darwin__
+#elif defined(__powerpc__) || defined(__PPC__) || defined(__POWERPC__)
+# ifdef __MACH__
# define PIC_REG "31"
# else
# define PIC_REG "30"
@@ -144,8 +144,9 @@ main()
/* Additionally test that the prologue/epilogue properly does *not*
save and restore global registers. Not possible when the PIC
- register is in a register window, of course. */
-#ifndef __sparc__
+ register is in a register window, of course. On Darwin, you can't
+ call library routines from non-PIC code. */
+#if !defined (__sparc__) && !(defined(__MACH__) && defined(__POWERPC__))
if (reg)
abort ();
#endif
============================================================