This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[WWW] simtest-howto.html clarifications, additions


A few months ago there was a flurry of discussion about updating
simtest-howto.html, which died down and was forgotten.  At the Summit
I promised Hans-Peter Nilsson that I would update the file and add
links to test results.

This version has information about updating the two CVS trees and
recreating the combined directory.  The table of targets has several
additions, plus more information about those targets.  There's a lot
more that could be added there, and several holes to fill in for
targets whose config information is less than clear.  I'm also hoping
that people who test these cross compilers will occasionally update
the test result links.

If there are no objections I'll check this in soon and make sure it
passes XHTML validation.

Janis

Index: simtest-howto.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/simtest-howto.html,v
retrieving revision 1.12
diff -u -r1.12 simtest-howto.html
--- simtest-howto.html	25 Mar 2003 10:36:53 -0000	1.12
+++ simtest-howto.html	9 Jun 2003 15:57:40 -0000
@@ -6,114 +6,275 @@
   <body>
     <h1>How to test GCC on a simulator</h1>
 
-    <p>Suppose you want to test GCC on some strange target, for which you
-    don't have hardware.  Let's pick ARM as an example.  You can do it
-    like this:</p>
-
-    <h2>Create a combined tree.</h2>
-
-    <p>I'm assuming you're starting from scratch, so you don't have an
-    installed binutils or newlib for the strange target.  So you'll need
-    to build these.  You can't easily build newlib outside a combined
-    tree.  Start in an empty directory, then do this:</p>
+    <p>Several GCC targets can be tested using simulators.  These allow
+    you to test GCC for a specific processor for which you don't have
+    access to hardware, or for targets that have general characteristics
+    you'd like to test, like endianness or word size.</p>
+
+    <p>All of the instructions here start out from a directory we'll
+    call <code>${TOP}</code>, which is initially empty.</p>
+
+    <h2>Set up sources</h2>
+
+    <p>Testing with a simulator requires use of a combined tree;
+    you can't easily build newlib, required for simulator testing,
+    outside of a combined tree, and the build of the other components
+    is easist in a combined tree.</p>
+
+    <p>The combined tree contains GCC sources plus several modules of
+    the <code>src</code> tree: <code>binutils</code> and
+    <code>newlib</code> for the build, <code>gdb</code> for the
+    simulators, and <code>dejagnu</code> for the testing tools.  If you
+    already build with a combined tree you can use your current setup;
+    if not, these instructions will get you the sources you need.</p>
+
+    <h3>Check out initial CVS trees</h3>
+
+    <p>If you don't yet have either tree you'll need to do an initial
+    check-outs.</p>
+
+    <p>Check out mainline GCC:</p>
+
 <pre>
+cd ${TOP}
 cvs -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/gcc login
 # You will be prompted for a password; reply with the empty string.
 cvs -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/gcc co gcc
 cvs -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/gcc logout
+</pre>
+
+    <p>Check out the <code>src</code> tree:</p>
+
+<pre>
+cd ${TOP}
 cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/src login
 # You will be prompted for a password; reply with "anoncvs".
-cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/src co binutils newlib dejagnu gdb
+cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/src binutils newlib dejagnu gdb
 cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/src logout
+</pre>
+
+    <h3>Update CVS trees</h3>
+
+    <p>You can update existing CVS trees rather than starting from
+    scratch each time.  Update the GCC tree using the
+    <code>gcc_update</code> script, which touches generated files and
+    handles directory changes in the tree.  Be sure to do this from
+    the directory in which you did the original check-out, NOT in the
+    combined tree:</p>
+
+<pre>
+cd ${TOP}/gcc
+cvs -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/gcc login
+# You will be prompted for a password; reply with the empty string.
+CVSROOT=":pserver:anoncvs@subversions.gnu.org:/cvsroot/gcc" \
+  contrib/gcc_update
+cvs -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/gcc logout
+</pre>
+
+    <p>Update the <code>src</code> tree with the same sequence of
+    commands that you used to check out that tree initially, invoked from
+    the <code>src</code> directory (NOT from within the combined tree).</p>
+
+    <h3>Create a combined tree</h3>
+
+    <p>Create a tree that consists of all of the files from the GCC and
+    binutils/gdb/newlib source trees (including several simulators in
+    <code>src/src/sim</code>), with the GCC files overriding the
+    binutils/gdb/newlib files when there's a conflict.  It's done this
+    way because the GCC files are the master copy.  To save on disk
+    space, these commands actually make a tree of hard links rather
+    than duplicating all the files:</p>
+
+<pre>
+cd ${TOP}
+rm -rf combined
 mkdir combined
