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