home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / gcc / bug / 2711 < prev    next >
Encoding:
Text File  |  1992-11-11  |  4.4 KB  |  125 lines

  1. Newsgroups: gnu.gcc.bug
  2. Path: sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!claude.cs.umb.edu!karl
  3. From: karl@claude.cs.umb.edu (Karl Berry)
  4. Subject: gcc 2.3.1 on ISC 2.2.1 with gas
  5. Message-ID: <199211111555.AA01972@claude.cs.umb.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Reply-To: karl@cs.umb.edu
  8. Organization: GNUs Not Usenet
  9. Distribution: gnu
  10. Date: Wed, 11 Nov 1992 05:55:39 GMT
  11. Approved: bug-gcc@prep.ai.mit.edu
  12. Lines: 111
  13.  
  14. GCC 2.3.1 doesn't quite compile as-is on my 486 running Interactive Unix
  15. 2.2.1, configured as --with-gnu-as i386-isc.  The first problem was that
  16. temporary labels were defined with a `.' prefix, but not declared with
  17. the `.' in the .long directive.  For example, the assembler output of
  18. cexp.c looked like:
  19.  
  20.     .long L336
  21.    ... many lines omitted ...
  22. .L336:
  23.  
  24. (Notice no `.' in the .long statement.)
  25.  
  26. To fix this, I made the definition of LPREFIX in bsd386.h conditional on
  27. NO_UNDERSCORES (which also determines whether the `.' is prepended).
  28. (See patch below.)  I believe this will only affect those few systems
  29. using bsd386.h and defining NO_UNDERSCORES -- perhaps only ISC.
  30.  
  31. The second problem was that DBX debugging information wasn't output.  I
  32. changed i386iscgas.h to #undef SDB_DEBUGGING_INFO and #define
  33. DBX_DEBUGGING_INFO.
  34.  
  35. And the third and so far final problem was that the definitions in
  36. dbxout.c for writing the main output source directory and filename omit
  37. the first character of the label (which in this case is a `.'):
  38.  
  39.           fprintf (asmfile, "%s \"%s/\",%d,0,0,%s\n", ASM_STABS_OP,
  40.            cwd, N_SO, <ext_label_name[1]);
  41.   ...
  42.  
  43.   fprintf (asmfile, "%s \"%s\",%d,0,0,%s\n", ASM_STABS_OP, input_file_name,
  44.        N_SO, <ext_label_name[1]);
  45.  
  46. I don't understand why this is a good thing, but doubtless that is
  47. simply ignorance on my part.  So I changed i386iscgas.h to essentially
  48. repeat dbxout.c's code except not omit the `.'.
  49.  
  50. Here are the diffs and ChangeLog entries.
  51.  
  52.  
  53. Tue Nov 10 08:38:14 1992  Karl Berry  (karl@cs.umb.edu)
  54.  
  55.     * i386iscgas.h (SDB_DEBUGGING_INFO): #undef.
  56.         (DBX_DEBUGGING_INFO): #define.
  57.         (DBX_OUTPUT_MAIN_SOURCE_{DIRECTORY,FILENAME}): Override dbxout.c.
  58.  
  59.     * bsd386.h (LPREFIX) [NO_UNDERSCORES]: Define as `.L'.
  60.  
  61. *** ./ORIG/bsd386.h    Thu Oct  1 00:52:06 1992
  62. --- ./bsd386.h    Thu Nov  5 12:24:43 1992
  63. ***************
  64. *** 28,35 ****
  65.   
  66.   /* Define the syntax of pseudo-ops, labels and comments.  */
  67.   
  68. ! /* Prefix for internally generated assembler labels.  */
  69.   #define LPREFIX "L"
  70.   
  71.   /* Assembler pseudos to introduce constants of various size.  */
  72.   
  73. --- 28,41 ----
  74.   
  75.   /* Define the syntax of pseudo-ops, labels and comments.  */
  76.   
  77. ! /* Prefix for internally generated assembler labels.  If we aren't using
  78. !    underscores, we are using prefix `.'s to identify labels that should
  79. !    be ignored, as in `i386gas.h' --karl@cs.umb.edu  */
  80. ! #ifdef NO_UNDERSCORES
  81. ! #define LPREFIX ".L"
  82. ! #else
  83.   #define LPREFIX "L"
  84. + #endif /* not NO_UNDERSCORES */
  85.   
  86.   /* Assembler pseudos to introduce constants of various size.  */
  87.   
  88. *** ./ORIG/i386iscgas.h    Mon Jul 27 22:32:25 1992
  89. --- ./i386iscgas.h    Tue Nov 10 08:34:53 1992
  90. ***************
  91. *** 14,19 ****
  92. --- 14,44 ----
  93.   /* But with ISC-specific additions.  */
  94.   #include "isc.h"
  95.   
  96. + /* We do not want to output SDB debugging information.  */
  97. + #undef SDB_DEBUGGING_INFO
  98. + /* We want to output DBX debugging information.  */
  99. + #define DBX_DEBUGGING_INFO
  100. + /* The function `dbxout_init' in dbxout.c omits the first character of
  101. +    `ltext_label_name' when outputting the main source directory and main
  102. +    source filename.  I don't understand why, but rather than making a
  103. +    system-independent change there, I override dbxout.c's defaults.
  104. +    Perhaps it would be better to use ".Ltext0" instead of
  105. +    `ltext_label_name', but we've already generated the label, so we just
  106. +    use it here.  --karl@cs.umb.edu  */
  107. + #define DBX_OUTPUT_MAIN_SOURCE_DIRECTORY(asmfile, cwd)            \
  108. +   fprintf (asmfile, "%s \"%s/\",%d,0,0,%s\n", ASM_STABS_OP,        \
  109. +                cwd, N_SO, ltext_label_name)
  110. + #define DBX_OUTPUT_MAIN_SOURCE_FILENAME(asmfile, input_file_name)    \
  111. +   fprintf (asmfile, "%s \"%s\",%d,0,0,%s\n", ASM_STABS_OP, input_file_name,\
  112. +        N_SO, ltext_label_name);                    \
  113. +   text_section ();                            \
  114. +   ASM_OUTPUT_INTERNAL_LABEL (asmfile, "Ltext", 0)
  115.   
  116.   /* Because we don't include `svr3.h', we haven't yet defined SIZE_TYPE
  117.      and PTRDIFF_TYPE.  ISC's definitions don't match GCC's defaults, so: */
  118.  
  119.