-cd src && find . -print | cpio -pdlm ../combined && cd ..
-cd gcc && find . -print | cpio -pdlmu ../combined && cd ..
+cd src &amp;&amp; find . -print | cpio -pdlm ../combined &amp;&amp; cd ..
+cd gcc &amp;&amp; find . -print | cpio -pdlmu ../combined &amp;&amp; cd ..
 </pre>
 
-    <p>This will create, in <code>combined</code>, a tree which consists
-    of all the
-    files from the gcc and binutils/gdb/newlib source trees (including
-    several simulators in <code>src/src/sim</code>), with the gcc
-    files overriding the binutils/gdb/newlib files when there's a
-    conflict.  (It's done this way because the gcc files are the master
-    copy.)  To save on disk space, the commands above actually make a tree
-    of hard links, rather than duplicating all the files.</p>
+    <h2>Build it</h2>
 
-    <h2>Build it.</h2>
+    <p>Use a recent version of GCC as the build compiler.</p>
 
     <p>The target name suitable for the simulator is usually `*-elf' for a
     target `*'.  There are some exceptions, for instance on powerpc
     it's powerpc-eabi or powerpc-eabisim, and for i960 there isn't an elf
-    target yet so i960-coff is probably your best choice.</p>
+    target yet so i960-coff is probably your best choice.  Here we build
+    <code>arm-elf</code>.</p>
 
 <pre>
-# From the parent directory of gcc, src, and combined:
+cd ${TOP}
 mkdir build install
 cd build
-../combined/configure --target=arm-elf --prefix=`pwd`/../install
+../combined/configure \
+    --target=arm-elf --prefix=${TOP}/install \
+    --with-newlib --disable-gdbtk
 make
 </pre>
 
-    <h2>Test it.</h2>
+    <h2>Test it</h2>
+
+    <p>The only trick here is that you want DejaGNU to use the simulator
+    rather than trying to run the output on the build system.  For
+    example:</p>
 
-    <p>The only trick here is that you want dejagnu to use the simulator,
-    not try running the output on the build system.  For example:</p>
 <pre>
-# From the build directory:
+cd ${TOP}/build
 make check-gcc RUNTESTFLAGS=--target_board=arm-sim
 </pre>
