home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / c / gnu_c / riscos / RiscOS / Readme_RB < prev   
Encoding:
Text File  |  1993-08-04  |  23.5 KB  |  706 lines

  1. GCC for RISC OS
  2. ---------------
  3.  
  4. -3. Contents
  5.     --------
  6.  
  7.   -3. Contents
  8.   -2. For readers of German language only
  9.   -1. Something general
  10.    0. Installation
  11.    1. Prefixes in filenames
  12.    2. (Options for) GCC
  13.    3. Include files
  14.      3.1 How to use standard C header files
  15.      3.2 Changes to standard header files
  16.    4. Linker
  17.    5. AOFConvert
  18.    6. Assembler
  19.    7. Libraries
  20.      7.1 Stubs / RISC_OSlib
  21.      7.2 Your own libraries
  22.      7.3 Converting libraries from ALF (Acorn Library Format) to MUPROS
  23.          format
  24.      7.4 The wimpclass library
  25.      7.5 The libg-- library
  26.    8. Objective C
  27.    9. "Support"
  28.   10. Source code
  29.   11. Floating point arithmetic
  30.   12. Memory
  31.   13. Debugger
  32.   14. AOF
  33.   15. Stack
  34.   16. Constructors/Destructors
  35.  
  36.  
  37.  
  38. -2. For readers of German language only
  39.     -----------------------------------
  40.  
  41.   Nun ja, ich habe mich also entschieden, die Textfiles nur noch in Englisch
  42.   zu fuehren. Ich denke, so verstehen mich mehr Leute, als wenn ich in Deutsch
  43.   schreiben wuerde. Ich hoffe, alle deutschsprachigen Leser verzeihen mir!
  44.  
  45.  
  46.  
  47. -1. Something general
  48.     -----------------
  49.  
  50.   Though this distribution is called 'gcc-2.3.3' it is NOT the official gcc for
  51.   RISC-OS release - it is my private one. I have to add that it is NOT AT ALL
  52.   free of bugs. So when using this version of gcc you should always keep in mind
  53.   that there may be (a) bugs that could make it useless for your specific purpose.
  54.  
  55.   I think that there are not too many bugs as with the help of some of you I was
  56.   able to discover and eliminate some.
  57.  
  58.   There are some people (around Michael Ben Gershon and Simon Callan) working on
  59.   an official GCC for RISC-OS release. This will be a more reliable one that this
  60.   one is. Both version will converge (is this an Englisch word?) in future so that
  61.   you will not have to completely change your conception of gcc as soon as the
  62.   official version is available.
  63.  
  64.  
  65.  
  66. 0. Installation
  67.    ------------
  68.  
  69. The installation consists of:
  70.  
  71.   1. RUN$Path must be extended with the directory name, which contains the
  72.      GNU C executables. You can also copy them to your library directory.
  73.  
  74.  
  75.   2. Set the variable CPATH. This variable should contain the directories,
  76.      which contain the header files. For instance:
  77.  
  78.      Set CPATH IDEFS::IDEDisc4.$.DesktopC.Clib
  79.  
  80.      CPATH can contain more than one directory name by using ';' seperators.
  81.   
  82.      For instance:
  83.  
  84.      If your header files are in $.clib.1.h and $.clib.2.h, CPATH must be
  85.      set as follows:
  86.  
  87.      Set CPATH $.clib.1;$.clib.2
  88.     
  89.      You may also want to set the variables:
  90.  
  91.      C_INCLUDE_PATH
  92.      CPLUS_INCLUDE_PATH
  93.      OBJC_INCLUDE_PATH
  94.      OBJCPLUS_INLCUDE_PATH
  95.  
  96.      CPLUS_INCLUDE_PATH and OBJCPLUS_INCLUDE_PATH will be only used during
  97.      compiling c++ sources, objective c sources resp.
  98.  
  99.      do not forget the header files in risclib.inc.h!
  100.  
  101.  
  102.   3. You must set the variable mulib$Path to the FULL directory name where
  103.      the risclib libraries can be found (e.g. stubsmu and oslib_mu). For
  104.      instance:
  105.  
  106.      Set mulib$path IDEFS::IDEDisc4.$.Temp.GNU-CC.gcc2-3-3.risclib.
  107.  
  108.      The libraries can be found by calling Libraries mulib:stubsmu and
  109.      mulib:oslib_mu
  110.  
  111.      set the variable clib$Path to the directory name where the original libraries
  112.      (in AOF-format) can be found. For instance:
  113.  
  114.      Set clib$path adfs::4.$.c-compiler.clib.
  115.  
  116.  
  117.   4. You may have to convert Stubs und RISC_OSlib (use makelibs in the risclib
  118.      directory). Makelibs does also compile the wimpclass library (MUPROS format).
  119.      You should run makelibs even if you have already a running version of gcc
  120.      installed - there are some changes.
  121.  
  122.  
  123.   5. compile the wimpclass library (for people who'd like to use AOF format object
  124.      files) by amu-ing the makeAOF file in the risclib directory. It will build
  125.      the wimpclass and gccext libraries in the clib:o directory.
  126.  
  127.   6. The documentation can be found in the 'doc' directory.
  128.  
  129.   7. Have a look at the !sbconfig application. It is a good sample on how to use
  130.      wimpclass library - and it includes make files for both mupros and AOF
  131.      compiling/linking
  132.  
  133.  
  134.  
  135. 1. Prefixes in filenames
  136.    ---------------------
  137.  
  138. Unix expects, in contrary to RISC OS, that files types such as .c .o .cc
  139. are used as extension to the filename (e.g. myfile.c). GCC uses also
  140. file names in this format. In order to behave correctly under RISC OS,
  141. GCC moves the file type extension to the start of the filename. For instance
  142. 'GCC sample.c' will be 'GCC c.sample'. Note: 'irgend.sample.c' will be
  143. 'c.irgend.sample'. GCC uses these extensions in order to find out the
  144. file type. Remember: all unrecognized files are treated like object files.
  145.  
  146. The extensions have the following meaning:
  147.  
  148.  .c              C Source
  149.  .cc, .cxx, .C   C++ Source (Note: only .cc can be used with RISC OS)
  150.  .m              objective-C Source (not yet supported)
  151.  .o              object file
  152.  .h              header file
  153.  .i              pre-processed file (cpp output)
  154.  .ii             pre-processed C++ file
  155.  .s              assembler source
  156.  .S              assembler source (needs pre-processing)
  157.  
  158.  
  159.  
  160. 2. (Options for) GCC
  161.    -----------------
  162.  
  163. Since revision A GCC is able to automatically invoke the linker. With Revision
  164. B it invokes either mulink or link (Acorn's linker) depending on wether the
  165. -aof switch is off or on. There are no libraries automatically linked.
  166.  
  167. An exact explanation of the compiler options are given in the file 'invoke'
  168. in the doc directory. Most options are just like with other C compilers.
  169. You must not forget to use the -O or -O2 (optimizing) option. Without these
  170. options you will get less efficient code.
  171.  
  172. Machine dependent options:
  173.  
  174.  -mno-apsc            use the C-call convention for functions.
  175.  -mcoproc             Coprocessor is available (due to code optimizing,
  176.                       works also without one)
  177.  -mpoke-function-name function names for post mortem debugger in code
  178.  -aof                 use AOF instead of mupros object file format (new)
  179.                       you can not mix AOF and mupros!
  180.  -+                   (passed to the linker) match C++ function calls
  181.                       to C function names. with that switch on you can
  182.                       call C functions from a C++ program without declaring
  183.                       it as extern "C" (does not work with AOF)
  184.  -just-show           (obsolete) just print the commands gcc would invoke
  185.                       to treat the given files.
  186.  
  187. See the included sample application !sbconfig for sample make files for both
  188. MUPROS and AOF style compiling/linking
  189.  
  190.  
  191. 3. Include files
  192.    -------------
  193.  
  194. For the include files is also the prefix-notation for file typen used. In
  195. the source code can the suffix-notation be used. The pre-processor converts
  196. these file names to prefix notation and recognizes the Unix directory paths.
  197. For instance /usr/include/sys/times.h becomes $.usr.include.sys.h.times,
  198. ../my-header.h becomes ^.h.my-header. The compiler recognizes only the
  199. file extensions .h und .c.
  200.  
  201. Search order for include files:
  202.  
  203.   1. current directory or the directories, which have been entered using
  204.      the -I option 
  205.   2. the directories, which are given by CPATH.
  206.   3. the directories given by C_INCLUDE_PATH (Standard C),
  207.      CPLUS_INCLUDE_PATH (C++), OBJC_INCLUDE_PATH (Objective C) or
  208.      OBJCPLUS_INLCUDE_PATH (Objective C++)
  209.  
  210. The 'environment variables' may contain more directories (by using the
  211. ';' character as seperator). The Unix notation may also be used. However,
  212. different from RISC OS, the '.' or '/' character may not be the last
  213. character in direcory name (the Pre-Processor will do this for you). Also
  214. the '.h' must not be used in the path name.
  215.  
  216.  
  217. 3.1 How to use standard C header files
  218.     ----------------------------------
  219.  
  220. If you include standard C headers into a C++ I propose to do it as the
  221. example shows:
  222.  
  223.   extern "C" {
  224.   #include "stdlib.h"
  225.   #include "stdio.h"
  226.   ...
  227.   }
  228.  
  229. This makes the -+ option unnecessary and therefore does work with AOF too.
  230.  
  231.  
  232.  
  233. 3.2 Changes to standard header files
  234.     --------------------------------
  235.  
  236. If you use the standard string.h file, you should change memcpy, memcmp and
  237. strlen to
  238.  
  239.   extern int memcmp(const void * /*s1*/, const void * /*s2*/, long unsigned int  /*n*/);
  240.   extern void *memcpy(void * /*s1*/, const void * /*s2*/, long unsigned int /*n*/);
  241.   extern long unsigned int strlen(const char * /*s*/);
  242.  
  243. You should also replace in the file 'template.h' 'template' in typedef struct ... template
  244. through e.g. 'template_t'; don't forget to change it all over the file
  245.  
  246.  
  247.  
  248.  
  249. 4. Linker
  250.    ------
  251.  
  252. In order to get 'absolute' code the linker must be
  253. called as follows:
  254.  
  255.  mulink -F -a32768 -osample -C o.sample1 o.sample2 mulib:stubsmu
  256.  settype sample absolute
  257.  
  258. Explanation:
  259.  
  260. mulib$path contains the directory name where 'stubsmu' can be found.
  261.  
  262.  -F       first object file must always be linked (only , when referenced).
  263.           If stubsmu is linked, this option is not particulary necessary,
  264.           because stubsmu has set the Obligatory-Link-Flag (will always be
  265.           linked) and contains a reference to 'main'.
  266.  -a32768  Absolute code with execution address &8000.
  267.  -osample sample will be the output file
  268.  -C       only the code, without header, publics, relocs.
  269.  
  270. If the -a and -C options are not used, an object-file will be produced.
  271.  
  272. Further options:
  273.  
  274.  -x          a list of symbols, moduls and their addresses (e.g. offsets)
  275.              will be given.
  276.  
  277.  -+          link C++ - code. The linker will search for symbol names in a
  278.              C++ fashion and if they could not be found, they are converted
  279.              into standard-C name. For instance:
  280.  
  281.              printf( "%d", 10 )
  282.      
  283.              generates in C++ a assembler call:
  284.           
  285.              ... bl printf__FPci
  286.  
  287.              If a symbol printf__FPci exists, the linker will generate a call
  288.              to this symbol. Otherwise (with the -+ option) the name printf
  289.              will be used (without __F...).
  290.  
  291.  -$<suffix>  the characters, which in C++ symbol names is used between
  292.              the 'normal' name of the function and the type. Default: __F.
  293.  -u          do not print a liste of undefined externals
  294.  -=<name>=<value> create a symbol named <name> with the absolute value <value>
  295.  
  296. All other options are ignored by RISC OS version (have no meaning).
  297.  
  298. Stubs MUST be linked before the RISC_OSlib is linked. The file which
  299. contains the function main MUST be linked first (obsolete - does not matter
  300. if AIF header is linked. As it is contained in stubsmu it will be linked). In
  301. other cases the order of the object files doesn't matter. Objects which are
  302. referenced by none of the other object files are simply ignored. For instance:
  303.  
  304.  mulink -F o.sample1 o.sample2 mulib:stubsmu
  305.  
  306. o.sample2 will not be linked, if neither in mulib:stubsmu nor in o.sample1
  307. a function or variable from o.sample1 is referenced.
  308.  
  309. If Stubs are linked, the following message could be printed:
  310.  
  311.  unresolved external(s)
  312.    '__root_stack_size' in module 'Stub$$Code'
  313.    '__RelocCode' in module 'Stub$$Code'
  314.  
  315. Both references are in AOF-files as 'weak binding' defined and don't have
  316. to be declared. Applications will be linked correctly.
  317.  
  318. Fomer versions of mulink used to print the following message is printed:
  319.  
  320.  warning: double defined public variable(s):
  321.    'C$$Code' in module 'C$$Code'
  322.  
  323. This was due to an error in AOFconvert and should not appear any more (if
  324. you use newly converted libraries). If you get such a message please report
  325. to me which libraries you used.
  326.  
  327.  
  328.  
  329. 5. AOFConvert
  330.    ----------
  331.  
  332. AOFConvert is a utility which converts object files in AOF-Format into
  333. the MUPROS format.
  334.  
  335. You have to use it as follows:
  336.  
  337.  AOFConvert -l -osample o.sample
  338.  
  339. The option -l suppresses all warnings (which are not interesting). During
  340. some circumstances you will also have to use the -O option. Then will the
  341. converted object ALWAYS be linked (if it is used somewhere in conjunction
  342. with MULINK, even if no reference is fullfilled).
  343.  
  344.  
  345.  
  346. 6. Assembler
  347.    ---------
  348.  
  349. If you like to use the assembler, you are referred to the tex file (in the
  350. doc directory) and the RISC OS PRM's. The assembler is called by using:
  351.  
  352.  as -o o.sample s.sample
  353.         
  354. A object file in MUPROS format will be generated. Note: assembler
  355. instructions must be lower case. Register names may be upper case or
  356. lower case.
  357.  
  358. ARM/MUPROS/AOF specific command line options:
  359.  
  360.  -d                 create a debug area. any source level debugging data
  361.                     will only be included in the object file if this option
  362.                     is found on the command line.
  363.  -A                 output an AOF object file rather than a MUPROS object
  364.                     file
  365.  
  366. ARM/MUPROS specific pseudo-instructions:
  367.  
  368.  .objname <name>       the just assembled object will be called
  369.                        <name> (Default: Dateiname)
  370.  .segid <name>         the segment ID becomes <name> (Default: 'code')
  371.  .segattr <'RO'|'RW'>  Read-only or Read-Write Segment (Default: 'RW')
  372.  .init <symbol>     insert a constructor into init area
  373.                      (init area is scanned by _init_globals()/_kill_globals())
  374.  .kill <symbol>     insert a destructor into init area
  375.  .file <filename>   specifies the source file name (-> source level debugging)
  376.  .line <linenumber> specifies the source file number (dto.)
  377.  .frag              begin new line info fragment (should not be used)
  378.  .obligatory        to make the currently assembled area an 'obligatory link area'
  379.                      (does not work with AOF)
  380.  .optionally        to make the currently assembled area an 'optionally link area'
  381.                      (does not work with AOF)
  382.  .ignoreline        ignore .line directives
  383.  .resumeline        self explaining
  384.  
  385. At the moment the assembler does not support separate code, data and null
  386. initialised segments (.text, .data, .bss), these will be assembled in
  387. different files.
  388.  
  389. An example of a assembler source code is risclib.s.div-fast. More examples
  390. can be generated using GCC -O -S ...
  391.  
  392. A full list of the assembler instructions (from the source code):
  393.  
  394. /* format of the assembler string :
  395.    
  396.    %<bitfield>r         print as an ARM register
  397.    %<bitfield>f         print a floating point constant if >7 else an
  398.                         fp register
  399.    %c                   print condition code (always bits 28-31)
  400.    %P                   print floating point precision in arithmetic insn
  401.    %Q                   print floating point precision in ldf/stf insn
  402.    %R                   print floating point rounding mode
  403.    %<bitnum>'c          print specified char iff bit is one
  404.    %<bitnum>-<len>'c    print specified char iff bit is one and length of
  405.                         command after c is at least len
  406.    %<bitnum>`c          print specified char iff bit is zero
  407.    %<bitnum>?ab         print a if bit is one else print b
  408.    %p                   print 'p' iff bits 12-15 are 15
  409.    %o                   print operand2 (immediate or register + shift)
  410.    %a                   print address for ldr/str instruction
  411.    %b                   print branch destination
  412.    %A                   print address for ldc/stc/ldf/stf instruction
  413.    %m                   print register mask for ldm/stm instruction
  414.    %s                   print bits 0-23 as swi number/name
  415.    %L                   print ldm type (fd, ea and the like ...)
  416.    %S                   print stm type
  417.    %r                   print adr operand
  418.  
  419. /* ARM instructions */
  420.  
  421. "mul%c%20's %16-19r,%0-3r,%8-11r",
  422. "mla%c%20's %16-19r,%0-3r,%8-11r,%12-15r",
  423. "and%c%20's %12-15r,%16-19r,%o",
  424. "eor%c%20's %12-15r,%16-19r,%o",
  425. "sub%c%20's %12-15r,%16-19r,%o",
  426. "rsb%c%20's %12-15r,%16-19r,%o",
  427. "add%c%20's %12-15r,%16-19r,%o",
  428. "adr%c%20's %12-15r,%r",
  429. "adc%c%20's %12-15r,%16-19r,%o",
  430. "sbc%c%20's %12-15r,%16-19r,%o",
  431. "rsc%c%20's %12-15r,%16-19r,%o",
  432. "tst%c%p %16-19r,%o",
  433. "teq%c%p %16-19r,%o",
  434. "cmp%c%p %16-19r,%o",
  435. "cmn%c%p %16-19r,%o",
  436. "orr%c%20's %12-15r,%16-19r,%o",
  437. "mov%c%20's %12-15r,%o",
  438. "bic%c%20's %12-15r,%16-19r,%o",
  439. "mvn%c%20's %12-15r,%o",
  440. "str%c%22'b %12-15r,%a",
  441. "ldr%c%22'b %12-15r,%a",
  442. "stm%c%S %16-19r%21'!,%m",
  443. "ldm%c%L %16-19r%21'!,%m%22'^",
  444. "b%24-2'l%c%24'l %b",
  445. "swi%c %s",
  446.  
  447. /* Floating point coprocessor instructions */
  448.  
  449. "adf%c%P%R %12-14f,%16-18f,%0-3f",
  450. "muf%c%P%R %12-14f,%16-18f,%0-3f",
  451. "suf%c%P%R %12-14f,%16-18f,%0-3f",
  452. "rsf%c%P%R %12-14f,%16-18f,%0-3f",
  453. "dvf%c%P%R %12-14f,%16-18f,%0-3f",
  454. "rdf%c%P%R %12-14f,%16-18f,%0-3f",
  455. "pow%c%P%R %12-14f,%16-18f,%0-3f",
  456. "rpw%c%P%R %12-14f,%16-18f,%0-3f",
  457. "rmf%c%P%R %12-14f,%16-18f,%0-3f",
  458. "fml%c%P%R %12-14f,%16-18f,%0-3f",
  459. "fdv%c%P%R %12-14f,%16-18f,%0-3f",
  460. "frd%c%P%R %12-14f,%16-18f,%0-3f",
  461. "pol%c%P%R %12-14f,%16-18f,%0-3f",
  462. "mvf%c%P%R %12-14f,%0-3f",
  463. "mnf%c%P%R %12-14f,%0-3f",
  464. "abs%c%P%R %12-14f,%0-3f",
  465. "rnd%c%P%R %12-14f,%0-3f",
  466. "sqt%c%P%R %12-14f,%0-3f",
  467. "log%c%P%R %12-14f,%0-3f",
  468. "lgn%c%P%R %12-14f,%0-3f",
  469. "exp%c%P%R %12-14f,%0-3f",
  470. "sin%c%P%R %12-14f,%0-3f",
  471. "cos%c%P%R %12-14f,%0-3f",
  472. "tan%c%P%R %12-14f,%0-3f",
  473. "asn%c%P%R %12-14f,%0-3f",
  474. "acs%c%P%R %12-14f,%0-3f",
  475. "atn%c%P%R %12-14f,%0-3f",
  476. "flt%c%P%R %16-18f,%12-15r",
  477. "fix%c%P%R %12-15r,%0-2f",
  478. "wfs%c %12-15r",
  479. "rfs%c %12-15r",
  480. "wfc%c %12-15r",
  481. "rfc%c %12-15r",
  482. "cmf%c %16-18f,%0-3f",
  483. "cnf%c %16-18f,%0-3f",
  484. "cmfe%c %16-18f,%0-3f",
  485. "cnfe%c %16-18f,%0-3f",
  486. "stf%c%Q %12-14f,%A",
  487. "ldf%c%Q %12-14f,%A",
  488.  
  489.  
  490. 7. Libraries
  491.    ---------
  492.  
  493. 7.1 Stubs / RISC_OSlib
  494.     ------------------
  495.  
  496. With the GNU C/C++ compiler, you should have also the converted versions
  497. of Stubs and RISC_OSlib (stubsmu and oslib_mu in the directory risclib).
  498. If this is not the case, you can generate these libraries by executing
  499. the Obey file risclib.makelibs.
  500.  
  501. Again: link Stubs always before RISC_OSlib.
  502.  
  503. Until Revision B gcc had its own division routines (thought to be faster).
  504. From now on the routines included with stubs are used.
  505.  
  506.  
  507. 7.2 Your own libraries
  508.     ------------------
  509.  
  510. Libraries are constructed as follows (for MUPROS format only):
  511.  
  512.   1. compile single modules
  513.   2. put the objects in one file (e.g. using fappend)
  514.  
  515. BTW:
  516.  
  517.   mulink .... o.sample1 o.sample2
  518.  
  519. is exactly the same as:
  520.  
  521.   fappend o.sample1 o.sample2
  522.   mulink .... o.sample1
  523.                      
  524. Note: if someone has written a number of functions or classes, which 
  525. are very interesting: PLEASE let also other people use them. If this is
  526. the case, contact me. I will try to distribute them. I hope, other people
  527. will respond. 
  528.  
  529.  
  530. 7.3 Converting libraries from ALF (Acorn Library Format) to MUPROS format
  531.     ---------------------------------------------------------------------
  532.  
  533. You have to follow this procedure to convert libraries:
  534.  
  535.  1. extract all the object files from the library using
  536.     libfile -e <library> *
  537.  2. convert each object file with AOFconvert (see above)
  538.  3. fappend the object files you wish to be included in your converted
  539.     library
  540.  
  541. That's it.
  542.  
  543.  
  544.  
  545. 7.4 The wimpclass library
  546.     ---------------------
  547.  
  548. With revision A/B of GCC there came the so called wimpclass library. This
  549. is a kind of pre-alpha-Release. I included it to motivate people creating
  550. classes for wimp rather than distribute a useful wimp library. Try out
  551. !sbconfig to see what is implemented yet.
  552.  
  553.  
  554.  
  555. 7.5 The libg-- library
  556.     -----------------
  557.  
  558. Ferdinand Oeinck succeeded in porting the iostream part of the libg++
  559. library. The compiled versions can be found in mulib:libg--/mulib:libg--AOF
  560. resp. The headers needed for application of this library are in mulib:inc.h.
  561. You find all the sources and Ferdinand's comments in the directory
  562. mulib:libg231.
  563.  
  564. In libg-- there is also a string class. Have a look at its header file
  565. (str.h) to see what it is for.
  566.  
  567. NOTE: you should link libg-- together with UnixLib 3.6 (available from e.g.
  568. Newcastle server). Only parts of it do work with Stubs.
  569.  
  570.  
  571.  
  572. 8. Objective C
  573.    -----------
  574.  
  575. The current RISC OS version of GNU C/C++ does not support objective C.
  576. If you have a need for this, please contact me.
  577.  
  578.  
  579.  
  580. 9. "Support"
  581.    ---------
  582.                
  583. In many mailboxes you will find discussions about GNU C/C++. If you
  584. have access to Internet, for instance UUCP-News, you can read the newsgroup
  585. gnu.g++... or comp.sys.acorn For RISC OS specific problems I can be contacted
  586. at:
  587.  
  588.   Thomas Aeby
  589.   Graeffet 406
  590.   1735 Giffers
  591.   Schweiz
  592.   Tel. 037 38 16 00
  593.   EMail aeby@uropax.contrib.de
  594.  
  595. Please do report any bugs to this address. Thank you!
  596.  
  597. There was a mail list setup for GCC for RISCOS purposes. Please send a mail
  598. to riscos-g++-request@visionware.co.uk to get registered as a gcc user (this
  599. is not a machine - please be polite). You will then get all the announcements
  600. from me and other users. This 'registration' does not mean that you are
  601. registered in any legal way - it is just a mail list. Mail sent to
  602. riscos-g++@visionware.co.uk will redistributed to all the registered users.
  603.  
  604.  
  605.  
  606. 10. Source code
  607.     -----------
  608.  
  609. All source code of the compiler and the assembler are available from
  610. the address above and from JLACS/JLACD Archimedes Clubs (Switzerland, Germany).
  611.  
  612.  
  613.  
  614. 11. Floating point arithmetic
  615.     -------------------------
  616.  
  617. Floating point arithmetic can be used and SHOULD work. However, it is still not
  618. very well tested. You can't rely on it.
  619.  
  620.  
  621.  
  622. 12. Memory
  623.     ------
  624.  
  625. In order to compile C++ programs, you will need more than 2Mb free memory
  626. (task slot). Standard C uses less memory, but you will still need about
  627. 1-1.2 Mb. Error messages like 'virtual memory exhausted' mean lack of
  628. memory.
  629.  
  630. NOTE: gcc does now work under !Virtual but you need a version >0.23 of
  631. !Virtual. Some messages ...SWI ... Allow(Yn) may occur. Answer them with
  632. 'Y'.
  633.  
  634.  
  635.  
  636. 13. Debugger
  637.     --------
  638.  
  639. Until now only one source level debugging feature is implemented (use -g
  640. option with gcc): source file and line information. So you can at least
  641. trace through programs with ASD (do not use the step in command), set
  642. breakpoints, see source lines. Information about Procedures, Variables, ...
  643. is not available yet (in progress).
  644.  
  645. NOTE: You can not use !DDT with GCC! Though Acorn says in its manuals that
  646. !DDT should use the same format for debugging info it apparently does not.
  647. Does any one know the difference (Then please write to me!)?
  648.  
  649.  
  650.  
  651. 14. AOF
  652.     ---
  653.  
  654. Since revision B you can create/link AOF style object files with gcc. To use
  655. this feature you have to apply the -aof (gcc) or the -A (as) option. You
  656. have to link not only the stubs library but the library called 'gccext' too.
  657. This library contains some functions gcc expects to be in the standard
  658. library. You can create this library by invoking amu with the makeAOF file
  659. contained in the risclib directory. MakeAOF will put the library 'gccext'
  660. and the AOF version of the 'wimpclass' library into clib:o The sample
  661. application !sbconfig contains both makefiles for AOF style and MUPROS style
  662. compiling. Have a look on it!
  663.  
  664.  
  665.  
  666. 15. Stack
  667.     -----
  668.  
  669. GCC does still not produce any stack checking code. It assumes a infinite
  670. continuous descending stack. So you have to take care that the stack is
  671. large enough. If you use stubs you can use the variable __root_stack_size
  672. for this purpose. E.g. if you define int __root_stack_size = 16384; in one
  673. of the source files stubs will allocate 16kBytes for stack on startup
  674. (default is 4k).
  675.  
  676. Note that a stack overflow will not cause an immediate failure in every
  677. case. It may cause very subtle errors.
  678.  
  679.  
  680.  
  681. 16. Constructors/Destructors
  682.     ------------------------
  683.  
  684. Constructors/Destructors of global objects are collected in the so-called
  685. init area but they are not automatically called at program startup/exit.
  686. To do this gccext provides two functions, one for constructor calls, one
  687. for destructor calls. They are called
  688.  
  689.   _init_globals()       (calls each global constructor)
  690.   _kill_globals()       (calls each global destructor)
  691.  
  692. These functions should be called at program startup/exit if there are any
  693. global objects. Of course they may be called if there are no global objects
  694. too.
  695.  
  696.  
  697.  
  698. Thomas Aeby
  699. Graeffet 406
  700. 1735 Giffers
  701. Tel.: 037 38 16 00
  702. EMail: aeby@uropax.contrib.de
  703.  
  704. thanks to L.L. Frederiks who translated the original version of this readme file
  705. from German (I added the mistakes)
  706.