This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: target/9603: SCO 5 build of gcc-3.2.2 fails with i386.c: line 927: error: undefined symbol: DEFAULT_PCC_STRUCT_RETURN
- From: "John Hughes" <john at Calva dot COM>
- To: <gcc-gnats at gcc dot gnu dot org>, <gcc-bugs at gcc dot gnu dot org>, <nobody at gcc dot gnu dot org>, <william at nscs dot fast dot net>, <gcc-prs at gcc dot gnu dot org>
- Cc: <michaud dot bernard at ic dot gc dot ca>
- Date: Wed, 26 Feb 2003 15:32:50 +0100
- Subject: Re: target/9603: SCO 5 build of gcc-3.2.2 fails with i386.c: line 927: error: undefined symbol: DEFAULT_PCC_STRUCT_RETURN
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=g
cc&pr=9603
and
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=g
cc&pr=9583
This bug is also present on UnixWare 7.1.1 (aka svr5) and
I'd guess all other versions of svr4.
It's still present in the 2003/02/24 snapshot of 3.3.
For svr4 systems the fix is:
--- gcc-20030224/gcc/config/i386/sysv4.h.orig Sun Jun 16 23:13:11 2002
+++ gcc-20030224/gcc/config/i386/sysv4.h Wed Feb 26 14:35:08 2003
@@ -23,6 +23,14 @@
#define TARGET_VERSION fprintf (stderr, " (i386 System V Release 4)");
+#if 0
+
+/* i386.h says:
+
+ Do not use this macro to indicate that structures and unions
+ should always be returned in memory. You should instead use
+ `DEFAULT_PCC_STRUCT_RETURN' to indicate this. */
+
/* The svr4 ABI for the i386 says that records and unions are returned
in memory. */
@@ -30,6 +38,12 @@
#define RETURN_IN_MEMORY(TYPE) \
(TYPE_MODE (TYPE) == BLKmode \
|| (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) ==
8))
+
+#else
+
+#define DEFAULT_PCC_STRUCT_RETURN 1
+
+#endif
/* Output at beginning of assembler file. */
/* The .file command should always begin the output. */