home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / gnu / gcc / bug / 3087 < prev    next >
Encoding:
Text File  |  1992-12-31  |  2.9 KB  |  61 lines

  1. Newsgroups: gnu.gcc.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.huji.ac.il!mybg
  3. From: mybg@cs.huji.ac.il (Michael Ben-Gershon)
  4. Subject: Bug Report
  5. Message-ID: <9212300819.AA22584@huey.cs.huji.ac.il>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: Gnus Not Usenet
  8. Distribution: gnu
  9. Date: Wed, 30 Dec 1992 12:19:28 GMT
  10. Approved: bug-gcc@prep.ai.mit.edu
  11. Lines: 48
  12.  
  13. Date:       30 Dec 1992
  14. Version:    2.3.3
  15. Machine/OS: Acorn RISCiX
  16.  
  17. I am presently working actively on fixing gcc for RISCiX (UNIX for the ARM
  18. processor).  Although included in the gcc distribution it is not yet
  19. complete, but is almost there :-) .  I need to allow for 3 mutually exclusive
  20. flags to be set, setting which 'compilation environment' the compiled program
  21. has been designed to work with: BSD, XOPEN or strict ANSI conformance.  This
  22. facility is allowed for in RISCiX, and is provided by the 'standard' RISCiX
  23. compiler.
  24.  
  25. I have implemented these flags as -menv-BSD, -menv-XOPEN and -menv-strict.
  26. These can be tested by the specs in gcc.c, to ensure that only one is given.
  27. After 'as' has compiled an object, it is then post-processed to insert
  28. debugging info into the object (the RISCiX assembler does not support stabs
  29. directives) like the MIPS version.  Following this, a system-provided
  30. utility, symrename, is called to rename any symbols according to whether
  31. BSD, XOPEN or strict was set, as described above.
  32.  
  33. What I hoped to do was to implement the test for only one -menv option via
  34. CPP_SPEC.  This is inserted into the specs by gcc at the point marked by %C.
  35. However, when an error is generated (by %e) in specs included by %C, the
  36. compilation continues.  This is not the case when the error is generated
  37. in the specs themselves.  This is annoying, because I had hoped to avoid
  38. having to rewrite the specs and put the RISCiX version in a big #ifdef
  39. just because of a few extra bits! As it is, 90% of the specs are identical,
  40. but are duplicated to avoid this problem.
  41.  
  42. An additional problem is that there is no spec which returns the file name
  43. of the source sent to the assembler.  If an assembler  post-processor is used,
  44. then the spec will not work both for normal compiles and compiles of .s files.
  45. For normal compiles, the spec is %g.o.  However, if a .s file is 'compiled',
  46. then %g.o invents a new temporary filename, rather than giving the equivalent
  47. of %i (the source filename).
  48.  
  49. Finally, because the assembler post-processor needs to read the assembler
  50. source file it cannot be piped into the assembler, but must be saved to a
  51. temporary file first.  However, that does not mean that I want to stop pipes
  52. being used to transfer stuff from cpp to cc1 etc.  There does not seem to be
  53. a way of doing this without removing the '|' from the line before the call to
  54. 'as'.  However, this would mean having a special version of the specs for
  55. RISCiX, which (although I have done it that way for the moment) is not really
  56. desirable.
  57.  
  58. Michael Ben-Gershon
  59. mybg@cs.huji.ac.il
  60.  
  61.