This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
target/9603: SCO OpenServer gcc-3.2.2 build fails with i386.c: line 927: error: undefined symbol: DEFAULT_PCC_STRUCT_RETURN
- From: William Bader <william at nscs dot fast dot net>
- To: gcc-bugs at gcc dot gnu dot org, robertl at gcc dot gnu dot org, william at nscs dot fast dot net
- Date: Thu, 6 Feb 2003 16:49:40 EST
- Subject: target/9603: SCO OpenServer gcc-3.2.2 build fails with i386.c: line 927: error: undefined symbol: DEFAULT_PCC_STRUCT_RETURN
This patch fixes
"i386.c: line 927: error: undefined symbol: DEFAULT_PCC_STRUCT_RETURN".
when building gcc-3.2.2 under SCO OpenServer 5.0.5 using SCO's dev sys.
I was not sure whether to set it to 0 or 1, but gcc-3.2.1 has a "1"
in i386.cc where gcc-3.2.2 has "DEFAULT_PCC_STRUCT_RETURN".
William Bader
http://williambader.com
diff -rN -U 8 -X bgcc-3.2.2/gcc/bounds/diffexclude.dat gcc-3.2.2/gcc/config/i386/sco5.h bgcc-3.2.2/gcc/config/i386/sco5.h
--- gcc-3.2.2/gcc/config/i386/sco5.h 2002-04-24 13:18:04.000000000 -0400
+++ bgcc-3.2.2/gcc/config/i386/sco5.h 2003-02-06 13:52:41.000000000 -0500
@@ -723,16 +723,20 @@
%{fPIC:%{!fpic:-D__PIC__ -D__pic__}}} \
%{Xa:-D_SCO_C_DIALECT=1} \
%{!Xa:%{Xc:-D_SCO_C_DIALECT=3} \
%{!Xc:%{Xk:-D_SCO_C_DIALECT=4} \
%{!Xk:%{Xt:-D_SCO_C_DIALECT=2} \
%{!Xt:-D_SCO_C_DIALECT=1}}}} \
%{traditional:-traditional -D_KR -D_NO_PROTOTYPE}"
+/* The svr4 ABI for the i386 says that records and unions are returned in memory. */
+#undef DEFAULT_PCC_STRUCT_RETURN
+#define DEFAULT_PCC_STRUCT_RETURN 1
+
#undef LINK_SPEC
#define LINK_SPEC \
"-b %{!mcoff:elf}%{mcoff:coff \
%{static:%e-static not valid with -mcoff} \
%{shared:%e-shared not valid with -mcoff} \
%{symbolic:%e-symbolic not valid with -mcoff} \
%{fpic:%e-fpic not valid with -mcoff} \
%{fPIC:%e-fPIC not valid with -mcoff}} \