home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 610a.lha / gcc_v2.0-920229_3 / README < prev   
Encoding:
Text File  |  1992-03-02  |  11.0 KB  |  237 lines

  1. First the legal stuff:
  2.  
  3. This archive contains two independant parts, one consists of the binaries
  4. for the GNU C compiler V2.0, those files are all in the `gcc20' tree, and
  5. are subject to the license specified in the COPYING file.
  6.  
  7. The other part consists of new versions for my shared C library and the
  8. link level counterparts.  Those files are subject to the COPYING.LIB file.
  9.  
  10. You can get the full distribution for gcc2.0 for example from
  11. prep.ai.mit.edu, the source for the library is available for example from
  12. amiga.physik.unizh.ch.
  13.  
  14. -----------------------------------------------------------------------------
  15.  
  16. A special note to the library: I'm currently changing the library sources
  17. to finally adapt more closely to the BSD-net2 distribution. As a goal, this
  18. library should then also support networking, starting with AF_UNIX sockets
  19. and pipes implemented ala socketpair(). The library that is included in libs/
  20. is a mixture between old and new code, I can therefore not distribute any
  21. sources until the library has been changed completely. The reason I'm
  22. including this version is that I'd like to get feedback whether the new
  23. way to deal with packets that this library uses causes problems on some
  24. Amigas. So if you find this library to cause problems (crashes, other weird
  25. things), *AND THE PREVIOUS VERSION WORKED*, please tell me, I'd very much
  26. like to get rid of such problems before the next version is released.
  27.  
  28. You might notice that the startup code changed, this is to allow full
  29. implementation of execve() and friends, thus to actually pass an argument
  30. vector instead of a commandline to started programs. vfork() is there
  31. as well as wait4() and friends.  You may try your luck on those new
  32. functions, but keep in mind that *they are not supported* at the moment.
  33. There are problems with vfork() that I'll fix in the next release, but I'll
  34. have to include support for process groups to do it `right', currently you
  35. cannot ^C break any children spawned with vfork() with the keyboard, BREAK
  36. works though.  An other problem exists with pipe():  if you break a reader,
  37. the pipe might hang and you're not able to kill the writer.  This will be
  38. fixed by using sockets and sending the apropriate SIGPIPE to the writer
  39. (the problem is permanent under 1.3, the 2.0 pipe is lots smarter, but not
  40. yet perfect ;-)).
  41.  
  42. To repeat the important information:  the functions are there, but unless
  43. you know what you do, don't use them, not all problems are solved in this
  44. library release!
  45.  
  46. -----------------------------------------------------------------------------
  47.  
  48.  
  49. INSTALLATION
  50.  
  51. This distribution only contains the compilers and changed parts of my C
  52. library.  If you don't have a C library yet, you'll have to get one to be
  53. able to compile C programs.  You can either get my library (get
  54. ixemlib9201.lha and 3 ixemupd* files) or use another C library you might
  55. already have.  If you're not using my library, here's what you have to
  56. do in short form:
  57.   o  create a directory, assign GCC: to it
  58.   o  create a directory called gcc:lib, here go your crt0.o and libc.a files
  59.   o  create a directory called gcc:include, that's where your headers go
  60. The ixemlib9201.lha archive contains a Readme that explains this setup
  61. in greater detail).
  62.  
  63. The distribution contains 3 directories:
  64.   gcc20        - this contains stuff for gcc2.0
  65.   gcc        - this contains updates for the gcc: tree if you use my library
  66.   libs        - this contains ixemul.library, which is used by gcc2.0, and
  67.             which you have to copy to your LIBS: directory. This library
  68.             overrides all previous versions, please replace any older
  69.             copy!
  70.  
  71. To install gcc2.0, you just have to assign GCC20: to gcc20/, ie. the directory
  72. tree called gcc20/ that you created by unpacking this archive.
  73.  
  74. Then add gcc20:bin to your PATH, and you're finished installing gcc2.0, it can
  75. then be used like `gcc hello-world.c'.
  76.  
  77. *Be sure to use a large enough STACK setting! I'm using a STACK 250000 myself,
  78. *and this worked even for the weirdest programs. You *will* crash the machine
  79. *or get the weirdest errors if you use the Commodore default of 4k !!!!
  80.  
  81. The stuff in gcc/ should be placed at the apropriate place in your gcc:
  82. tree, it gives you a newer startup code (that now passes DOSBase and
  83. SysBase to your programs), and a newer libc.a (see the comments at the
  84. begin as well for comments to this version of the library).
  85.  
  86. Repeating myself, copy libs/ixemul.library to LIBS: !
  87.  
  88. Read the original manuals as well: read the info* file in the info
  89. directory.  NOTE:  the info files are not complete!  I didn't include any
  90. files that describe compiler interna, as they are not of interest to the
  91. majority of users that don't plan to change gcc itself.  If you want the
  92. complete manual, get the whole distribution from (for example)
  93. prep.ai.mit.edu!
  94.  
  95.  
  96.  
  97. HOW TO CALL THE C++ COMPILER 
  98.  
  99. The Unix copy of gcc-2.0 comes with a shell script, that emulates `gpp' in
  100. its behavior to even call the C++ compiler on `*.c' files.  Either call
  101. your C++ files `*.cc' (the preferred solution), or call the C++ compiler
  102. explicitly by using the `-x c++' switch to the compiler.  If someone
  103. rewrites the Unix shell script `c++' to AmigaDOS script language or AREXX
  104. I'd be happy to include that with this AmigaDOS distribution! For AREXX
  105. keep in mind though, that pushing commands into the input stream won't work,
  106. since this trick is not usable from Makefiles!  The Unix `c++' script
  107. includes `-lg++' by default, you have to do this explicitly when calling
  108. gcc directly.
  109.  
  110.  
  111.  
  112. WHAT ABOUT `protoize' AND `unprotoize'
  113.  
  114. Those programs are part of the Unix distribution of gcc-2.0. I'm not
  115. including them because I haven't removed all Unix dependencies yet (there
  116. are some problems regarding the colon as both a device terminator under
  117. AmigaDOS and as a field separator in gcc-2.0 -fgen-aux-info output).
  118. I nevertheless included the SYSCALLS.c.X file I generated, and this file
  119. should include all 2.04 functions defined in the various clib/ prototype
  120. files. If you want to try to port `protoize' yourself, this file should
  121. help you convert most programs using Amiga library functions to ANSI-C.
  122.  
  123.  
  124.  
  125. COEXISTANCE OF GCC 2.0 with GCC 1.40 & G++ 1.40
  126.  
  127. If you want to use the older compiler as well as gcc2.0, all you have to do
  128. is to rename gcc20:bin/gcc to gcc20:bin/gcc2, then you can use `gcc' and 
  129. `gpp' as usual to refer to the 1.40 compilers, and `gcc2' to refer to
  130. gcc2.0.  You might as well update some programs of 1.40:
  131.   copy gcc20:lib/gcc/as local:gcc-as
  132.   copy gcc20:lib/gcc/ld local:gcc-ld
  133. Don't copy cpp over though, cpp depends on the compiler version !
  134.  
  135. If you're using g++-1.40 and the C++ compiler of gcc-2.0 concurrently, you'll
  136. probably only want to keep one copy of C++ header files. G++ 1.40 expects to
  137. find them under
  138.   LOCAL:g++-include
  139. but gcc-2.0 looks for them in
  140.   GCC20:lib/g++-include
  141. To fix this, you can either make a symbolic link to where you keep your
  142. C++ headers, or you can use the following directory tree:
  143.   GCC20: -> <the base directory of your gcc20 tree>
  144.   LOCAL: -> GCC20:lib
  145.                /gcc-cpp    }
  146.                /gcc-cc1    } 
  147.                /gcc-cc1plus } these are the 1.40 compilers
  148.                /gcc-as    }
  149.                /gcc-ld    }
  150.                /g++-include  C++ headers for both, 1.40 and 2.0
  151.  
  152.                      /gcc
  153.                          /cpp        }
  154.                          /cc1        }
  155.                          /cc1plus    }  these are the 2.0 compilers
  156.                          /cc1obj    }
  157.                          /as        }
  158.              /ld        }
  159.  
  160.                  /amiga/2.0    contains Amiga specific stuff
  161.  
  162.  
  163.  
  164. SOME FREQUENTLY ASKED QUESTIONS
  165.  
  166. Q: `I keep getting requesters saying, that mathieeesingbas.library couldn't
  167.     be opened. Does gcc not work under 1.3??'
  168. A: Gcc *does* work under 1.3, but it needs the single precision math libraries
  169.    to implement the C `float' data type. The mathieeesingbas.library is built
  170.    into ROM under Kick 2.04, but is needed as a file in LIBS: under Kick 1.3.
  171.    You have to ask your local Commodore support for this library, or if you're
  172.    lucky, you can get it from an (illegally.., not by myself!) posted article on 
  173.    comp.sys.amiga.programmers. If you didn't capture that article, perhaps
  174.    somebody else had, but DON'T ASK ME! I won't send you neither the libraries
  175.    nor the article in question!
  176.  
  177. Q: `I don't get any .o files, even though the assembler seems to be called 
  178.     correctly.'
  179. A: This problem should have vanished in the mean time. It resulted from using
  180.    a bogous copy of the assembler. Use the one provided in this release, and
  181.    the problem should go away.
  182.  
  183. Q: `Program <xy> that uses ixemul.library requests the LOCAL: drive, which
  184.     I don't have?!'
  185. A: ixemul.library searches LOCAL: for a timezone database. All you have to do
  186.    is assign LOCAL: to some existing directory, and the functions will be able
  187.    to determine that no such database exists. If you have gcc-1.40 installed,
  188.    you won't have this problem, as LOCAL: is used to find the compiler passes.
  189.  
  190. Q: `I keep getting a bus error using program <xy>, what's wrong?'
  191. A: Tell me which program generated that error. This is most certainly a program
  192.    that contains 68020 code and which you tried to run on a 68000 machine.
  193.    As long as the program is not specifically marked as `68020 only', this is
  194.    to be considered a bug!
  195.    This error might as well fit into the next question, read on!
  196.  
  197. Q: `My machine always crashes when I try to use gcc, or I get weird error
  198.     messages like "bus error" or "illegal instruction". Sometimes I can
  199.     successfully compile, but the machine crashes soon afterwards, when I
  200.     execute programs that normally don't crash.'
  201. A: Did you set your STACK high enough? The Commodore default of 4k is WAYS too
  202.    low for GNU programs, I have my STACK at 250000, you might try lower
  203.    values, but I'd recommend not going below 100k !
  204.  
  205. Q: `I did "gpp -lg++ test.cc" and kept getting errors at link time'
  206. A: Supply the libraries AFTER the source/object files. 
  207.    Thus do `gpp test.cc -lg++' in this example.
  208.  
  209. Q: `Now that we have gcc2.0, can I remove my 1.40 compilers?'
  210. A: Depends on what you're programming in mostly. If you're only interested in
  211.    the C compiler, you can remove the 1.40 gcc, no problem. If you're a C++
  212.    programmer though, I'd suggest (if you have the disk space) you keep your
  213.    1.40 g++, since the language definition changed slightly from 1.40 to
  214.    2.0, and the 2.0 C++ compiler seems buggier than the 1.40 one. The 2.0
  215.    C-compiler could demonstrate reliability by recompiling itself, the C++
  216.    didn't have a comparable chance. Use the 2.0 C++ compiler though! The C++
  217.    language implemented by gcc2.0 is richer than the 1.40 one, templates are
  218.    supported, ANSI exceptions, etc. By keeping the 1.40 compiler you just keep
  219.    the option of reverting to 1.40 in cases where you're not sure whether your
  220.    program or the compiler is buggy.
  221.    
  222. Q: `Although I don't define "alloca" to be "__builtin_alloca", gcc2.0 uses its
  223.     builtin function for it, what can I do?'
  224. A: Use the `-fno-builtin' switch.
  225.  
  226.  
  227. Good luck with this really great compiler. I'd like to thank all the wonderful
  228. guys that made this compiler what it is today, thank you! For the contributors
  229. to gcc-2.0, read the GNU CC manual!
  230.  
  231.  
  232. -Markus Wild
  233.  
  234. You can reach me as:
  235.  
  236. <wild@nessie.cs.id.ethz.ch> or as <wild@amiga.physik.unizh.ch>
  237.