This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

target/9603: SCO 5 build of gcc-3.2.2 fails with i386.c: line 927: error: undefined symbol: DEFAULT_PCC_STRUCT_RETURN


>Number:         9603
>Category:       target
>Synopsis:       SCO 5 build of gcc-3.2.2 fails with i386.c: line 927: error: undefined symbol: DEFAULT_PCC_STRUCT_RETURN
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 06 21:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     william@nscs.fast.net
>Release:        gcc-3.2.2
>Organization:
>Environment:
SCO OpenServer 5.0.5 with SCO's development system
>Description:
I got
  "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.
The patch included in the "Fix" section fixes the problem
through a #define of DEFAULT_PCC_STRUCT_RETURN in sco5.h.
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
>How-To-Repeat:

>Fix:
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}} \
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]