home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / gnu / gcc / help / 2757 < prev    next >
Encoding:
Text File  |  1992-12-16  |  6.0 KB  |  176 lines

  1. Newsgroups: gnu.gcc.help
  2. Path: sparky!uunet!cis.ohio-state.edu!candidus.ma30.bull.com!drg
  3. From: drg@candidus.ma30.bull.com (Daniel R. Guilderson)
  4. Subject: Re: Problems building GCC on SCO systems
  5. Message-ID: <9212161504.AA02932@candidus.ma30.bull.com>
  6. Sender: daemon@cis.ohio-state.edu
  7. Organization: GNUs Not Usenet
  8. References: drg@candidus.ma30.bull.com (Daniel R. Guilderson)
  9. Distribution: gnu
  10. Date: Wed, 16 Dec 1992 05:04:16 GMT
  11. Lines: 163
  12.  
  13.    From: smiley@akasha.eng.hou.compaq.com (Colin Smiley)
  14.    Organization: Compaq Computer Corporation
  15.    Date: Thu, 10 Dec 1992 21:23:49 GMT
  16.  
  17.    In article <9212071040.AA10051@noa.csrl.aoyama.ac.jp> rms@noa.csrl.aoyama.ac.jp (Richard Stallman) writes:
  18.  
  19.       There are problems building GCC on recent SCO systems.  Several people
  20.       have found an apparent solution of defining STDC_VALUE as 0.  This
  21.       appears to work, but it is actually incorrect because it causes GCC to
  22.       define __STDC__ as 0 *all the time*.
  23.  
  24.       This is incorrect because GCC is supposed to handle __STDC__ the same
  25.       way on all machines: namely, it should be 1.
  26.  
  27.    I then tried defining "X_CFLAGS = -DSTDC_VALUE=0".  This worked just
  28.    fine and GCC compiled with a good result from "make compare".
  29.  
  30. I think RMS' explanation is pretty clear.  Defining STDC_VALUE to be 0
  31. is not a good idea.  I think future versions of GCC will compile on
  32. SCO 3.2v4 without any problems (at least I know the problems are being
  33. worked on---actually I believe they are solved now).
  34.  
  35. Try this instead:
  36.  
  37. Date: Fri, 11 Dec 92 01:26:56 PST
  38. From: ian (Ian Lance Taylor)
  39. Subject: gcc ss-921205 on SCO 3.2v4 patch 1 of 2
  40.  
  41. Here is the first patch needed for gcc ss-921205 on SCO 3.2v4.
  42.  
  43. I had trouble building the compiler with rcc.  The cc compiler is much
  44. better in 3.2v4, so I decided to use that.  The SCO compiler treats
  45. enum bitfields as signed, so I had to define ONLY_INT_FIELDS as is
  46. done for a few other hosts.  Then there was a bug in accessing the
  47. code field in rtx_def, which I was able to correct by making it an
  48. explicit bit field.  This may make access to this field slightly less
  49. efficient for some compilers when ONLY_INT_FIELDS is defined, but I
  50. don't think that is important, particularly since gcc need never
  51. define it.
  52.  
  53. Note that the patch I sent out previously for rtl.h is wrong; I was
  54. misled by the cc bug.
  55.  
  56. Fri Dec 11 00:13:52 1992  Ian Lance Taylor  (ian@cygnus.com)
  57.  
  58.     * x-i386s4: Don't use rcc.
  59.     * xm-i386sco.h (ONLY_INT_FIELDS): Define.
  60.     * rtl.h (rtx_def): Give bit field size for code field.
  61.  
  62. *** /sphagnum/usr/wilson/fsf/clean-ss-921205/config/x-i386s4    Sun Nov  1 06:55:03 1992
  63. --- x-i386s4    Fri Dec 11 00:41:42 1992
  64. ***************
  65. *** 1,9 ****
  66.   RANLIB = :
  67.   RANLIB_TEST = false
  68. - CC = rcc $(RCCFLAGS)
  69. - OLDCC = rcc $(RCCFLAGS)
  70. - RCCFLAGS = -Dunix -Di386 -DM_UNIX -DM_I386 -DNULL=0
  71. - CCLIBFLAGS =
  72.   CLIB = -lPW
  73.   
  74.   # Seems to be needed with SCO DEV3.2v4.
  75. --- 1,5 ----
  76.  
  77. *** /sphagnum/usr/wilson/fsf/clean-ss-921205/config/xm-i386sco.h    Fri May 15 03:58:06 1992
  78. --- xm-i386sco.h    Fri Dec 11 00:41:49 1992
  79. ***************
  80. *** 9,11 ****
  81. --- 9,18 ----
  82.   /* Big buffers improve performance.  */
  83.   
  84.   #define IO_BUFFER_SIZE (0x8000 - 1024)
  85. + #ifndef __GNUC__
  86. + /* The SCO compiler gets it wrong, and treats enumerated bitfields
  87. +    as signed quantities, making it impossible to use an 8-bit enum
  88. +    for compiling GNU C++.  */
  89. + #define ONLY_INT_FIELDS 1
  90. + #endif
  91.  
  92. *** /sphagnum/usr/wilson/fsf/clean-ss-921205/rtl.h    Mon Oct 26 03:05:24 1992
  93. --- rtl.h    Fri Dec 11 00:42:05 1992
  94. ***************
  95. *** 68,74 ****
  96.   typedef struct rtx_def
  97.   {
  98.   #ifdef ONLY_INT_FIELDS
  99. !   unsigned short code;
  100.   #else
  101.     /* The kind of expression this is.  */
  102.     enum rtx_code code : 16;
  103. --- 68,74 ----
  104.   typedef struct rtx_def
  105.   {
  106.   #ifdef ONLY_INT_FIELDS
  107. !   unsigned int code : 16;
  108.   #else
  109.     /* The kind of expression this is.  */
  110.     enum rtx_code code : 16;
  111.  
  112. Date: Fri, 11 Dec 92 01:27:41 PST
  113. From: ian (Ian Lance Taylor)
  114. Subject: gcc ss-921205 on SCO 3.2v4 patch 2 of 2
  115.  
  116. Here is the second patch needed for gcc ss-921205 on SCO 3.2v4.
  117.  
  118. On SCO 3.2v4 we need to run the fixinc.svr4 script to fix the header
  119. files.  The fixinc.svr4 script needs a few changes in order to do the
  120. right thing.  SCO uses !__STDC__ in their header files, which must be
  121. changed to !__STRICT_ANSI__.  The patch to getcwd doesn't match the
  122. one in stdlib.h, and must be modified slightly.  I ran the modified
  123. fixinc.svr4 on a Solaris 2 system and had no problems.
  124.  
  125. Fri Dec 11 00:13:52 1992  Ian Lance Taylor  (ian@cygnus.com)
  126.  
  127.     * configure (i[34]86-*-sco3.2v4*): Use fixinc.svr4.
  128.     * fixinc.svr4: Turn !__STDC__ into !__STRICT_ANSI__.  Don't
  129.     require space after getcwd argument in stdlib.h.
  130.  
  131. *** /sphagnum/usr/wilson/fsf/clean-ss-921205/configure    Fri Dec  4 17:02:55 1992
  132. --- configure    Fri Dec 11 01:10:33 1992
  133. ***************
  134. *** 335,340 ****
  135. --- 335,341 ----
  136.           tm_file=i386sco4.h
  137.           xmake_file=x-i386s4
  138.           tmake_file=t-i386sco
  139. +         fixincludes=fixinc.svr4
  140.           broken_install=yes
  141.           ;;
  142.       i[34]86-*-sco*)             # 80386 running SCO system
  143.  
  144. *** /sphagnum/usr/wilson/fsf/clean-ss-921205/fixinc.svr4    Fri Nov 27 03:20:54 1992
  145. --- fixinc.svr4    Fri Dec 11 00:42:00 1992
  146. ***************
  147. *** 181,186 ****
  148. --- 181,187 ----
  149.         s/__STDC__ == 0/!defined (__STRICT_ANSI__)/g
  150.         s/__STDC__ != 0/defined (__STRICT_ANSI__)/g
  151.         s/__STDC__ - 0 == 0/!defined (__STRICT_ANSI__)/g
  152. +       s/!__STDC__/!defined (__STRICT_ANSI__)/g
  153.       ' $2/$file > $2/$file.sed
  154.       mv $2/$file.sed $2/$file
  155.       if cmp $file $2/$file >/dev/null 2>&1; then
  156. *************** else
  157. *** 207,213 ****
  158.   fi
  159.   if [ \! -z "$file_to_fix" ]; then
  160.     echo Checking $file_to_fix
  161. !   sed -e 's/getcwd(char \*, int)/getcwd(char *, size_t)/' $file_to_fix > /tmp/$base
  162.     if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \
  163.       echo No change needed in $file_to_fix
  164.     else
  165. --- 208,214 ----
  166.   fi
  167.   if [ \! -z "$file_to_fix" ]; then
  168.     echo Checking $file_to_fix
  169. !   sed -e 's/getcwd(char \{0,\}\*, int)/getcwd(char *, size_t)/' $file_to_fix > /tmp/$base
  170.     if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \
  171.       echo No change needed in $file_to_fix
  172.     else
  173.  
  174.  
  175.