+
     <p>The only reliable way (apart from guessing that it's probably
     `*-sim') to find out the name of the target board is to look in the
-    dejagnu sources, in dejagnu/baseboards, for something that looks
-    right.  Or you can use this table of combinations that at one time
-    compiled, usable as test-targets with the instructions above:</p>
+    DejaGNU sources, in <code>dejagnu/baseboards</code>, for something
+    that looks right.  Or you can use this table of combinations that at
+    one time compiled, usable as test-targets with the instructions above.</p>
+
+    <p>You can compare your test results against the archived results
+    linked below to detect major problems.  As always, if you're testing
+    a patch you should compare your results with and without the patch.</p>
+
+    <p>The target characteristic can help you determine which targets to
+    use to broaden the scope of your testing.  A CC0 target causes
+    significantly different code to be generated and can matter more
+    than word size and endianness in terms of detecting new breakage.</p>
 
 <table border="0" cellspacing="5" cellpadding="5">
 <tr valign="top" align="left">
- <th>Target</th><th>Simulator</th><th>Verified</th><th>Comment</th>
+ <th>Target</th><th>Simulator</th><th>Comments</th><th>Test Results</th>
 </tr>
 
 <tr valign="top">
  <td>arm-elf</td>
  <td>arm-sim</td>
- <td>2003-02-09</td>
- <td>Unexpected failures: C: 13, C++: 16, Fortran: 34.</td>
+ <td>32-bit word, little endian</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00592.html";>3.3 20030509 (prerelease)</a>
+ <br />
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-04/msg00949.html";>3.2.3 20030415 (prerelease)</a>
+ </td>
+</tr>
+
+<tr valign="top">
+ <td>fr30-elf</td>
+ <td>fr30-sim</td>
+ <td>32-bit word, big endian</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00766.html";>3.3 20030509 (prerelease)</a>
+ </td>
+</tr>
+
+<tr valign="top">
+ <td>h8300-coff</td>
+ <td>h8300-sim</td>
+ <td>big endian</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00624.html";>3.3 20030509 (prerelease)</a>
+ <br />
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-04/msg00967.html";>3.2.3 20030415 (prerelease)</a>
+ </td>
+</tr>
+
+<tr valign="top">
+ <td>i960-coff</td>
+ <td>i960-sim</td>
+ <td>32-bit word, little endian</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00607.html";>3.3 20030509 (prerelease)</a>
+ <br />
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-04/msg00955.html";>3.2.3 20030415 (prerelease)</a>
+ </td>
+</tr>
+
+<tr valign="top">
+ <td>m32r-elf</td>
+ <td>m32r-sim</td>
+ <td>32-bit word, big endian</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg01478.html";>3.3</a>
+ </td>
 </tr>
 
 <tr valign="top">
  <td>mips-elf</td>
  <td>mips-sim</td>
- <td>2003-02-09</td>
- <td>Unexpected failures: C: 30, C++: 166, Fortran: 603.</td>
+ <td>big endian</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00619.html";>3.3 20030509 (prerelease)</a>
+ </td>
+</tr>
+
+<tr valign="top">
+ <td>mipsisa64-elf</td>
+ <td>mips-sim-idt64</td>
+ <td>&nbsp;</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-06/msg00335.html";>3.4 20030605 (experimental)</a>
+ </td>
 </tr>
 
 <tr valign="top">
  <td>mn10300-elf</td>
  <td>mn10300-sim</td>
- <td>2003-02-09</td>
- <td>CC0 target.
- Unexpected failures: C: 51, C++: 43, Fortran: 57.</td>
+ <td>CC0 target, little endian</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00632.html";>3.3 20030509 (prerelease)</a>
+ <br />
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-04/msg00972.html";>3.2.3 20030415 (prerelease)</a>
+ </td>
 </tr>
 
 <tr valign="top">
  <td>powerpc-eabisim</td>
  <td>powerpc-sim</td>
- <td>2003-02-09</td>
- <td>Unexpected failures: C: 76, C++: 60, Fortran: 41.</td>
+ <td>32-bit word, big endian</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-03/msg00033.html";>3.4 20030301 (experimental)</a>
+ </td>
+</tr>
+
+<tr valign="top">
+ <td>sh-coff</td>
+ <td>sh-hms-sim</td>
+ <td>&nbsp;</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00622.html";>3.3 20030509 (prerelease)</a>
+ <br />
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-04/msg00964.html";>3.2.3 20030415 (prerelease)</a>
+ </td>
 </tr>
 
 <tr valign="top">
  <td>sh-elf</td>
  <td>sh-hms-sim</td>
- <td>2003-02-09</td>
- <td>Unexpected failures: C: 12, C++: 53, Fortran: 603.</td>
+ <td>big endian</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-06/msg00315.html";>3.4 20030605 (experimental)</a>
+ <br />
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00631.html";>3.3 20030509 (prerelease)</a>
+ <br />
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-04/msg00970.html";>3.2.3 20030415 (prerelease)</a>
+ </td>
+</tr>
+
+<tr valign="top">
+ <td>sparc-elf</td>
+ <td>sparc-sim</td>
+ <td>&nbsp;</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00587.html";>3.3 20030507 (prerelease)</a>
+ <br />
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-04/msg00942.html";>3.2.3 20030415 (prerelease)</a>
+ </td>
 </tr>
 
 <tr valign="top">
  <td>v850-elf</td>
  <td>v850-sim</td>
- <td>2002-03-25</td>
- <td>CC0 target.</td>
+ <td>CC0 target, 32-bit word, little endian</td>
+ <td>
+ <a href="http://gcc.gnu.org/ml/gcc-testresults/2003-04/msg00978.html";>3.2.3 20030415 (prerelease)</a>
+ </td>
 </tr>
 
 </table>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]