home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / gcc / help / 2015 < prev    next >
Encoding:
Text File  |  1992-08-31  |  1.7 KB  |  43 lines

  1. Newsgroups: gnu.gcc.help
  2. Path: sparky!uunet!cis.ohio-state.edu!osf.ORG!meissner
  3. From: meissner@osf.ORG
  4. Subject: defining endianness on mips processor
  5. Message-ID: <9208311432.AA06567@tiktok.osf.org>
  6. Sender: daemon@cis.ohio-state.edu
  7. Organization: GNUs Not Usenet
  8. References: meissner@osf.ORG
  9. Distribution: gnu
  10. Date: Mon, 31 Aug 1992 06:32:24 GMT
  11. Lines: 30
  12.  
  13. | On the c compiler provided with the RISC os for their mips
  14. | processor, there is an option to toggle between big and
  15. | little endian.  cc (-EL/EB)  On our workstations we compile
  16. | in big endian, and for our engineering platform we compile
  17. | in little endian.
  18. | gcc does not apear to have such an option of its command line.
  19. | There are #defines that you can use,  it seems, to say which 
  20. | type of endianness you want, when you build gcc.
  21. | I realy don't want to have two gcc executables (one for big and
  22. | one for little endian.)  I'd like a command line argument
  23. | to be able to switch between the two.  Is that going to exist
  24. | in a future gcc release, or is it posible to hack on the code
  25. | to produce big/little endian as definable by the user?
  26.  
  27. GCC internally is not set up to be able to switch endianess at
  28. runtime.  If you look in the sources, you will see a number of places
  29. that use #ifdef's in the middle of expressions that control the
  30. endianess.  Obviously, it could be done, but so far it hasn't been.
  31.  
  32. While you would still have to have two executables, you could switch
  33. endianess via the -b <machine> switch and only have one driver program.
  34.  
  35. --
  36. Michael Meissner    email: meissner@osf.org        phone: 617-621-8861
  37. Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142
  38.  
  39. You are in a twisty little passage of standards, all conflicting.
  40.